On the ARM based small computers front, running Linux or Android, there are several contenders, being the most famous one the Raspberry PI. Due to the huge community and documentation available the Raspberry Pi is the most chosen for a whole range of projects including low power servers, controllers, media players and so on.
Anyway, there are several alternatives, even cheaper, than the RPi. For example the 15$ Orange Pi looks promising on the price front, but not on the software side due to the Allwinner chip, it doesn’t look very promising without closed binary blobs. Other alternatives are the Banana Pi, Beaglebone board, Cubie board, and so on.
Anyway, since I needed something low power for running Node-Red, Sparkfun’s Phant, for logging data from the ESP8266, the RPi, was the way to go. But for the same price and with better specs, the Odroid-C1+ boosts also a very good community, supports Android, Ubuntu and even Arch Linux for ARM V7.
The advantages from the Odroid-C1+ over the RPi are:
– Same price (at least for me, 45€ for the RPi vs 44€ for the Odroid)
– Powerful 1.5 GHz quad core cpu
– Dedicated Ethernet chip not sharing the USB ports with 1GBps port.
– An emmc slot for storage allowing faster I/O than the SD cards. Sizes available between 8GB and 64Gb
– IR receiver
– Supports Ubuntu, Android, Arch Linux…
And so on.
As same as the RPi, the board by itself can’t do much, so I’ve also bought the power supply, acrylic box and a 32Gb emmc solid disk.
I was torn between the cheaper typical sd card and this emmc disk. Since the odroid supports it, why not?
As we can see, while it’s not faster than a typical SSD, it has the same performance than a spinning regular harddisk:
root@odroid:/etc/NetworkManager# hdparm -Tt /dev/mmcblk0p2 /dev/mmcblk0p2: Timing cached reads: 1440 MB in 2.00 seconds = 720.23 MB/sec Timing buffered disk reads: 240 MB in 3.02 seconds = 79.56 MB/sec root@odroid:/etc/NetworkManager#
Anyway, while the emmc is expensive, more than the price of the Odroid for the 32GB, it feels snappy and boots quite fast.
The emmc comes with a standard 4GB partition, and we need to expand it to the full emmc capacity using the provided odroid utility, or also, the gparted utility that is shipped on the ubuntu release.
So after powering up:
– Went to my router web interface and under the DHCP server tried to find which IP the Odroid got.
– Note, if connected to a HDMI monitor and if a keyboard and mouse is also connected, we can use the Odroid utility on the LXE window manager to expand the partition size from the default 4GB.
– The odroid utility can also be used from the command line: odroid-utility.sh
– With the IP I’ve got, I’ve ssh to the odroid and logon as root with odroid as password.
– Started up Gparted and increased the partition from 4GB to the 32GB emmc capacity.
root@odroid:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p2 29G 4.6G 23G 17% / none 4.0K 0 4.0K 0% /sys/fs/cgroup udev 420M 4.0K 420M 1% /dev tmpfs 425M 8.0K 425M 1% /tmp tmpfs 85M 2.6M 83M 4% /run none 5.0M 0 5.0M 0% /run/lock none 425M 8.0K 425M 1% /run/shm none 100M 24K 100M 1% /run/user /dev/mmcblk0p1 129M 7.2M 122M 6% /media/boot root@odroid:~#
– Updated the system: apt-get update and apt-get upgrade and it took a while to upgrade a lot of packages.
– After the upgrade I added a user: pcortex and made it to belong to the sudo group. This will be my working user, to avoid mishaps with the root user….
adduser –home /home/pcortex pcortex
adduser pcortex sudo
After the initial updating, and setting up, the remaining tasks where to install nodejs, node-red, phant and sqlite3.
Still as root:
apt-get install nodejs npm sqlite3
npm install -g node-red
npm install -g phant
npm install -g node-red-node-sqlite
For Android Notifications using the Google Cloud Messaging infrastructure:
npm install -g node-gcm (Check out: Node-Red GCM notifications
And finally making a link to let node be an alias of nodejs: ln -s /usr/bin/nodejs /usr/bin/node
Now with the user pcortex, we can start Node-Red and phant and starting doing interesting things with a low power super server 🙂
Edit: I’ve also changed the IP from a dynamic IP to a fixed IP. I’ve kept the hostname, odroid is cool enough 🙂
So I’ve edit the NetworkManager.conf file located at /etc/NetworManager, and changed the managed=false to managed=true under the section [ifupdown]. The final file is this one:
[main] plugins=ifupdown,keyfile,ofono dns=dnsmasq [ifupdown] managed=true
And then changed the network interface configuration to the fixed IP by editing the file interfaces located in /etc/network
# interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.45 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.254 dns-nameservers 220.127.116.11 18.104.22.168
Note: I’ve also installed nginx instead of Apache just to keep resource usage low, but that’s another story…