unable to program onboard RFDuino

edited January 2015 in Cyton
Hi All,

I have successfully installed all of the RFDuino libraries, as well as uploaded the passthrough program to the dongle. I switched the dongle toward GPIO6, connected wires (with a .1 uF capacitor between RST) between the dongle and the board, powered on the board, and attempted to upload a program. However, the Arduino software responded with 

get
fail.......fail.......fail.......

presumably meaning it could not find the device. I should note that it took longer for it to display this message while in contact with the pins, than when unconnected. Any suggestions on how to get it to work? 

Comments

  • biomurphbiomurph Brooklyn, NY
    Do you see the red & green LEDs blink on the Dongle? If so, this is indication that the upload process is happening, however the connection to the OpenBCI Board pads may not be firm enough.

    What Board do you have? 8bit or 32bit?

    Please make sure that the connection is correct

    Dongle FTDI TX goes to Board RF RX
    Dongle FTDI RX goes to Board RF TX


  • I do not see the TX and RX led's blinking. Should I see them when the dongle is in FTDI mode? I have a 32bit board, and all of my connections are correct and as firm as I can get them.
  • biomurphbiomurph Brooklyn, NY
    The Red and Green LEDs are connected to the FTDI IC, and they blink whenever the FTDI chip is RXing or TXing.


    Make sure you have a really strong connection to the pads on the 32bit board. 
    Maybe needs to be firmer than you think.
    The double check again the TX<>RX pairing.
  • Any advice for connecting the pads? I plugged each one via cables into a four-pin header and then connected that to the pads. As far as I can tell, they are making strong contact, but I see no response from the RX and TX LEDs.
  • I recently reprogrammed my 32-bit boards (it was a 16-channel version, but the main board is the same).  After I got over an issue with the compiler (see post here), I also saw the same "fail...fail...fail..." error.

    As Joel said, you have to make sure that you're hitting the pads correctly.  There's no magic there, you just gotta hit them.

    Then, I found that there was some additional voodoo that you had to do.  Specifically, I found that I had to have the OpenBCI board turned off during while the program was compiling.  Then, just as the Arduino IDE was about to say "uploading...", I'd quickly turn on the OpenBCI board.  If I got the timing just right (either just before or just after it says "uploading...", I can't remember), the program would upload successfully.  It usually took 3-4 tries.

    Joel, can you speak to this part at all?  Do you have to restart the board at just the right time in order to get programming access to the RFDuino?

    Chip

  • Hmm, that sounds like an issue with the reset not being hit properly. Presumably that is what the capacitor is for, it fires the reset at the right time thus allowing the RFduino to be programmed. But what you're saying sounds more like manually resetting the RFduino. Regardless, I'll give it a try, thanks.
  • biomurphbiomurph Brooklyn, NY
    zwad3, that's exactly what the capacitor is for. The DTR pin on the FTDI chip gets pulled low during the upload process, and the cap in series allows the falling edge of that DTR toggle, but then releases the reset so that the RFduino (or Arduino, if you like) comes out of reset and into bootloader mode for that 2 seconds or so.

    I have an 8bit and a 32 bit here in front of me, and I'm able to upload the Device code to RFduinos on both of them using the Dongle as a pass-thru successfully.

    Try swapping out the 0.1uF capacitor (labeled 104) with a 0.01uF capacitor (labeled 103). 

    I do find that all the connections need to be very strong for this to work.

    If you continue to have trouble, try using an FTDI breakout from Adafruit or Sparkfun.
    Make sure it is a 3V FTDI breakout, or that any selection pads are jumped to ensure 3V logic on the TDI pins.

  • Note that I was using the RFDuino USB dongle thing (which you show at the end of your docs: http://docs.openbci.com/tutorials/03-Upload_Code_to_OpenBCI_Dongle).  I have not tried it with the OpenBCI dongle.
  • biomurphbiomurph Brooklyn, NY
    we use those RFduino USB Shields in house for flashing Device code
  • biomurphbiomurph Brooklyn, NY
    OK ok ok okokokokokok.

    I goofed.

    The pin connection that I put up on the Docs page is incorrect.
    The RESET connection on the Dongle side of things should go to GPIO6, not RESET.

    Again, make sure that the slide switch is set to GPIO6, and that you have a connection from GPIO6 to RFRST on the OpenBCI board with a series 0.1uF capacitor.

    I'll fix it in the Docs ASAP

    doh!
  • Thanks, that did the trick!
  • @biomurph i'm having the same issue. the tx and rx in rfduino blinks, but arduino console im getting 

    "get
    fail.. fail.. faill.. "

    i've made the contact firm.
    the connections are perfect as per in the docs (hoping that you've corrected your previous mistake)
    powered up the bci board with 6v
    capacitor is 0.1uF

    what should be the switch position when programming the openbci?? (ble/off/pc) ??please help me out. 
  • edited March 2015
    Did you try my voodoo "solution", posted above?

    >>>
    Then, I found that there was some additional voodoo that you had to do.  Specifically, I found that I had to have the OpenBCI board turned off during while the program was compiling.  Then, just as the Arduino IDE was about to say "uploading...", I'd quickly turn on the OpenBCI board.  If I got the timing just right (either just before or just after it says "uploading...", I can't remember), the program would upload successfully.  It usually took 3-4 tries.
    >>>

    It's not at all a proper solution, but it did work for me.

    Chip
  • edited March 2015
    @chipaudette yes, I tried the voodoo solution also. Still it didn't work out. I have an 8 bit board. When uploading the device code at different trials, we got in the console like
    expected 14, got 00
    Expected 14, got 40

    What does this mean??
  • Hmm.  I've never seen the errors that you mention.  Sorry!  Hopefully the guys at OpenBCI have seen those errors and know what to do...

    Chip
  • Yea.. @biomurph can answer this I guess
  • wjcroftwjcroft Mount Shasta, CA
    edited March 2015
    @baji93 , right now Joel is at the SXSW conference. And Conor is at Brain Tech 2015. Both of them supporting OpenBCI for the attendees. (Presentations, answering questions, collaborations, etc.) So Joel will have more chance to catch up when he returns.

    https://twitter.com/SafeForRobots
    https://twitter.com/russomanno15
    https://twitter.com/OpenBCI

    http://neurogadget.com/2015/03/12/braintech-2015-day-1-roundup
    http://neurogadget.com/2015/03/16/braintech-2015-day-2-from-opportunity-to-startup/11084


    image
  • @wjcroft oh, thanks for the info . can you please check the voltage across the capacitor C45 in the 8bit Board?. I'm getting 0 volts across it. @chipaudette can you please check for the same?
  • biomurphbiomurph Brooklyn, NY
    @bajji93 can you describe your setup abit more?
    Are you using an RFduino USB Shield to connect to the OpenBCI RFduino pin-outs?
    If so, you don't need to add a 0.1uF cap. It's already there.

    If you can post a photo, that would help too.
  • Hi there,

    I also had the error "expected 14, got 00". I moved my USB connector to the FTDI-chip (usb to serial converter) a bit, then I was able to upload my code to the RFDuino successfully without errors. So it was a faulty USB-connection, even though the FTDI chip was recognized along to /var/log/syslog.


    Best regards,
    moony

  • Hi
    I got "expecting 52, got 53
    fail.......fail.......fail......." when using RFduino USB Shield to upload RadioDevice32bit.ino

    Also got "expecting 52, got 53
    fail.......fail.......fail......." when plug Dongle into computer and upload RadioHost32bit.ino

    I have double checked TX-RX and RX-TX, but error still exist.
    Anyone could give me some suggestions?
    Best Regards

  • I got "expecting 52, got 53
    fail.......fail.......fail......." when plug Dongle into computer and upload RadioHost32bit.ino too. Have you solved this problem?

  • @AijunHe said:
    I got "expecting 52, got 53
    fail.......fail.......fail......." when plug Dongle into computer and upload RadioHost32bit.ino too. Have you solved this problem?

    Hi,do you solve the problem now? I meet it too

  • I decided to create my own Dongle, and encountered an error expecting 52, got 53 when loading the code into the RFD22301. After that I downloaded the RFDLoader.exe file from the latest release v2.3.3 and replaced it C:\Program Files\Arduino\hardware\arduino\RFduino\RFDLoader.exe. After that I got the following error RFduino device required for RFduino hex file. Then I used a disassembler to disassemble the RFDLoader.exe. Found a piece of code

    Using a hex editor, I made sure that this condition was not met by replacing 74 with 75

    This allowed me to upload the code successfully

    I uploaded the edited RFDLoader.exe to GitHub
    Maybe this comment will help someone

Sign In or Register to comment.