reMarkableWiki

Everything about the reMarkable Paper Tablet

User Tools

Site Tools


Sidebar

Topics

tips:blockwifi

Blocking WiFi from starting

Since codex 1.2.0.344, the reMarkable has developed an annoying habit of turning Wifi back on after you start it, even if you had manually turned it off before.

This is a quick hack to try and block Wifi on start up using rfkill in /etc/rc.local and a custom named reMarkable folder. You need to be comfortable getting files onto your reMarkable over ssh and understanding some of the Unix filesystem and commands.

  1. Create a file called /etc/rc.local in the reMarkable root filesystem
 
    remarkable: ~/ cat /etc/rc.local
    #!/bin/bash
    exec 2> /tmp/rc.local.log
    exec 1>&2
    echo "rc.local started"
    set -x
    
    mount /home # need /home mounted to be able to look through the metadata files
    WIFI_STATE="$(awk -F\" '$2=="visibleName" && $4 ~ /^Wifi o/{print $4}' /home/root/.local/share/remarkable/xochitl/*.metadata)"
    rfkill list
    if [[ "${WIFI_STATE}" == "Wifi off" ]]
    then
        rfkill block 0 # disable wifi
    else
        rfkill unblock 0 # re-enable wifi
    fi
    
    echo "rc.local completed"
    exit 0
    
  1. Mark the rc.local file as executable
    remarkable: ~/ chmod +x /etc/rc.local
    remarkable: ~/ ls -la /etc/rc.local
    -rwxr-xr-x    1 root     root           355 May  7 14:07 /etc/rc.local
    
  1. Create an object in the reMarkable files to use as a control. I created a top-level folder called “Controls” and then inside this I created a folder called “Wifi off”.
  2. Reboot the reMarkable and see if the Wifi remains off.

To re-enable Wifi, rename the control object through the UI to Wifi on (or anything really as long as it doesn't say Wifi off) and reboot.

This seems to work for me. I don't use Wifi at all except to search for reMarkable firmware updates, or when backing the device up, in which case I am happy to go through a bit of awkwardness to turn it back on.

The script should write to /tmp/rc.local.log for troubleshooting and running systemctl status rc-local is also useful to check for exit codes:

remarkable: ~/ systemctl status rc-local      
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
   Active: active (exited) since Mon 2018-05-07 14:12:07 UTC; 24min ago
  Process: 178 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)

May 07 14:12:06 remarkable systemd[1]: Starting /etc/rc.local Compatibility...
May 07 14:12:07 remarkable systemd[1]: Started /etc/rc.local Compatibility.
tips/blockwifi.txt · Last modified: 2018/06/27 00:16 by boutil