View Single Post
Old 03-09-2016, 12:36 PM   #154
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 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
    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
  • Using the following code for restarting the wifi
    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
    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

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