![]() |
#1 |
Member
![]() Posts: 10
Karma: 10
Join Date: Nov 2024
Device: Kobo Touch
|
Kobo Touch Browser for permanent Display - Wifi issues
Dear all,
I would like to use my old Kobo touch as permanent display for a DIY weather station. In short, I would like to display a (local) HTML page in the built-in browser, which refreshes every minute. I already activated "Force Wifi on" in Nickel Menu and/or Developer options. However, Wifi is lost randomly. As a consequence, the webpage is "stuck" and does not refresh anymore. Manual refresh is necessary. I have a small bash script running (installed via telnet), which frequently turns on and off the wifi Code:
#Interface name of your WiFi adapter INTERFACE="wlan0" # Endless loop while true do echo "Disabling WiFi..." ifconfig $INTERFACE down sleep 9 echo "Enabling WiFi..." ifconfig $INTERFACE up sleep 60 done My question: - does anyone have further clues, how to improve the Wifi connectivity? - would an alternative browser maybe be an option? Are there any instructions? |
![]() |
![]() |
![]() |
#2 |
Member
![]() Posts: 10
Karma: 10
Join Date: Nov 2024
Device: Kobo Touch
|
as this might be better off in the "Kobo Developer's Corner":
(how) am I able to move this thread? |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Consider your request as asked and done.
|
![]() |
![]() |
![]() |
#4 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 239
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
Sounds like previous projects...just a quick browse down mobileread lane gives:
https://www.mobileread.com/forums/sh...d.php?t=359178 https://www.mobileread.com/forums/sh...d.php?t=357690 https://www.mobileread.com/forums/sh...d.php?t=352789 Someone suggested to just keep one rendered image in Screenshot folder, image persists while power off, then you update by replacing it when you power on? Last edited by elinkser; 11-28-2024 at 02:47 PM. |
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 10
Karma: 10
Join Date: Nov 2024
Device: Kobo Touch
|
Thanks a lot for the feedback. As my solution works quite well - except for the Wifi issues, I would like to dig a bit deeper here.
The following would help me: Does anyone have a clue, how to - autostart the browser in fullscreen mode on reboot? (what is the console command?) - automatically set the orientation to inverted_landscape on reboot?(what is the console command?) Then I would simply reboot, when the issues occur. This usually helps. Many thanks in advance. Last edited by kobotouch2711; 11-30-2024 at 01:21 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 239
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
No problem!
I wasn't sure how relevant it was, but I recall the WiFi issue coming up in at least one of those cases: https://www.mobileread.com/forums/sh...d.php?t=352896 It looks like NickelDBus has the browser function. https://shermp.github.io/NickelDBus/ndb-ndbdbus.html Maybe you or the author can add the screen orientation function by recompiling with the NickelTC and using the NickelMenu code as guide? Then we would all benefit from the new feature! * other possibilies: use Kobo patch approach? render web page in fbpdf instead of browser (I compiled a binary, but you need to convert web page to epub or image if you want the images - at that point probably simpler just to render to image,lol https://github.com/aligrudi/fbpdf https://www.mobileread.com/forums/sh...2&postcount=16 Last edited by elinkser; 12-01-2024 at 09:38 AM. |
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 10
Karma: 10
Join Date: Nov 2024
Device: Kobo Touch
|
Thanks a lot. Unfortunately, recompiling currently is too much for my skills
![]() Could you assist me, how to automatically load this script. I generated in /etc/init.d/startbrowser.sh (with chmod +x permissions). However, this is not automatically loaded on reboot. Where do I have to register this script? Code:
#!/bin/bash . /etc/init.d/functions start() { qndb -m bwmOpenBrowser & } stop() { echo "nothing executed at stop" & } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; status) ;; *) echo "Usage: $0 {start|stop|status|restart}" esac exit 0 Last edited by kobotouch2711; 12-02-2024 at 05:17 AM. Reason: formatting |
![]() |
![]() |
![]() |
#8 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 239
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
The WiFi issues, I think the other projects just added a delay.
Another one: https://www.mobileread.com/forums/sh...d.php?t=322162 Same would apply to NickelDBus scripts I imagine. E.g. instead of invoking it directly, call another script (e.g."/usr/local/bin/myscript.sh &") that does a "sleep 100" or something before it invokes the NickelDBus command. I saw an example done using udev. https://www.mobileread.com/forums/sh...1&postcount=29 https://www.tutorialspoint.com/how-t...-on-udev-event Last edited by elinkser; 12-02-2024 at 12:04 PM. |
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 10
Karma: 10
Join Date: Nov 2024
Device: Kobo Touch
|
Thanks for your efforts. I cannot image, where to put a delay with my problem. Once the browser is loaded, javascript refreshes the page every 20s on its own. However, after a few hours, Wifi connection is dropped (and obviously lost permanently) and the webpage "freezes".
Concerning autostart on boot with udev. My approach was the following, but it fails ![]() "/etc/udev/rules.d/99-mmcblk0p3-autostart.rules ": Code:
KERNEL=="mmcblk0p3", ACTION=="add", RUN+="/etc/init.d/startbrowser.sh start" |
![]() |
![]() |
![]() |
#10 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 239
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
# cat /etc/udev/rules.d/99-mmc.rules
Code:
KERNEL=="loop0", RUN+="/bin/sh /etc/init.d/startbrowser.sh &" Code:
/bin/touch /mnt/onboard/.adds/hi0 sleep 20 /bin/touch /mnt/onboard/.adds/hi20 # cd /mnt/onboard/.adds/ # ls hi* hi0 # ls hi* hi0 # ls hi* hi0 hi20 |
![]() |
![]() |
![]() |
#11 | |
Member
![]() Posts: 10
Karma: 10
Join Date: Nov 2024
Device: Kobo Touch
|
Quote:
FYI: My mount looks like the following: Code:
[root@kobo .adds]# mount rootfs on / type rootfs (rw) /dev/root on / type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered) none on /proc type proc (rw,relatime) none on /tmp type tmpfs (rw,relatime) none on /dev type tmpfs (rw,relatime) none on /var/lib type tmpfs (rw,relatime,size=16k) none on /var/log type tmpfs (rw,relatime,size=16k) none on /var/run type tmpfs (rw,relatime,size=128k) none on /sys type sysfs (rw,relatime) /dev/mmcblk0p3 on /mnt/onboard type vfat (rw,noatime,nodiratime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro) devpts on /dev/pts type devpts (rw,relatime,mode=600) |
|
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 10
Karma: 10
Join Date: Nov 2024
Device: Kobo Touch
|
Sorry for starting "a new topic" within this thread, but i realized a very odd behaviour.
I currently run the following script on my kobo Code:
#your Wi-Fi network details LOG_FILE="/my2job.log" log_message() { local MESSAGE="$@" echo "$(date +"%Y-%m-%d %H:%M:%S") : $MESSAGE" >> "$LOG_FILE" } INTERFACE="wlan0" # The IP address to ping HOST="192.168.0.1" # Function to reconnect to Wi-Fi reconnect_wifi() { log_message "Host is not reachable. Reconnecting to WiFi" echo "Host $HOST is not reachable. Reconnecting to Wi-Fi..." /usr/bin/qndb -m wfmSetAirplaneMode toggle; log_message "Airplane toggle (WIFI to off). Now sleep for 10s" echo "Airplane toggle (WIFI to off). Now sleep for 10s" sleep 10 ; /usr/bin/qndb -m wfmSetAirplaneMode toggle ; log_message "Airplane toggle (WIFI to on). Now sleep for 10s" echo "Airplane toggle (WIFI to on). Now sleep for 10s" sleep 10; /usr/bin/qndb -m wfmConnectWirelessSilently; log_message "1st attempt to connect wirelessly." echo "1st attempt to connect wirelessly." sleep 20; /usr/bin/qndb -m wfmConnectWirelessSilently; log_message "2nd attempt to connect wirelessly." echo "2nd attempt to connect wirelessly." sleep 20; /usr/bin/qndb -m wfmConnectWirelessSilently; log_message "3rd attempt to connect wirelessly." echo "3rd attempt to connect wirelessly." log_message "Wifi hopefully reconnected. Starting browser and sleep for 5s" echo "Wifi hopefully reconnected. Starting browser and sleep for 5s" /usr/bin/qndb -m bwmOpenBrowser; sleep 5; } while true; do # Ping the host ping -c 1 $HOST > /dev/null 2>&1 # Check the ping result if [ $? -ne 0 ]; then reconnect_wifi else echo "Host $HOST is reachable." fi # Wait for 10 seconds before the next ping sleep 10 done Code:
2024-12-03 10:48:29 : Host is not reachable. Reconnecting to WiFi 2024-12-03 10:48:29 : Airplane toggle (WIFI to off). Now sleep for 10s 2024-12-03 11:26:00 : Airplane toggle (WIFI to on). Now sleep for 10s 2024-12-03 11:26:59 : 1st attempt to connect wirelessly. 2024-12-03 11:27:19 : 2nd attempt to connect wirelessly. 2024-12-03 11:27:39 : 3rd attempt to connect wirelessly. 2024-12-03 11:27:39 : Wifi hopefully reconnected. Starting browser and sleep for 10s Now the most interesting question: Does anyone have a clue, why Kobo keeps sleeping "forever" after the first Airplane toggle until I hit the home button? If i fixed this, there is hopefully no need to restart device and autostart the browser on startup as in the previous post. By the way: I assume heavily, that this is the same "freeze" as in the script from my first post. Last edited by kobotouch2711; 12-03-2024 at 05:40 AM. |
![]() |
![]() |
![]() |
#13 | |
Member
![]() Posts: 10
Karma: 10
Join Date: Nov 2024
Device: Kobo Touch
|
Quote:
I could reproduce and must refine: Now the most interesting question: Does anyone have a clue, why Kobo keeps sleeping "forever" after the first Airplane toggle until I open the WIFI menu "by hand"? (only opening, not selecting any network on my own) |
|
![]() |
![]() |
![]() |
#14 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 239
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
Sounds like you will have to poke around a bit.
A fun experiment would be to send virtual touch events to your device to simulate the effect of the buttons. |
![]() |
![]() |
![]() |
#15 | |
Member
![]() Posts: 10
Karma: 10
Join Date: Nov 2024
Device: Kobo Touch
|
Quote:
And feedback in the udev issue? |
|
![]() |
![]() |
![]() |
Tags |
browser, kobo-touch, wifi |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting battery, Wifi, and display issues | PaulB223 | Amazon Kindle | 0 | 08-17-2022 10:41 AM |
Diagnosing Kobo touch issues [non-responsive to touch] | emacsomancer | Kobo Reader | 4 | 02-21-2021 10:12 AM |
Kobo wifi PNG display | AMB-ereader | Kobo Developer's Corner | 10 | 03-21-2016 07:56 PM |
Kobo touch WIFI permanent aktivieren | koboman | Andere Lesegeräte | 0 | 09-08-2012 05:51 AM |
Touch - Cover display issues resolved at last | Hoods7070 | Kobo Reader | 0 | 05-20-2012 06:26 AM |