06-30-2022, 09:35 PM | #46 |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
As far as I know, wfmSetAirplaneMode just sets weather the Wifi is active or not. It doesn't necessarily connect to a network.
You'll want to use wfmConnectWireless or wfmConnectWirelessSilently to connect to a network. Regarding timeout, only a single timeout is supported. It might be getting confused with two. EDIT: hang on, just re-read your script... hmm |
06-30-2022, 09:38 PM | #47 |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Also, are you running the script from NickelMenu with cmd_spawn?
|
Advert | |
|
06-30-2022, 10:23 PM | #48 |
Addict
Posts: 205
Karma: 20980
Join Date: Oct 2020
Device: Kobo Aura One, Aura HD (R.I.P.) :(
|
|
06-30-2022, 10:32 PM | #49 | |
Addict
Posts: 205
Karma: 20980
Join Date: Oct 2020
Device: Kobo Aura One, Aura HD (R.I.P.) :(
|
Quote:
As far as wmWifiEnabled is concerned I don't think it was what I thought it was going to do. If I had this code for example, do I only need to use one -s or will i need a -s on wmNetworkFailedToConnect as well? Code:
qndb -t 50000 -s wmNetworkConnected wmNetworkFailedToConnect -m wfmConnectWirelessSilently |
|
06-30-2022, 11:07 PM | #50 |
Addict
Posts: 205
Karma: 20980
Join Date: Oct 2020
Device: Kobo Aura One, Aura HD (R.I.P.) :(
|
I tried the scrip with the timeout change but at 6min it did not display a msg until I opened a book.
The message was step qndb -m dlgConfirmAccept "Wifi Timer 7" "Enabled Wifi" "OK" Code:
signal07=$(qndb -t 50000 -s wmWifiEnabled -m wfmSetAirplaneMode "enable") Last edited by Rid; 06-30-2022 at 11:11 PM. Reason: forgot to add the msg |
Advert | |
|
07-01-2022, 12:21 AM | #51 |
Addict
Posts: 205
Karma: 20980
Join Date: Oct 2020
Device: Kobo Aura One, Aura HD (R.I.P.) :(
|
Did another test to see if it would eventually time out and it did.
Manually turned off the wifi on the Kobo, turned off my access point. Then ran the the script. It took about 12min50sec to get the "ERROR: timeout" msg. Tested this twice. |
07-01-2022, 12:39 AM | #52 |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Thanks for the reports, I'll have to investigate this when I get time.
|
07-01-2022, 01:40 AM | #53 |
Addict
Posts: 205
Karma: 20980
Join Date: Oct 2020
Device: Kobo Aura One, Aura HD (R.I.P.) :(
|
No worries. Thanks for all the hard work making NickelDBus!!
|
07-28-2022, 06:05 PM | #54 |
Connoisseur
Posts: 76
Karma: 10
Join Date: Jul 2017
Location: Boston
Device: Kobo Libra 2
|
When I telnet into my Kobo Libra 2 and run
Code:
qndb -t 60000 -s pfmDoneProcessing -m pfmRescanBooksFull |
07-28-2022, 06:57 PM | #55 | |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
If you want to do stuff after the content import, you should do it in the shell script if possible. If there is something that you are trying to do in NickelMenu that can't be done in NickelDBus, let me know, and I might be able to add it. |
|
07-28-2022, 07:08 PM | #56 | |
Connoisseur
Posts: 76
Karma: 10
Join Date: Jul 2017
Location: Boston
Device: Kobo Libra 2
|
Quote:
Code:
#!/bin/sh qndb -t 60000 -s pfmDoneProcessing -m pfmRescanBooksFull echo usb plug add >>/tmp/nickel-hardware-status sleep 10 echo usb plug remove >>/tmp/nickel-hardware-status Am I doing it wrong? |
|
07-28-2022, 07:25 PM | #57 | |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
I suggest showing a couple of toasts to see what's going on. Eg: Code:
qndb -m mwcToast 3000 "Faking USB plug" qndb -m mwcToast 3000 "Faking USB unplug" |
|
07-28-2022, 07:35 PM | #58 |
Connoisseur
Posts: 76
Karma: 10
Join Date: Jul 2017
Location: Boston
Device: Kobo Libra 2
|
I actually added toasts before and after each step to see what was happening. It does seem to go very quickly past the pfmRescanBooksFull line. Is it possible that it's dropped off the WiFi so it doesn't find anything to sync? Is there a step I could insert to make sure it's on WiFi before attempting the rescan?
|
07-29-2022, 10:30 AM | #59 |
Connoisseur
Posts: 76
Karma: 10
Join Date: Jul 2017
Location: Boston
Device: Kobo Libra 2
|
I think we can rule out wifi being the issue. I've modified the script as follows:
Code:
#!/bin/sh ifconfig wlan0 up qndb -m mwcToast 3000 "Checking wifi" if ( ifconfig|grep 'inet addr' ) then qndb -m mwcToast 3000 "WiFi on" else qndb -m mwcToast 3000 "WiFi off, waiting" sleep 5 fi if ( ifconfig|grep 'inet addr' ) then qndb -m mwcToast 3000 "WiFi on" else qndb -m mwcToast 3000 "WiFi still off" fi qndb -m mwcToast 3000 "Rescanning library" qndb -t 60000 -s pfmDoneProcessing -m pfmRescanBooksFull qndb -m mwcToast 3000 "Autoshelfing" echo usb plug add >>/tmp/nickel-hardware-status # Simulate plugging in the usb sleep 10 echo usb plug remove >>/tmp/nickel-hardware-status # Simulate the disconnect of our simulated usb, takes a few sec after the sleep for the change to show up on the device qndb -m mwcToast 3000 "Done" |
07-29-2022, 05:04 PM | #60 |
Connoisseur
Posts: 76
Karma: 10
Join Date: Jul 2017
Location: Boston
Device: Kobo Libra 2
|
I think I've figured it out. The KoboCloud sync script immediately forks on execution, so there is never time for it to complete before the usb unplug/plug occurs. I modified the KoboCloud script to disable forking, and now it seems to work as expected.
|
Tags |
kobo, ldpreload, nickel |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
'RUN, RUN, RUN' a crime thriller $1.61 | tothepoint | Self-Promotions by Authors and Publishers | 10 | 09-01-2014 01:07 PM |
Calibre: Bus error | migdus | Calibre | 7 | 08-16-2011 12:58 AM |
/proc/bus/usb ? | troymc | Calibre | 3 | 09-05-2009 11:35 AM |