We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Omega 2 and Arduino dock.



  • @György-Farkas
    Yes I realized that the tutorial was for the previous version of the Omega after I tried it, so I hope I didn't damage anything. I did install arduino-dock at first but then removed it and installed arduino-dock 2. However, the omega is working fine. Having said that, maybe following the tutorial damaged the I2C bus? But does it not have a level converter on that bus (and other pins) ?
    EDIT: The OLed expansion still works on the omega. This means that the I2C is working right? If I try to read the OLed (0x3c), I get 0x03, so I assume that the "read" also works.



  • @Wer-Ner
    Yes, there is a TI TXS0108 "8-Bit Bi-directional, Level-Shifting, Voltage Translator for Open-Drain and Push-Pull Applications" chip on the board.

    Exp.header Omega Arduino ICSP header
    3.3V logic 3.3V logic 5V logic 5V logic
    pin 22 I2C SCL SCL
    pin 24 I2C SDA SDA
            |            |          |             
    

    pin 13 | UART1 TX1 | RX |
    pin 11 | UART1 RX1 | TX |
    | | |
    | GPIO_15 | SCK | SCK pin 3
    | GPIO_17 | MISO | MISO pin 1
    | GPIO_16 | MOSI | MOSI pin 4
    | | |
    | GPIO_19 | /RESET * | RST pin 5
    | | | +5V pin 2
    | | | GND pin 6

    • Omega's GPIO_19 is inverted with an NPN transistor
      providing an (open collector) active LOW RESET for Arduino.


  • @György-Farkas
    Ok, thank you so much. But I am confidant that the omega is working. The I2C port seems to be working as well. I think I should take the Arduino Dock 2 back for a refund. It might have been brought back by someone else who maybe blew it and those guys just put it back on the shelf. They are known for doing that. It is also not the first blown (and previously returned) component I bought from them. Is there anything I can check on the Arduino dock 2 side, to see if it is actually working. What happens is:

    1. blue led solid on
    2. when I load sketch through IDE it compiles, and the moment it wants to start loading it on the Atmega chip, the blue led goes off for a split second and comes back on, after which I get the error message, stating the the chip could not be detected.
      Can I read the I2C port of the arduino dock? I read address 0x08 but always get 0xff in return. The chip is either "empty" or not working at all. I'm trying to figure out if I should take it back since it's going to be a mission to get it swopped for a new one.

    EDIT: The issue definitely is on the I2C between the Omega and Arduino dock.
    If I read the value of the blue led with:

    i2cget -y 0 0x08

    I get:

    0xff

    and I should be getting 0x01 or 0x00
    If I send a command to toggle the blue led (i2cset -y 0 0x08 0x00), the command executes with no errors but nothing changes on the Arduino dock.
    Am I not missing a library or something on the Omega side?



  • as far as testing the dock you might try to flash an empty sketch, as in the sketch that exists when you first open new sketch. compile that and flash it. i've read it is a good way to reset an arduino. it is recommended if you want to get rid [erase] of an existing sketch. after that do the blink example. then run the empty. then run example that you think will test the processes you are interested in. if the example sketches run i'd think the board is good. what you described above is how my board initially acted. if you find as you go along in your testing that the board is acting alright, using the given examples my conclusion is there was something wrong with the sketch or the way you set it up. i guess there is a possibility that some of the things you did like flash the wrong version of sketch might have damaged it. so , it's your call by trying to pass it off as a messed up board on delivery. one other idea is try flashing the proper bootloader. perhaps something in the bootloader you have now is damaged for one reason or another.



  • @Douglas-Kryder
    Hi guys. Thank you so much for your support. I've returned the Arduino dock and the new one works straight from the box. As stated above, it is not the first blown component I've bought from those guys. Someone brings a defective item back and they just put it back on the shelf. NEVER buying from them again.
    Anyway, thanks allot. I really appreciate your support.



  • I have a Onion2+ and used to have the OnionExpansion dock.

    Now I switched to the Arduino Dock, set up the Arduino IDE and wanted to flash some basic sketch.

    But I get the error:
    Can't export GPIO 19, already exported/busy?: Resource busy avrdude done. Thank you.

    Could this be because I switched to the Arduino Dock?
    I tried echoing 19 to the unexport file but there I got an ash permission error.



  • @Patrick-Fehr
    Did you switch to Arduino Dock or Arduino Dock 2?



  • I switched to Arduino dock 2 (the one that hosts an extension pins mount) . I also made sure, I have (only) the right opkg package. I can check all the versions and outputs later if that helps.



  • @Patrick-Fehr said in Omega 2 and Arduino dock.:

    I also made sure, I have (only) the right opkg package.

    Please try to (re)install arduino-dock-2 (and avrdude of course) with deactivated LEDE package repos.
    See also Known Firmware Issues



  • @György-Farkas

    This actually solved my problem. Thank you very much!

    root@o-megaman:~# cat /etc/opkg/distfeeds.conf
    #src/gz reboot_core http://downloads.lede-project.org/snapshots/targets/ramips/mt7688/packages
    #src/gz reboot_base http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/base
    #src/gz reboot_onion http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/onion
    ## src/gz reboot_luci http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/luci
    ## src/gz reboot_packages http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages
    ## src/gz reboot_routing http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/routing
    ## src/gz reboot_telephony http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/telephony
    src/gz omega2_core http://repo.onion.io/omega2/packages/core
    src/gz omega2_base http://repo.onion.io/omega2/packages/base
    src/gz omega2_packages http://repo.onion.io/omega2/packages/packages
    src/gz omega2_onion http://repo.onion.io/omega2/packages/onion
    
    root@o-megaman:~# opkg list-installed |grep avr
    root@o-megaman:~# opkg list-installed |grep ardu
    root@o-megaman:~# 
    
    root@o-megaman:~# opkg install arduino-dock-2
    Installing arduino-dock-2 (0.1-1) to root...
    Downloading http://repo.onion.io/omega2/packages/onion/arduino-dock-2_0.1-1_mipsel_24kc.ipk
    Installing avrdude (6.1-1) to root...
    Downloading http://repo.onion.io/omega2/packages/onion/avrdude_6.1-1_mipsel_24kc.ipk
    Installing libncurses (6.0-1) to root...
    Downloading http://repo.onion.io/omega2/packages/base/libncurses_6.0-1_mipsel_24kc.ipk
    Installing libreadline (7.0-1) to root...
    Downloading http://repo.onion.io/omega2/packages/base/libreadline_7.0-1_mipsel_24kc.ipk
    Installing libusb-compat (0.1.4-2) to root...
    Downloading http://repo.onion.io/omega2/packages/base/libusb-compat_0.1.4-2_mipsel_24kc.ipk
    Installing libusb-1.0 (1.0.21-1) to root...
    Downloading http://repo.onion.io/omega2/packages/base/libusb-1.0_1.0.21-1_mipsel_24kc.ipk
    Installing libftdi1 (1.3-1) to root...
    Downloading http://repo.onion.io/omega2/packages/packages/libftdi1_1.3-1_mipsel_24kc.ipk
    Installing libelf1 (0.168-1) to root...
    Downloading http://repo.onion.io/omega2/packages/base/libelf1_0.168-1_mipsel_24kc.ipk
    Configuring libusb-1.0.
    Configuring libftdi1.
    Configuring libelf1.
    Configuring libncurses.
    Configuring libreadline.
    Configuring libusb-compat.
    Configuring avrdude.
    Configuring arduino-dock-2.
    
    Archiving built core (caching) in: /var/folders/sf/5t0cxvpj3bn0wv48vsrlk8440000gn/T/arduino_cache_494256/core/core_arduino_avr_uno_51f02b7210b938436b779d1c032618e1.a
    Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.
    Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
    > Flashing application '/tmp/sketch.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.01s
    
    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 "/tmp/sketch.hex"
    avrdude: input file /tmp/sketch.hex auto detected as Intel Hex
    avrdude: writing flash (32768 bytes):
    
    Writing | ################################################## | 100% 0.73s
    
    avrdude: 32768 bytes of flash written
    avrdude: verifying flash memory against /tmp/sketch.hex:
    avrdude: load data flash data from input file /tmp/sketch.hex:
    avrdude: input file /tmp/sketch.hex auto detected as Intel Hex
    avrdude: input file /tmp/sketch.hex contains 32768 bytes
    avrdude: reading on-chip flash data:
    
    Reading | ################################################## | 100% 0.58s
    
    avrdude: verifying ...
    avrdude: 32768 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:
    > Done, flash successful
    > Flash complete!
    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 done.  Thank you.
    


  • Hi...i am a new user here. As per my knowledge you should still be able to use your Omega in the Arduino dock and get WIFI access you just need to plug the Omega into the Arduino dock and power in to the micro USB connector.

    pcb assembly



  • [O2+ with Arduino Dock 2]
    After leaving the Onion take dust for over 8 months because of this problem i gave it a try today ..
    No success ... i was reading this thread again from the whole beginning and tried litteraly everything.

    i confirm that :

    • all this was done on a fresh new installation of last Onion firmware
    • i added the lines in boards.txt (as you can see further my arduino IDE recognises the board)
      i use arduino 1.8.5 but anyway even via ssh with the ino in /root/ folder i have the same damn error
    • i have AvrDude 6.1 installed (not the newest from LEDE package)

    Still the same error i had 9 month ago, directly in SSH or on Arduino IDE
    0_1511712706085_avr_flashinh.jpg

    i don't have the buggy AVR-dude from later versions (LEDE Package Repos are commented out) / i have v 6.1
    0_1511712694790_avr.jpg

    0_1511712724839_avr_flashinh_IDE.jpg

    0_1511712734862_avr_flashinh_IDE2.jpg

    ANYWAY => same error, in IDE like in SSH
    0_1511712744507_avr_flashinh_IDE3.jpg

    HELP ! i tried everything, spend hours having an headache because of this ...

    The only thing i didn't do is to try to flash again the bootloader
    (because i just have the Arduino dock and it would be a pain in the ass to put these wires on ICSP ...
    anyway it might not solve the problem
    this procedure : https://wiki.onion.io/Tutorials/Arduino-Dock/Initial-Setup#arduino-dock-setup_using-the-omega-expansion-dock-with-the-arduino-dock-icsp-header

    do anyone did this ? flash the ArduinoDock2 from Onion2 while the onion is currently on that dock ?

    I beg for help im desperate. I backed Onion to be able to use it with Arduino and it does not work.
    is it possible that the dock or arduino itself is defectuous ?



  • @frederic-raducki
    So you have an Omega2(+) with FW 0.1.10 b160 and an Arduino Dock 2.
    Please execute a Factory Reset and setup Onion's Wifi network correctly again.
    Next steps:
    opkg update
    opkg install arduino-dock-2

    Omega and your PC are connected to the same Wifi network and can reach the Internet.
    The Arduino IDE has already installed on your PC and set up almost correctly.


    Please read again the Onion Omega2 Documentation's Flashing the Arduino Dock part more carefully.
    Please check especially this part Installing the Arduino Dock Device Profile

    Click OK, then go to Tools -> Boards -> Board Manager (at the top of the menu). In the search bar, type “Onion” and hit Enter. When the Onion Arduino Dock entry pops up, click on Install.

    Please select in the Arduino IDE -> Tools menu:
    ...
    Board: "Onion Arduino Dock"
    Port: "Omega-ABCD at IP_address(Arduino/Genuino Uno)"
    ...

    Arduino IDE 1.8.0 on Ubuntu 17.04
    0_1511726665268_Arduino IDE Screenshot from 2017-11-26.png

    Done. Now please try to flash a sketch: Arduino IDE -> Verify -> Upload ...

    Good luck!


    @frederic-raducki said in Omega 2 and Arduino dock.:

    The only thing i didn't do is to try to flash again the bootloader
    (because i just have the Arduino dock and it would be a pain in the ass to put these wires on ICSP ...
    anyway it might not solve the problem
    this procedure : https://wiki.onion.io/Tutorials/Arduino-Dock/Initial-Setup#arduino-dock-setup_using-the-omega-expansion-dock-with-the-arduino-dock-icsp-header

    do anyone did this ? flash the ArduinoDock2 from Onion2 while the onion is currently on that dock ?

    Arduino Dock Initial Setup is an old tutorial for the previous ("the original") Omega version and the previous Arduino Dock.
    Use it carefully with Omega2(+) and its Docks - don't forget the 5V to 3.3V level shifting!



  • Hi, recently I try to use my Arduino Dock 2 and follow every steps on the documentation but when I try to flash my app on Arduino IDE or directly on omega2 with .hex I receive the message:

    avrdude: AVR device not responding
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override
    this check.

    I verified everything reset to default, and install Arduino dock packages again, but ever receive the same result.

    Another test that I'm tried it's read the value of the led blue with i2cget -y 0 0x08 and tried to modified, exactly that @György-Farkas tried but I receive the same error, the command executes with no errors but no changes on the Arduino dock.

    I think that this is problem with boot loader on Arduino Dock, there is a method to flash bootloader with another Arduino?, I didn't find any documentation about and I interested to try this option.

    thank you in advance for any possible idea or solution you may have.



  • @Gamaliel-Valencia hi, it's been awhile since this was discussed so not 100% but i think you may have flashed wrong software. there was one
    software for original arduino dock and another for arduino dock2. they are not interchangeable. but it might be something else entirely. search on flash correct firmware for arduino dock 2 on google or here.



  • @Gamaliel-Valencia Probably you mixed up the two Arduino Dock tutorials or used the old one.
    If you have an Arduino Dock 2 with Omega2(+) you should follow the official Onion Omega2 Documentation Flashing the Arduino Dock - step by step very carefully.
    Firstly you should flash / upload a few simple sketches from File -> Examples -> Built-in examples of Arduino IDE.
    Afterwards you could try Manually Flashing on the Command line some precompiled hex files.

    Actually - on the Arduino Dock 2 - you can program the ATmega chip (the Arduino) with a bit-banged ISP / ICSP / Serial Downloading programmer.
    Any built in / on chip ATmega bootloader is a completely different story.

    There isn't I2C communication (eg. i2cget, i2cset) between Omega and Arduino by default - you should flash some kind of I2C slave program to the ATmega chip.



  • @György-Farkas said in Omega 2 and Arduino dock.:

    Probably you mixed up the two Arduino Dock tutorials or used the old one.
    If you have an Arduino Dock 2 with Omega2(+) you should follow the official Onion Omega2 Documentation Flashing the Arduino Dock - step by step very carefully.
    Firstly you should flash / upload a few simple sketches from File -> Examples -> Built-in examples of Arduino IDE.
    Afterwards you could try Manually Flashing on the Command line some precompiled hex files.
    Actually - on the Arduino Dock 2 - you can program the ATmega chip (the Arduino) with a bit-banged ISP / ICSP / Serial Downloading programmer.
    Any built in / on chip ATmega bootloader is a completely different story.
    There isn't I2C communication (eg. i2cget, i2cset) between Omega and Arduino by default - you should flash some kind of I2C slave program to the ATmega chip.

    I really appreciate your replies @György-Farkas and @Douglas-Kryder, let me try to explain better my situation.

    First I have an Arduino Dock 2 with Omega2, With this I tried to flash following the manual for Arduino dock 2 the Blinking led Program, the first flash its OK, but later when I tried to flash another program, in the process, I noticed that the blinking led program was deleted. But in the process of trying to flash the new program, this stops abruptly and it always marks the following error message:

    avrdude: AVR device not responding
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override
    this check.

    After to receive this message on multiple tryings, I decided to make a default reset on Omega2 and reinstalling the software for my Arduino Dock2 but I'm still receiving the same message. The steps that I realized after default reset are:

    opkg update
    opkg install arduino-dock-2

    I hope that this can complement you a little more in what happened to me and you can support me with other solutions.
    I greatly appreciate your support.



  • @Gamaliel-Valencia well, if the thing is still within any type of warranty framework then i would put in a ticket for return, mention the thread so if they have any ideas over what has already been discussed they can join in. but it seems to me you have tried all that you could. other boards have just not responded as well so some of them just may be broken. wish i could offer something else but out of ideas.



  • @Douglas-Kryder said in Omega 2 and Arduino dock.:

    @Gamaliel-Valencia well, if the thing is still within any type of warranty framework then i would put in a ticket for return, mention the thread so if they have any ideas over what has already been discussed they can join in. but it seems to me you have tried all that you could. other boards have just not responded as well so some of them just may be broken. wish i could offer something else but out of ideas.

    @Douglas-Kryder I really appreciate your support and I think you are right, I will send my ticket and wait.



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