Omega2 with Arduino Dock2 review

Ok, so this is a Kickstarter project (Kickstarter Link) that I backed in 2016. I opted for the Omega2 with the Arduino Dock 2 option cause I'm a big fan of Arduino ;-)

I got delivery of the unit on December 29th 2016 (a nick xmas present !). Loved the simple yes effective packaging:






As you can see they even took care or putting a label on the box with the device MAC address (the same label is on the device itself) which makes it easier to know the IP address from your DHCP logs.

As I said I opted for the Omega2 with the Arduino Dock. The pinout is 100% pin compatible with an Arduino Uno.



There is however one flaw... There are no, I mean zero mounting holes on the Arduino dock.


This means there is no way to tie a shield to the Arduino dock and/or tie the dock in an enclosure securely.

Setting up the unit was pretty straight forward. Like a ChromeCast the units boots in an access point mode broadcasting an SSID matching the last 2 bytes of it's MAC address. From there it's as simple as connecting to this access point, opening a browser to http://192.168.3.1 and follow the setup wizard (here is the wiki link: Omega2 get started).

Once completed (after the firmware update) the unit will reboot. Now here is a tricky part, it takes between 50 and 60s for it to boot and have ssh and http access to it. To me it's a bit long for an embedded system.


Once it booted, as shown above you have a fully functional Linux computer. The Onion team even included a nice WebUI to do various things like controlling IO and even streaming a USB cam which is the first thing I tried. 

I connected a Logitech USB camera and within a few minutes it was streaming:



Pretty impressive !

My next task was to try to upload an Arduino sketch. Now the Arduino is 'private' to the Omega2, meaning it can only be programmed via the Omega2 via the SPI link. There are 2 ways to do this, either via the Omaga2 or via the Arduino IDE wirelessly. I chose the wireless link out out simplicity for a first test.

Not the Onion wiki pages does not seem to mention that but you need to install the Onion library in the Arduino IDE and it's not available from the Library manager. So you have to do it the old fashion way and download the ZIP file from the github repository (Github link) and install in in the Arduino IDE.

And that is where I hit a road block... The device is not seen from the Arduino IDE. Reading the documentation they mention that wireless upload required firmware b220 or later but I have 0.1.6 (b137) and it says it's the latest...


Ok, let's try the Arduino programming from the Omega2+ then... This involves compiling your Uno code using the IDE then taking the hex file to program the Arduino via the Omega2.

[~]$ scp /var/folders/yr/mm_mzpd50wn8j9qv89g4zkw00000gn/T/arduino_build_361557/blink2.ino.hex root@10.0.9.136:/root/
Warning: Permanently added '10.0.9.136' (RSA) to the list of known hosts.
root@10.0.9.136's password:
blink2.ino.hex                                                                                                                                                          100%   14KB 138.0KB/s   00:00

My first flashing attempts failed, but after trying things and doing factory reset on my Omega2 a few times, I finally figured it out... It's an issue with avrdude 6.3-1 as stated here: Bug tracker link

So here is the procedure:

cd /root
opkg remove arduino-dock
opkg remove arduino-dock-2
opkg remove avrdude
wget http://repo.onion.io/omega2/packages/onion/avrdude_6.1-1_mipsel_24kc.ipk
opkg install avrdude_6.1-1_mipsel_24kc.ipk
opkg install arduino-dock-2
After that I was successfully able to flash the Uno part of the dock from the Omega2:

root@Omega-5923:~# sh /usr/bin/arduino-dock flash
avrdude_6.1-1_mipsel_24kc.ipk  blink2.ino.hex
root@Omega-5923:~# sh /usr/bin/arduino-dock flash blink2.ino.hex
> Flashing application 'blink2.ino.hex' ...

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: reading input file "0x3f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0x05"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x05:
avrdude: load data efuse data from input file 0x05:
avrdude: input file 0x05 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xDA"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDA:
avrdude: load data hfuse data from input file 0xDA:
avrdude: input file 0xDA contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.


avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "blink2.ino.hex"
avrdude: input file blink2.ino.hex auto detected as Intel Hex
avrdude: writing flash (5084 bytes):

Writing | ################################################## | 100% 3.52s

avrdude: 5084 bytes of flash written
avrdude: verifying flash memory against blink2.ino.hex:
avrdude: load data flash data from input file blink2.ino.hex:
avrdude: input file blink2.ino.hex auto detected as Intel Hex
avrdude: input file blink2.ino.hex contains 5084 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.36s

avrdude: verifying ...
avrdude: 5084 bytes of flash verified
avrdude: reading input file "0x0f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0f:
avrdude: load data lock data from input file 0x0f:
avrdude: input file 0x0f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude: safemode: Fuses OK (E:05, H:DA, L:FF)

avrdude done.  Thank you.

> Done, flash successful
Following doing this and doing a cold reboot to the unit I now see it in the Arduino IDE:

And was even able to flash the Arduino wirelessly !








Comments

Post a Comment

Popular Posts