Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-08-2016, 09:26 PM   #151
Khord
Junior Member
Khord began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2016
Device: Kobo Wifi
Quote:
Originally Posted by PeterT View Post
I'll check into it later. Remember though I've never actually installed it on a Kobo.
Actually, the url error turned out to just be a DNS problem on my end, and its supposed to stay mintemp / maxtemp. Sorry for the bother, and thanks for your original tips

Last edited by Khord; 01-08-2016 at 09:32 PM.
Khord is offline   Reply With Quote
Old 01-08-2016, 09:52 PM   #152
Khord
Junior Member
Khord began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2016
Device: Kobo Wifi
On another note, I get an error when trying to run the autoupdate script on the original post:

Code:
crond: applet not found
https://www.mobileread.com/forums/sho...d.php?t=230489

Last edited by Khord; 01-08-2016 at 10:00 PM.
Khord is offline   Reply With Quote
Advert
Old 02-29-2016, 08:39 AM   #153
KristianR
Member
KristianR began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Feb 2016
Device: none
Hi there,

I hope this thread is still active. I'm trying to get this weatherdisplay to run on a Kobo Glo HD (FW: 3.19.5613), but I ran into several problems.

- I managed to gain telnet and ftp-access -> OK
- I tried the following packages (the one referenced in the first post, the one intended for the touch and the supplied by david_weese) -> always had problems with import of pygame (python crashed at this point)
- Removed python and tried the python-installation for FW 2.6+ supplied by kevin_short (https://www.mobileread.com/forums/sho...d.php?t=219173) -> with this installation import of pygame works
- Text rendering does not seem to work for me. I tried the minimal example at http://pastebin.com/4Erz9kqf but I always get a error message ("couldn't find glyph")
- So I commented out all textrendering-parts to test the rest and image-update process
- Next problem is that the program hangs at pygame.display.set_mode, requiring a ctrl-c at the telnet console. If I hit ctrl-c the program resumes and obviously works. With this I managed to update the display an draw the lines that are used to separate the entries for the different days

Did anyone manage to get this to work on a Glo HD? Can anyone point me into a direction what needs to be adapted?

Kind regards
KristianR
KristianR is offline   Reply With Quote
Old 03-09-2016, 12:36 PM   #154
KristianR
Member
KristianR began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Feb 2016
Device: none
I would like to report some progress on the weatherdisplay on the Glo HD:

Regarding the problem with textrendering I made the following observations:
  • Outputting an empty string like "" worked
  • Output of a single charakter like "T" worked
  • Output of more than one charakter like "Test" failed
  • Output with antialiasing turned off always worked - I can live with that so far

Regarding the pygame.display.set_mode requiring a ctrl-c I found a "hack" on http://stackoverflow.com/questions/1...o-init-display where a keyboard-interrupt is issued: I implemented this into the script and it works for me.

After adjusting the coordinates of the textfields and the graphics I manage to get the Glo HD to display a weatherforecast when I call the pythonscript from the telent-console.

Aftter that I tried the following:
  • Run the script in a loop, refreshing every 5
    minutes for testing purposes. This works for a while but breaks after about half an hour to an hour.
  • Experimenting with rtcwake. Interestingly calling
    Code:
    rtcwake -m mem -s 1800
    works out of the box on the Glo HD. I.e. the device wakes up. I verified this by refreshing the screen and writing some log entries. BUT: I don't manage to get the wifi running again.
  • I did not unload the wifi-modules because I get an error-message if I try to "insmod" them after the wake-up (probably missing environment variables?). Since lsmod tells me that they are still loaded I thought it should work without prior unloading. By the way the paths to the wifi-modulse differ on the Glo HD
    Code:
    	INTERFACE=eth0
    	WIFI_MODULE=dhd
    	WIFI_MODULE_PATH=/drivers/mx6sl-ntx/wifi/dhd.ko
    	PLATFORM=mx6sl-ntx
    	WIFI_MODULE_PATH=/drivers/mx6sl-ntx/wifi/dhd.ko
    	PRODUCT=alyssum
  • Using the following code for restarting the wifi
    Code:
    ifconfig eth0 up 
    sleep 10
    wlarm_le -i eth0 up 
    sleep 5
    wlarm_le -i wl0 up
    sleep 10
    wpa_supplicant -s -i eth0 -c /etc/wpa_supplicant/wpa_supplicant.conf -C /var/run/wpa_supplicant -B sleep 2 
    udhcpc -S -i eth0 -s /etc/udhcpc.d/default.script -t15 -T10 -A3 -f -q
    after the wakeup I get the following errors
    Code:
    wakeup from "mem" at Mon Mar  7 19:22:23 2016
    
    wlarm_le: wl driver adapter not found
    wlarm_le: wl driver adapter not found
    ioctl[SIOCSIWPMKSA]: Invalid argument
    ioctl[SIOCSIWMODE]: Invalid argument
    ioctl[SIOCGIWRANGE]: Invalid argument
    ioctl[SIOCGIWMODE]: Invalid argument
    ioctl[SIOCSIWPMKSA]: Invalid argument
    udhcpc (v1.22.0.kobo) started
    Sending discover...
    Sending discover...

Hope the first part might help someone who is alos trying to get the weatherdisplay to run on a Glo HD.

For the second part any help or pointers how I could get this running would be greatly appreciated. The main question for me right now is:
  1. How do I get wifi running after suspend

Also interesting, but no priority
  1. Why is this keyboard interrupt needed with pygame.display.set_mode ?
  2. Why does antialiasing not work?

Thanks in advance and kind regards
KristianR


edit 09.03.2016 / 22:22:
It seems to work now. This time I added the insmod and set the environment-Variables I extracte from the rCS-file and added several sleep-statements. If I know for sure what made it work I will report back

Last edited by KristianR; 03-09-2016 at 04:24 PM.
KristianR is offline   Reply With Quote
Old 03-09-2016, 11:33 PM   #155
Khord
Junior Member
Khord began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2016
Device: Kobo Wifi
Seem to be getting some kind of pygame error opening the image all of a sudden. Was working fine for 2 months, stopped working yesterday, and upon investigation I find this:

Code:
Kobo Wifi weather forecast started.
Getting weather information . . .
Creating image . . .
Traceback (most recent call last):
  File "weather.py", line 364, in <module>
    get_weather_data()
  File "weather.py", line 109, in get_weather_data
    display(days, highs, lows, conditions, img_links, unit)
  File "weather.py", line 167, in display
    image = pygame.image.load(img_links[0])
pygame.error: Couldn't open icons/.png
Anyone have any idea?

Maybe something to do with some error in here getting the icons?
Code:
icons = dom.getElementsByTagName('weatherIconUrl')[1:]
    img_links = []
    for i in icons:
        try:
            link = "icons/" + str(i.firstChild.nodeValue)[72:]
        except AttributeError as error:
            print("Error getting icon links: " + str(error))
        img_links.append(link)
Happened again on another try, this time with the following file name:
Code:
pygame.error: Couldn't open icons/y_with_light_rain.png
It looks like some how "cloud" got cut off from "cloudy_with_light_rain", not sure how to fix this. The files are right in the icons folder, but the script has the wrong variable name for that or perhaps all elements in img_links.

Last edited by Khord; 03-10-2016 at 03:33 AM.
Khord is offline   Reply With Quote
Advert
Old 03-10-2016, 05:03 AM   #156
embryo
Fanatic
embryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbitembryo with a running start, can leap into geosynchronous orbit
 
embryo's Avatar
 
Posts: 509
Karma: 60774
Join Date: Aug 2013
Device: Kobo Glo, GloHD
You could replace the
Code:
link = "icons/" + str(i.firstChild.nodeValue)[72:]
with
Code:
link = "icons/" + str(i.firstChild.nodeValue)[67:]
This will might fix the "cloud" cut and maybe the empty png filename.
embryo is offline   Reply With Quote
Old 03-10-2016, 05:58 PM   #157
Khord
Junior Member
Khord began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2016
Device: Kobo Wifi
Quote:
Originally Posted by embryo View Post
You could replace the
Code:
link = "icons/" + str(i.firstChild.nodeValue)[72:]
with
Code:
link = "icons/" + str(i.firstChild.nodeValue)[67:]
This will might fix the "cloud" cut and maybe the empty png filename.
That doesn't seem to work:
Code:
pygame.error: Couldn't open icons/0017_cloudy_with_light_rain.png
Reverted and tried again (I hadn't tried at all today). For whatever reason, it started working again on 72. Bizarre, maybe there was some mistake in the API for a few days. Thanks anyway though.
Khord is offline   Reply With Quote
Old 03-13-2016, 05:34 PM   #158
adysan
Junior Member
adysan began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2016
Device: Kobo Wifi
Got this working, then display went black

So I got this working according to the instructions, everything went really well. Then I kept the Kobo Wifi connected to the USB port to charge it for a while. After an hour or so, the display became a little darker, I thought it was some sort of screen saver. After some more time, this display went completely black. Now it doesn't respond to button presses anymore.

It wont show up on wifi, hard reset with a pin doesnt work, the charging light does turn on (magenta, then red?) when connected to USB, but it won't show up as an drive anymore. Did I just brick my Kobo?
adysan is offline   Reply With Quote
Old 07-16-2016, 01:34 PM   #159
sifourquier
Junior Member
sifourquier began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2016
Device: Kobo glo HD
Quote:
Originally Posted by KristianR View Post
after the wakeup I get the following errors
Code:
wakeup from "mem" at Mon Mar  7 19:22:23 2016

wlarm_le: wl driver adapter not found
wlarm_le: wl driver adapter not found
ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCSIWMODE]: Invalid argument
ioctl[SIOCGIWRANGE]: Invalid argument
ioctl[SIOCGIWMODE]: Invalid argument
ioctl[SIOCSIWPMKSA]: Invalid argument
udhcpc (v1.22.0.kobo) started
Sending discover...
Sending discover...
Hi I make a other sript and i have sam error but after long try a have restor wifi

Code:
while :
do
    #echo "ch 4" > /sys/devices/platform/pmic_light.1/lit
    #echo "dc 4" > /sys/devices/platform/pmic_light.1/lit
    rmmod sdio_wifi_pwr
    rmmod dhd
    sleep 1
    insmod /drivers/mx6sl-ntx/wifi/sdio_wifi_pwr.ko
    insmod /drivers/mx6sl-ntx/wifi/dhd.ko
    #ifconfig eth0 up 

    wpa_supplicant -s -i eth0 -c /etc/wpa_supplicant/wpa_supplicant.conf -C /var/run/wpa_supplicant -B 
    ifconfig eth0 add 192.168.0.236
    #udhcpc -S -i eth0 -s /etc/udhcpc.d/default.script -t15 -T10 -A3 -f -q

    sleep 15
    killall wpa_supplicant > /dev/kmsg
    wlarm_le -i eth0 down 
    ifconfig eth0 down
    sleep 5

    rtcwake -a -m mem -s 10
    #echo "dc 0" > /sys/devices/platform/pmic_light.1/lit
    
    sleep 1
done
I think you can adapte

Warning i use static ip (dhcp take many time)

For dhcp comment ifconfig eth0 add 192.168.0.236
and uncomment udhcpc -S -i eth0 -s /etc/udhcpc.d/default.script -t15 -T10 -A3 -f -q
sifourquier is offline   Reply With Quote
Old 06-05-2017, 06:51 AM   #160
KristianR
Member
KristianR began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Feb 2016
Device: none
Hi there,

it seems that since begin of june the free version of the worldweatheronline-API got disabled. I get this response and can't find a free offer on their website anymore:

Code:
<data><error><msg>API key has been disabled.</msg></error></data>
Anyone else experiencing this problem? Any recommendations for a good weatherservice still offering a free API?

Kind regards
Kristian
KristianR is offline   Reply With Quote
Old 06-13-2017, 11:14 AM   #161
andyh2000
Avid reader
andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.andyh2000 ought to be getting tired of karma fortunes by now.
 
andyh2000's Avatar
 
Posts: 824
Karma: 6377682
Join Date: Apr 2009
Location: UK
Device: Samsung Galaxy Z Flip 4 / Kindle Paperwhite
Quote:
Originally Posted by KristianR View Post
Hi there,

it seems that since begin of june the free version of the worldweatheronline-API got disabled. I get this response and can't find a free offer on their website anymore:

Code:
<data><error><msg>API key has been disabled.</msg></error></data>
Anyone else experiencing this problem? Any recommendations for a good weatherservice still offering a free API?

Kind regards
Kristian
I've just discovered http://openweathermap.org/api who offer a free API. It doesn't have free daily forecasts but it does have free current weather conditions or 3-hourly forecasts for the next 5 days. I've yet to actually try it out so I've no idea how accurate they are.

Andrew
andyh2000 is offline   Reply With Quote
Old 06-17-2017, 12:43 PM   #162
KristianR
Member
KristianR began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Feb 2016
Device: none
Quote:
Originally Posted by andyh2000 View Post
I've just discovered http://openweathermap.org/api who offer a free API. It doesn't have free daily forecasts but it does have free current weather conditions or 3-hourly forecasts for the next 5 days. I've yet to actually try it out so I've no idea how accurate they are.

Andrew
Hi,

I stumbled upon that site as well. So far I did not try it out. Since I rather look up the weather on my mobile I am not sure if its worth the effort to adapt the script to a new service.

Kristian
KristianR is offline   Reply With Quote
Old 08-23-2018, 08:09 AM   #163
insanoff
Junior Member
insanoff began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2018
Device: Kobo Touch
Question How to connect KOBO to WIFI without updating it?

Hi folks,

I bought an used Kobo Touch Mini to try this weather forecast and play a little bit programming it with Python. It came factory reseted. Firmware version is 1.9.11.

The problem is, there is no option to connect it to WIFI without updating. It needs to be connected to computer in order to make it possible. But when I do it immediately starts downloading latest firmware which I don't want to have.

I presume the WIFI connection information is stored in DB file BookReader.sqlite, which is password protected.

Anyone knows how to avoid update and still connect it to WIFI network?

Thanks!
insanoff is offline   Reply With Quote
Old 08-23-2018, 09:27 AM   #164
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by insanoff View Post
Hi folks,

I bought an used Kobo Touch Mini to try this weather forecast and play a little bit programming it with Python. It came factory reseted. Firmware version is 1.9.11.

The problem is, there is no option to connect it to WIFI without updating. It needs to be connected to computer in order to make it possible. But when I do it immediately starts downloading latest firmware which I don't want to have.

I presume the WIFI connection information is stored in DB file BookReader.sqlite, which is password protected.

Anyone knows how to avoid update and still connect it to WIFI network?
No, the WiFi information is stored on the root partition of the device. It isn't accessible when the device is connected to a PC. If you want to look at it, you need to enable telnet or something similar. The BookReader.sqlite is something from fairly recent firmware and is used for either the OD integration or Kobo Plus.

As to not upgrading, there are patches for more recent firmware. Or you could try adding a host file entry pointing to something other than the Kobo server. There has been a lot of discussion about this over the years, but I don't remember details for the 1.9.x firmware.
davidfor is offline   Reply With Quote
Old 08-24-2018, 06:20 AM   #165
insanoff
Junior Member
insanoff began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2018
Device: Kobo Touch
Quote:
Originally Posted by davidfor View Post
No, the WiFi information is stored on the root partition of the device. It isn't accessible when the device is connected to a PC. If you want to look at it, you need to enable telnet or something similar. The BookReader.sqlite is something from fairly recent firmware and is used for either the OD integration or Kobo Plus.

As to not upgrading, there are patches for more recent firmware. Or you could try adding a host file entry pointing to something other than the Kobo server. There has been a lot of discussion about this over the years, but I don't remember details for the 1.9.x firmware.
Could you explain a bit more about firmware patch? Maybe some link?
insanoff is offline   Reply With Quote
Reply

Tags
hacking, kobo wifi

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd; Kobo-purchased book reads fine on Desktop, WiFi and Sony -but not on Kobo Touch. beautifulsoup Kobo Reader 4 07-17-2012 09:29 AM
Kobo Touch in cold weather Judsuw General Discussions 15 06-02-2012 06:23 PM
Sync epubs between Kobo app and Kobo wifi? emilikins Kobo Reader 1 11-17-2011 04:12 PM
Kobo Desktop App v1.7 onboard Kobo WiFi ZombWii Kobo Reader 6 10-20-2010 12:24 PM
Forrester upgrades sales forecast by 50% xoox News 0 10-10-2009 04:11 AM


All times are GMT -4. The time now is 06:07 AM.


MobileRead.com is a privately owned, operated and funded community.