Omega 2 and Arduino dock.



  • @Andre-Courchesne Awesome!! Thanks for your update!

    edit: sweet, looks like the dock does work out of the box, once I run through your steps to downgrade avrdude things go a bit more smoothly.

    Though flashing the bootloader still fails, but at least I can start flashing other things to it. Thanks again!

     root@Omega-76C7:~# sh /usr/bin/arduino-dock flash bootloader
     > Flashing application 'bootloader' ...
    
     avrdude: AVR device initialized and ready to accept instructions
    
     Reading | ################################################## | 100% 0.01s
    
     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 "bootloader"
     avrdude: error opening bootloader: No such file or directory
     avrdude: input file bootloader auto detected as invalid format
     avrdude: cant open input file bootloader: No such file or directory
     avrdude: read from file 'bootloader' failed
    
     avrdude: safemode: Fuses OK (E:05, H:DA, L:FF)
    
     avrdude done.  Thank you.
    
     > ERROR, flash NOT successful`


  • @Cesar-Vargas Glad it helped.

    One note, do not update opkg, doing so seems to make it loose the repo.onion.io/omega2 repo. I have to confirm but looks like it.

    I'll add this to my review blog of the Omega2: http://net-forces.blogspot.ca/2017/01/omega2-with-arduino-dock2-review.html



  • @Cesar-Vargas Looking at the code of /usr/bin/arduino-dock in the arduino-dock-2 package it looks like the flash bootloader command is not supported. The code actually tried to open a file called bootloader as your hex file to upload.



  • Is there any progress on serial-port-bridge for arduino dock 2 ?
    Edit: found some info in the wiki page https://docs.onion.io/omega2-docs/arduino-dock.html



  • @Andre-Courchesne I kinda wish I'd gotten my later as I have already done the opkg update when I was trying to get things running.

    Maybe I'll need to do a factory reset and start fresh.

    BTW, nice review! I was under the impression I had to flash onion's bootloader in order for it to be seen by the Arduino IDE wirelessly, but it seems like that isn't the case?



  • @Cesar-Vargas I did not have to flash the bootloader in my case.



  • @Kostiantyn-Tarasenko

    It's probably possible to do it using socat. Probably something simitar to this: http://www.acmesystems.it/socat

    I have done this in the past on other system, I'll try to think on trying it out.



  • @Andre-Courchesne it's even more simple, I used pyserial and this tutorial to start up http://playground.arduino.cc/interfacing/python
    Port is /dev/ttyS1 for me



  • Even better, Blynk server runs smooth on Omega2 with socat - blynk widgets on the phone could access adruino pins.



  • Hi all,

    There will be an official guide for using the Arduino Dock 2 coming soon.

    For now, flashing the Arduino Dock 2 can done simply by installing the arduino-dock-2 package on the Omega2:

    opkg update
    opkg install arduino-dock-2

    Now you can flash the ATmega on the Arduino Dock 2 with the Omega and Arduino IDE similar to an UNO (You DON'T need to flash any bootloader or include any Onion library):

    1. Have the Omega2 plugged into the Dock
    2. Install the Arduino IDE: https://www.arduino.cc/en/main/software
    3. On the Arduino IDE: set Tools > Boards: Arduino/Genuino Uno
      Tools > Port: "Omega-XXXX at 192.168.3.1 (Arduino/Genuino Uno)"
    4. Upload your program

    If you don't see your Omega2 on the port try:

    1. Restarting the avahi-daemon on your Omega2

      /etc/init.d/avahi-daemon restart

    2. Restart the Arduino IDE

    • You can use communicate between the Omega2 and ATmega through UART1 /dev/ttyS1
      The Omega2 can be used as the Serial Monitor by:
      cat < /dev/ttyS1


  • On the Arduino dock 2, GPIO 19 of Omega2 is connected to the MCU_RESET circuit for software resetting the ATmega. Therefore, the 19 on the Expansion Header is grounded and should not be used for anything but ground. In addition, GPIO 19 on the Omega2 should be kept LOW or it will keep on resetting the MCU.



  • @Kostiantyn-Tarasenko

    I have an Omega2plus and an Arduino dock v2. I have installed avrdude 6.1 and arduino-dock-2. I am unable to program the Atmega328 from the Omega2. I can attach a USBasp dongle to the arduino dock's six pin header and program the Atmega328, but cannot program it using the Omega2. I have followed what others have posted without success. When I open the arduino ide, select Tools, Board: Arduino/Genuino Uno the port does not change and no options for anything other than Port1 are displayed. What do I have to do to get the Omega2 to show up as a port (I tried restarting the daemon, does not work). Also, where in the Omega2's file system is the bootloader located and what is it's name ? I ask because using generic 'bootloader' comes back with no file found. The fuses were set, but no file named 'bootloader' could be found. BTW I am not an Arduino newbie. I am a Linux newbie, but learning.

    On another note, I am very disappointed to receive the Omega2+ that I ordered, only to find out that the SD card slot that I paid extra for is non-functional and has no set date when it will be. Shame on Onion for selling vaporware.


  • administrators

    @James-Behrens please see this post regarding the SD card: https://community.onion.io/topic/1282/omega2-reboot-and-sd-card-fixed
    The SD card issue has been fixed. Onion has no intention of selling vaporware, not now, not ever. We have a track record of keeping all of our promises, we're a young company and still learning how to keep to our timelines. We appreciate everyone's patience and support as we're really trying to bring a useful product to the end users.

    Please see the full Arduino Dock documentaiton for all of the steps: https://docs.onion.io/omega2-docs/flash-arduino-dock-wirelessly.html
    You might have missed modifying the Arduino IDE boards.txt file, without this modification, the Arduino Dock will not show up as a port.
    Also please make sure you're running avrdude v6.1-1, try running opkg list-installed | grep avrude to find the version info.

    Not sure which bootloader you're trying to find on the Omega's filesystem?



  • I have an Omega2plus 0.1.7 b139 and an Arduino dock v2 0.1-1. I have installed avrdude 6.1-1 and modified the boards.txt. Even running opkg list-installed and find it still there. What ever I do today as it was working well yesterday between Onion Omega and Arduino IDE but not today, what going on?
    Found it sometime worked most of the time don't work, think it the antenna kinda hit and miss depend how you place it. If it don't work move it somewhere not too far from the spot. Anyway you try.



  • @Michael-Xie48 This doesn't work for me. I get the following error:

    alt text



  • I upgraded to firmware version 0.1.9 b149. The SD card is being recognized. Thank you for that.

    I have read in the documentation how to transfer the file system to a flash drive attached to the USB port. Can I transfer the file system to the SD card ? I have done this with a competitor’s SOC that uses the same processor as the Omega. The file system on an SD card is better than using a flash drive. It makes for a more compact setup and an expansion dock is not required.

    Back to the Arduino dock V2. With the new firmware I am able to flash the Atmega328 on the Arduino-dock V2. The omega finally shows up in the Arduino IDE’s port list.

    How about publishing the actual schematic of the Arduino-dock V2. The current documentation has the schematic of the Arduino-doc V1.

    I tried to burn the bootloader into the Atmega328 on the Arduino dock V2 by using the Linux command given in the documentation; “sh /usr/bin/Arduino-dock flash bootloader”. All this does is tell me the Omega cannot find “bootloader”. That is why I asked where the Arduino bootloader file can be found. I thought that “bootloader” was a stand-in for the real file name. Foolish me. Turns out the bootloader is not needed.

    BTW My system had the Bonjour service installed and I still could not connect using “omega-xxxx.local” until I edited the Windows hosts file and added the IP address and host name. I also setup my router to provide a fixed IP for the Omega’s MAC address. Which is another issue. The paper label on the Omega has a MAC address on it, but it is not the same MAC address that the Omega’s WiFi is using. The MAC on the paper label is used by the br-wlan, eth0 and eth0.1. A different MAC is used by apcli0. I typed “ifconfig” to get this information. I used the apcli0 MAC to setup my router. Again, it would be nice if things worked as described in the documentation.
    @James-Behrens



  • 0.1.9 b149 seems to have broken my ability to connect to my arduino wirelessly. After updating it looks like the packages were uninstalled. I reinstalled them (opkg update, opkg install arduino-dock-2), still can't see the device. Rebooted my arduino, nothing, rebooted my Mac laptop, still nothing. The boards.txt file is still modified. Any suggestions?
    edit: pulling the power cord and rebooting the unit that way fixed it! Still, I'm curious why the packages were uninstalled after updating the firmware, I thought those were installed to root?



  • @cusackph said in Omega 2 and Arduino dock.:

    edit: pulling the power cord and rebooting the unit that way fixed it! Still, I'm curious why the packages were uninstalled after updating the firmware, I thought those were installed to root?

    That's due to how LEDE works: whenever you install new firmware, all packages you have previously installed get wiped out.



  • @WereCatf said in Omega 2 and Arduino dock.:

    @cusackph said in Omega 2 and Arduino dock.:

    edit: pulling the power cord and rebooting the unit that way fixed it! Still, I'm curious why the packages were uninstalled after updating the firmware, I thought those were installed to root?

    That's due to how LEDE works: whenever you install new firmware, all packages you have previously installed get wiped out.

    Ok. But why does it say this on the Firmware Upgrade portion of the console? If the packages were installed in root, they should have been fine, no?

    "Attention!

    Firmware upgrade will erase all files outside of the /root and /etc directories. Please backup any custom files before proceeding."



  • @cusackph You're just confusing the concept of the directory /root and the root of the filesystem -- packages are installed into the root of the filesystem, ie. /. It's not very obvious, I know.



Looks like your connection to Community was lost, please wait while we try to reconnect.