Putting Node.js on the Olinuxino A13

Out of curiosity and steamed up by the current arm-based-development-board-hype (prominently represented by the Raspberry PI) I purchased – along with some Pinguino clones and one Maple clone – an Olinuxino A13 WIFI dev board directly from the manufacturer Olimex. I tested the Olinuxino on the day of its arrival and it ran perfectly the integrated Android 4.0. My first impulse: put Linux on it. The guide provided by Olimex didn’t work out well: while booting and recognizing the SD card and u-boot correctly it stopped at “Starting kernel …”. I had recently not much time so my intermittent attempts to make it work were not very fruitful. Until some days ago a comment to the original guide pointed me to a revised version (which I highly recommend) and brought the breakthrough. Since yesterday Debian Wheezy is happily running on the A13.

That was the first step. Now I had to bring it online and install the things I desperately needed. For example the very simple editor: “joe”. I admit it: I hate vi and it’s derivates. Of course vim was preinstalled and I had to fumble with its “modes” and special keys until I could connect to the net. Since I had no idea what was already configured in the kernel and installed in the rootfs I prepared mentally for the worst case. A first check with: “ifconfig” revealed only the loopback interface. I began to shiver and asked google for help. This guide at debian.org and executing the command “iwlist scan” brought me back on track. The result of the command showed that there already exists a wlan interface, somewhere. This means the driver is included in the kernel.

That verified I could further follow the guide. Because I’m at the command line I had to configure the interface in the file “/etc/network/interfaces”. As soon as there is an appropriate entry “ifconfig” shows the device. At first I attempted to connect to my WPA protected 3G-wlan bridge. With no luck and no error message.

Searching for “wpasupplicant” on the A13 filesystem revealed that it was missing. And as far as I understand the matter wpasupplicant does the actual authentication handling. So no wonder that it was not working. I disabled any security on my 3G-wlan bridge and changed the configuration file accordingly:

[gist 4079593/]

I brought the interface with: “ifup wlan0” up and suddenly was connected. The first command I issued after I verified the internet connection, as you might guess: “apt-get install joe”. The second one was “apt-get install wpasupplicant”. After installing both packages (including some dependencies) I – now smoothly – changed “interfaces”-config file to it’s (at least for now) final state:

[gist 4079685/]

For completeness, to create the encrypted version of your network key you have to issue the following command:

[gist 4079699/]

OK. Now we are connected. Actually you might have to reconnect. “service networking restart” should do the trick. The fun can begin. To install Node.js I followed this guide. As prerequisite I had to additionally install python2.7 and I switched to the most recent stable version of Node.js: “v0.8.14”. But I got some errors when running “make test”.

Git and npm were giving me also some errors. Which I ignored at first or disabled through setting an environment variable. But after looking closely at the messages and thinking a bit about it, I finally got it. The Olinuxino doesn’t have a realtime clock. So every time there was SSL involved the server certificates were recognized as faulty (actually as issued far in the future, because the system thought it was 1980). Installing “ntp” through aptitude helped and I could for example install CoffeeScript via npm.

You might ask: What the heck do I want with those boards? The honest answer is simply to play a little with them and in the end get an impression how developing for more sophisticated hardware than Arduinos feels. The still somewhat fuzzy plan is to make a robot for and with my sons. We already have extracted some useful parts (motors, cogs, screws, wheels and more) from old computer hardware and toys. As soon as we create something noticeable I will surely report in this category.

Update:

I had, like many others a problem with rebooting and shutdown. Some “no handle” message on UART. This forum post helped to get rid of it. Basically you have to use the stable 3.0 kernel version, rebuild it and replace the existing image, script.bin and modules. I didn’t had to start from scratch. But to be on the save side make a dd copy of your existing card, just in case.

Advertisements

One thought on “Putting Node.js on the Olinuxino A13

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s