Monday, June 11, 2012

Maiden voyage

It's time! The camera is not yet working. Neither is the 3G modem. We're still running on the Panda Board though and it has got Wifi. So we let the boat connect to a wifi provided by Kristians android. The GPS and servo controller are fully operational and the control interface for the iPad is close to perfect. Here we go!


Tuesday, June 5, 2012

We have 3G modem

My dad just decided to upgrade to 4G. 4 is better than 3. We all know that. So I got his old 3G modem :)

So this is where I tell the story of the 3G. Again - this is back dated so this is a long story which in reality began a few weeks after we got the modem... and ended like a week ago (september 3:rd).

 A brand old Huawei E1820

The story of the 3G modem

You would think by now we would've learned that nothing is as easy as it seems. But we hadn't. Actually, we still haven't. We still approach every challenge with the same positive, wreckless attitude. Anyway; we had the modem and started googling for information on how to use it. It turns out it wasn't that hard. Pretty soon we found a promising looking script for wvdial.

There is no wvdial

Apparently there is no wvdial for Debian squeeze on arm... go figure! So we resorted to pppd. How hard could that be. As it turned out: very. It actually took us a whole night just to figure out that our problem was the PIN lock. Then we realized my dad didn't have the PIN code. He had the PUK code though... and an hour later we had figured out how to lock the phone using erroneous PINS so that it would respond to the PUK. Aaaaahhhh those AT codes - it brings back the old times of configuring that noisy US Robotics :)

So anyway... We unlocked the modem and then went back to googling for settings. What we wanted was, specifically, to get a Huawei E1820 to connect to Telenor and get an IP address. We tried EVERYTHING! Nothing worked. We permutated the order. Didn't work. And then... by pure f**ing luck - we found the correct configuration. So we built a start-up script to make the boat connect, get an IP address and ping a Heroku app so that we could see the IP from the iPad. After reboot it worked... almost. So we rebooted again. Nothing. A black screen.

There is no partition

Yep... after trying to get the Panda to wake up for about 20 minutes, we yanked the SD card and put it into a computer. And it contained: 16 GB unpartitioned space. Thank you Televerket!

Now, all the code for the GPS and the modules and pretty much everything else has been on Github the whole time. But not the start-up script. And not the modem settings. You know; the ones we finally got right by pure luck.

There is video

So we do a bit copy of the memory card and start searching for the word telenor in a Hex editor. Gigabyte after weary gigabyte is copied and searched... but no telenor. So we start talking about how there could be so much crap on the SD card. And then we give thanks to Sebastian for cramming the Panda with music videos. (he may argue that the extensive logging was just as bad - especially my Tourettes like rage quits like `sudo halt -fitta`).

And so finally we find it. The config is saved!

There is Raspberry

The wiped SD card put us off a bit. And by that time, we had no less than three shiny Raspberry Pi:s waiting for us. It's true - they're not as powerful - but they're damn sexy! And Raspbian - essentially Debian Wheezy - has got wvdial... oh the joy! So we pull out the old config and run it on the RPi... and NOTHING WORKS!!!

There is also keyboard

After about an hour of bug hunting, we find a mention of certain keyboards derping other USB devices. Sebastian leaves the room and ssh:s into the RPi. GREAT SUCCESS! It works. Screw you keyboard!