Monday, December 1, 2014

Two Steps Back...

Seems like only yesterday I installed a brand new 500GB harddisk in my tired old laptop so I'd have plenty of room to work on the zipit stuff.  But apparently it was in there for almost exactly two years last week when it suddenly decided that was enough.  Looking back I suppose it wasn't all that sudden.  It started humming a few hours before it froze, but at the time I thought it was the CPU fan.  Oh well, live and learn.  Shoulda done more frequent backups.

The most recent backup of my iz2s development VM was over 6 months old, and the openwrt backup was even older.  Ouch.  So I dug up a much smaller, slower drive from my junk pile and put the latest LMDE linux on it to get back up and running before the long holiday weekend.  Turns out the 500GB drive wasn't completely dead yet.  I could run it for a few minutes as an external usb drive before it would seize up, just long enough to pull off the iz2s dev stuff.  Phew!  Openwrt was another story though.  I tried a few times, but never got more than half of it.  I gotta think about it before I try again so I don't brick the drive first.  Maybe I can use rsync to resume where the last attempt gave up?  Then I need to come up with a better backup strategy for the long term that plays well with my inherent laziness.  

Meanwhile I had to test the restored iz2s VM and make sure all was well.  I was already running out of holiday so I chose an easy target.  I saw the wetspot2 game mentioned in the recent releases section of the gcw zero forums and thought it might be fun on the zipit.  Since it was developed in C and SDL it looked like a good fit.  The game compiled ok right out of the box, but I eventually tweaked the makefile a teensy bit for the zipit.  Then I changed the 2 player keyboard settings to get a little more separation on the cramped iz2s keyboard, but that was it.
Single player mode uses the dpad arrows to move the crab and the control key (...) to push the blocks.  For two players the tab (Zipit) key is used to move the blocks for player 1.  Player  2 gets the S, Control, Z, and X keys to move the crab, and the space bar to push the blocks.  I actually tried this with one of the kids and it's not too bad.  The player with the arrow keys has a slight advantage though.  I know this because I had the other keys and lost.  It had to be the keys.



Oh yeah, I almost forgot.  While the laptop was out of commission I found some time to dig into the iz2s wifi config scripts.  Every so often they'd connect, but fail to get a dhcp lease.  Subsequent retries never seemed to work, and so I was always forced to reboot whenever it happened.  But this time it occurred during my laptop downtime, so I had no excuse not to investigate.  Nothing better to do...

It didn't actually take very long to see what was going on.  The dhcp request failed but the wpa_supplicant demon was left running, and that's what interfered with my retries.  So I patched the script to kill any running wpa_supplicant before starting a new one.  Now a retry usually succeeds.

With that fix in the bag I decided to tackle another nagging wifi issue.  I finally ported the iz2s Easy Wifi Configurator script to work on the jffs.  Sometimes I prefer the dialog driven EWoC script to connect because there's less typing, making it easier to use in a dimly lit location.   The main issue was working out a suitable substitute for awk to fetch the selected line out of the list of SSIDs in one of the dialogs.  A one, two punch of head followed by tail did the trick.  Shoulda thought of that a long time ago...


1 comment:

  1. might wanna setup an external backup drive with an autorun script to perform a backup when ever it is plugged in. or assemble another box that performs nightly backups over the network.

    ReplyDelete