Why I'm actually here 2

Posted by Mark 19/08/2006 at 16h01

So, it turns out that there are an awful lot of costumes with controllers in them to be programmed. One way of doing this is to take a laptop around to each of them, and spit a carefully handcrafted string down a serial port. Another way might be to hire someone with no lighting experience but some C chops to write a little program to take a specification of a lightshow and compile it down to said string representation. Oh, and because we don’t want to have to lug laptops around everywhere, it should run on a PDA running linux called an Amida.

It’s not the easiest dev environment in the world: the machine has no handwriting recognition, so getting it to run telnetd was a pretty high priority. (sshd was the first choice, but cross-compiling all the dependencies was an … interesting challenge, I will say, as “heart-breaking and frustrating approximation to a death of a thousand cuts” sounds far too dramatic. Eventually the bastard compiled and ran, but segfaulted somewhere after skipping domain name lookups, and I timed out on trying to make it work.) I eventually hacked telnetd to allow root login with no password. Somewhere in Security Heaven, an angel is sobbing and carving “4 REAL” into his arm with a broken harp string.

Next step was trying to cross-compile GDB in order to work out why the program I’d slightly modified was crashing. This was another fairly frustrating experience: standard MO seems to be to compile gdbserver to run on the target, and gdb to run on the dev box, and I ended up getting a connection, but gdb on the dev box was not at all happy about the executable, despite compiling with the –host=arm-linux flag. Luckily, some kind soul has already hacked together a little library for making C be a bit more forthcoming about segfault causes, and I managed to track down the worst of the bugs. Fritz is a good electronics technician and knows far more about the chips themselves than I do, but his coding tends to be of the cut-and-paste variety, and local variables seem to be scorned as a bit girly. So far, I’ve managed to get the program down from 2500 to 800 lines, and have eliminated most of the globals, which makes me feel awfully virtuous. Another few days, and I think I’ll have cracked this one.

Apologies to anyone bored rigid by mind-numbing debugging exposition: I’d love to talk more about the incredibly cool things that file in and out of the warehouse (some of which are distinctly Mad Maxian), but the NDA is still in place. More about Qatar when I’ve actually seen some of it.

Comments

Leave a comment

  1. Bean 23/08/2006 at 05h01

    Teehee. Somewhere in security hell, 1000 blackhats cackle and steeple their fingers.

  2. mark 23/08/2006 at 05h53

    grin

    probably. although you’d need to get physical access to one of the Amidas, and at that point it’s game over anyway - the root password is not one of the more secure of those available.

Comments