Friday 25 July 2014

Experimenting with Arietta: little & cheap embedded linux board

I bought this board months ago when there was a preorder offer on www.acmesystems.it: just 10 euro!
It's a 400 Mhz board, 256 mb ram, with usb support that runs a reduced sized version of Debian Wheezy: Specs Here.



Setup
First of all you need to:
- prepare a micro sd-card: follow this or buy one ready
- plug arietta with a microusb cable to your windows/linux computer (no mac support ..but of course you can use a virtual machine )
- configure Network on your computer: follow this

When arietta is connected to your PC, it is recognized as a RNDIS/Ethernet Gadget.
On my Linux Xubuntu PC launching ifconfig from a terminal I have a new network interface device "usb0".
After the setup you can use "ssh": ssh root@192.168.10.10  with username root and password acmesystems and you have a shell on arietta!

Install Packages
Install new packages on arietta is simply apt-get!

To let Arietta reach internet you can:
1 - connect an usb to ethernet adapter to Arietta, and configure it
2 - use your PC as a gateway to forward the traffic of Arietta through the USB connection

For step 2 this is what I did on a xubuntu machine:
- change sysctl.conf and uncomment from the line to forward packages "net.ipv4.ip_forward=1"
- launch the following commands: the eth1 is the NIC connected to internet

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -A FORWARD -i eth1 -o usb0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i usb0 -o eth1 -j ACCEPT

(Of course everytime you reboot the machine the iptables rules are lost.. unless you change iptables setup)

Now you can connect again to arietta with ssh:
- update repository /etc/apt/sources.list
- apt-get update
- apt-cache search
- apt-get install

Topic of the next article: arietta, libmtp, udev, photo backup... and "juice jacking"