Search

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

tips:blocking_wifi_from_starting [2022/04/16 09:20]
baolitoumu 创建
— (当前版本)
行 1: 行 1:
-====== 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. 
- 
-**Edit: the tip has been obsolete since this issue was solved with the version 1.5.1 of codex, released on 17 September 2018** 
- 
-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. 
- 
-  - Create a file called /etc/rc.local in the reMarkable root filesystem  
-    <code>  
-    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 
-    </code> 
-  - Mark the rc.local file as executable 
-    <code> 
-    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 
-    </code> 
-  - 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". 
-  - 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: 
-<code> 
-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. 
-</code> 

Page Tools

Site Tools

User Tools