Saturday, September 29, 2012


In the waning summer days since my last blog update I suffered two crushing laptop failures.  Although neither laptop is completely dead, both are pretty much useless to me in their current state.  First, my ancient PIII thinkpad decided it would only run for 3 minutes before an abrupt shutdown.  Very frustrating.  I can just barely open all the windows needed for openwrt coding and then, bam, it's done.  A mere 2 days later the NVIDIA graphics chip fritzed out on my old Dell 620 (the one with the IZ2S development VM).  The poor thing still boots and runs, but I can't see what it's doing.  I'm gonna try to  dismantle it someday and reflow the solder to the graphics chip.  But that won't likely happen for a long time, if ever...

So now I'm down to an early EeePC netbook and a bunch of zipits.  That's just barely enough to workaround my laptop problem, but it'll have to do.  Since I was fresh off a successful rockbox build on the openwrt zipit, I figured that I might as well soldier on with that compiler and see what else it could do.  Unfortunately I tend to work much faster with a real keyboard.  The EeePC keyboard is extremely cramped but I can still sorta touch type without too much pain.  So the first thing I did was to build all the SDL libs on the netbook.   Now I can tinker on the EeePC first, before committing to work on the zipit.

Around the time of the laptop meltdown I managed to convince slug to rebuild the SDL library on his jffs and drop DirectFB to save a whole bunch of space.  I'm thinking a small build of the links browser would be a much better use of the precious jffs space.  But anyhow, he got it working only to discover he needed a way to do the splash screen without DirectFB.  So I poked around and found imgv, already in the openwrt packages.  It uses SDL for the graphics and has some nice features, but was lacking a command line interface that would allow it to run a timed splash screen.  I couldn't imagine an easier project to practice with the native compiler on the zipit.  In almost no time we had a working SDL splash screen and slideshow program, and slug made us a new rc12 jffs with plenty of room to grow.

Then walrus45 followed up on my imgv work and pointed out there was also a zgv openwrt package that could use some lovin.  Once upon a time I took a stab at building zgv for IZ2S because of the spiffy thumbnail image selector, but never got it to do much of anything.  For some reason, this time it was easy.  I just configged it to use SDL instead of svgalib, tweaked the fileselector to fit better in 320x240, and miraculously it all seems to work.  I still gotta get my changes worked up into an openwrt patch for github and the official packages.  Then maybe I'll try and build it with the native compiler on an IZ2S zipit.

You can fit up to 8 thumbnails on screen with the current set of hacks.  Originally it was limited to 2 thumbnails at 320x240, which (as you could imagine) was not terribly useful.  Here it is, zoomed to fullscreen on an old cell phone picture of the dog.  I haven't yet played with the slideshow feature to see how it compares to imgv.

Speaking of beagles...   Also around this time beaglebreath resurfaced and got me going again on the gpio code.  We eventually worked out that the kernel needed a small patch to enable the CIF camera gpios for use in sysfs.  Mozzwald supplied the patch, Slug whipped up a new kernel and voila, the gpios were working.  I managed to build some gpio testing hardware (no solder required ;) and beaglebreath got his weather sensor working on his openwrt zipit.  I'd still like to see if picoc can handle the timing requirements, because I think it'd be cool to have a full gpio prototyping setup on a zipit with no SD card.
 Here's my solder-free gpio test rig.  It's a bit unwieldy but I needed a way to include the pull up resistor to make the open collector gpio pins work.  The three clips on teeny tiny pins of the zipit connector had a habit of falling off whenever I tried to type a gpio sysfs command on the zipit.

Next up, maybe I'll get back to work on the flipclock.  I noticed that dronz recently added a fancy new timezone script to the the goodie bag.  Perhaps I'll try and fold the clock into gmu, with an internet radio scanner based on a shoutcast website that walrus45 pointed out.  Apparently this page works in the links browser, without javascript, although I don't have it working yet.  I tried to set it up via the links menu.  I went to setup>associations, selected "Add" to create a new association for the audio, and then created a new association with these settings:

  "Label":  shoutcast-pls
  "Content-Types(s)":  audio/x-scpls
  "program":  mpg123 -C@ %

I also unchecked something about X-Windows.  It didn't work at first, so I went back to the setup menu and picked "Save Options".  That seemed to do the trick.  Now I need to figure out how to control it better.  For example, Alsa Mixer lets me change the volume, but its a challenge to get there.

Here's the goodies (not much, really):

A zgv executable for openwrt (I still need to update the patches on github)
An imgv ipk for openwrt.


  1. Bonjour,
    I found this website: and I will try
    this with iz2jffs.

  2. Nice find. Very concise website that looks perfect for browsing from the zipit. I will also try it on the iz2jffs when I get a chance. I might even try it with the non-graphical browsers since there aren't any pictures. That should free up plenty of memory for the music player.

  3. Yes ! links plays ! I have added another association with
    "Content-Types(s)": audio/x-mpegurl to play the m3u lists.
    I can switch terminals and have control on mpg123 for vol,
    and q if I want to test another stream. mpg123 runs on tty2.
    But...links & glinks leaves tty2 without echo after quitting.
    Any idea ?

  4. Thanks for reminding me that mpg123 has built in volume control. That made me search a bit harder for a better description of the controls.

    Could you pastebin the association section of your links.cfg file so I can see your m3u setup?

    I'll have to check with htop to see what it says about the tty of the mpg123 process. I suspect it's left without control of the tty after links quits. This might be fixable by running mpg123 with oneit or owntty on a different tty.

    If I do not launch (g)links from gmenu, but from
    its terminal, tty2 is left clean. If I launch it
    from gmenu, after quitting tty2 works but I can't
    see what I am typing on it.
    Did you see the new timezone script in the goodibag ?

  6. I did see the new timezone script. It's mentioned above, probably added during one of my editing sessions. I'm not a particularly good writer, so it usually takes me a few days after I first post a blog entry to get it right.

  7. Try this mpg123tty4 script instead of mpg123 in the links association.

    It runs mpg123 on tty4 so Ctrl-alt-home followed by alt-left should get you there if you want to control it.

  8. The previous site I mentionned is sorted by places.
    This one is sorted by genres:
    Your script works, but I might add -C after mpg123
    to have the control enabled. Thanks !

  9. I I deliberately left out the -C from the script so it can also be used with -C for a file, or -with -C@ for a playlist. Put "mpg123tty4 -C@ %" in the links association for the playlist type and the -C@ will be passed through the script to the mpg123 executable. This way you can use the same script for associations for a single file, or for a playlist. You can also use the script for either a file or a playlist on the command line.

    Thanks for finding the internet sites. I'm adding them all to my home page of handy mobile websites.