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
http://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
Old 02-29-2016, 08:39 AM   #153
KristianR
Junior Member
KristianR began at the beginning.
 
Posts: 4
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 (http://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
Junior Member
KristianR began at the beginning.
 
Posts: 4
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
Old 03-10-2016, 05:03 AM   #156
embryo
Addict
embryo is generous with chocolateembryo is generous with chocolateembryo is generous with chocolateembryo is generous with chocolateembryo is generous with chocolateembryo is generous with chocolateembryo is generous with chocolateembryo is generous with chocolateembryo is generous with chocolateembryo is generous with chocolateembryo is generous with chocolate
 
embryo's Avatar
 
Posts: 337
Karma: 33880
Join Date: Aug 2013
Device: Kobo Glo
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
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 01:31 AM.


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