Having a problem programming a nano with one usb cable

I just got my jumperless a couple of days ago.
On Windows 10, I have the usb cable plugged into the jumperless and get ports 10 and 12. The netlist from wokwi downloaded and looks good. I copied the sketch from wokwi and pasted it into the arduino ide (version 2.2.1), the board is set to arduino nano and the port to com12, but avrdude is complaining that the programmer is not responding.

     Using Port                    : COM12
     Using Programmer              : arduino
     Overriding Baud Rate          : 57600

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xef
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xef
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xef
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xef
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xef
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xef
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xef
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xef
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xef
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xef

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

Note: I plugged the nano in directly, changed the port to match, and was able to program it.

1 Like

Did you start by first connecting the Tx and Rx lines from the Jumperless to the Arduino via the normal Wokwi route (Logic analyzer D5 and D6 to arduino D0 and D1?
Also, to program an arduino you need to short the 2 resistors as shown here Releases · Architeuthis-Flux/Jumperless · GitHub

But yeah, the process of flashing an Arduino is inherently a bit touchy. I’ll write a more comprehensive guide tomorrow that explains what’s going on with that and how to troubleshoot problems with it.

But as general tips, make sure you’ve loaded the latest firmware, short those resistors, make sure the UART lines are connected, unplug and replug the Jumperless between tries, and smash that reset button.

I’m literally in bed typing this on my phone but in ~7 hours we can talk and get this figured out.

Thank you for your reply.
No, I didn’t connect the Tx and Rx lines, or the resistor (I read it but didn’t think it applied).
I’ll wait for your writeup.
I appreciate the help.

1 Like

Hey,

I just finished writing a guide for both how to remove the Tx and Rx protection resistors and how to set up Arduino to flash through one cable.

https://github.com/Architeuthis-Flux/Jumperless/blob/15e60cb444e908c92921a3c235a830e40bf60336/Hardware/TxRxRemovalInstructions.md

Let me know if that works for you, especially if it doesn’t.

Also update your firmware first because I may have made some tweaks to make that more robust.

Hello!

I haven’t been able to flash a nano using the same cable as the Jumperless. I followed this guide (excluding the resistor removal as you mentioned it’s not necessary for my particular board).

I can confirm that flashing the nano by itself and then connecting it to the Jumperless works fine.

Something odd I noticed is that reading the serial monitor works some of the time over the Jumperless port.

Steps taken

  1. Configured the Tx and Rx lines using the Wokwi Logic Analyzer like so

  1. Plugged in the Jumperless while holding the nano’s reset button down
  2. Saved the Wokwi connections
  3. Start the same upload command as I used for the nano alone (with the Jumperless port)
arduino-cli upload -i ./dist/src.ino.elf -b arduino:avr:nano:cpu=atmega328old -p /dev/cu.usbmodem03 -v
  1. Release the reset button after the Overriding Baud Rate ... line appears on the screen

After doing all that, the upload still fails, see the full output

$ arduino-cli upload -i ./dist/src.ino.elf -b arduino:avr:nano:cpu=atmega328old -p /dev/cu.usbmodem03 -v

"/Users/diego/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/Users/diego/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-P/dev/cu.usbmodem03" -b57600 -D "-Uflash:w:dist/src.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/diego/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/diego/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem03
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

About the setup

  • The nano is running with a delay(3500); in the setup() that is before cofiguring the Serial output
  • My nano is a clone :( it has a CH340 usb-to-serial converter

Questions

  • What might be causing this behavior?
  • Could this be related to using a clone instead of an official nano?

Hey, have you tried uploading from the JumperessWokwiBridge app to see if uploading to the Nano works that way? I’ll try to recreate your arduino-cli setup to make sure I’m not adding some necessary step to make it work.

The app does connect the UART lines right before flashing by sending f 116-70,117-71, to the Jumperless at /dev/cu.usbmodem01.

For reference, here’s the bit of code in the app that flashes the Arduino. It’s using pyduinocli so the syntax looks different but it’s the same API, just more Pythony.

arduino.compile( "./WokwiSketch", port=arduinoPort, fqbn="arduino:avr:nano", upload=True)  

Also, try this new firmware update from yesterday, the previous one was making spurious connections sometimes, and I just tried it to flash the Nano (via the app) and it worked for me.

firmware.uf2 (399.5 KB)

I’ll keep looking into this and see if I can recreate the issue using arduino-cli directly on the command line. But it sort of looks like either the Nano is held in RESET (or just not getting power at all), or the UART connections just aren’t being made somehow.

How you can tell between these 2 possibilities is: if flashing the arduino works with a 2nd cable plugged in while it’s still in the Jumperless header (remember the port will be different), then it’s probably something with UART connections. If it doesn’t work like that, then it’s probably something with the RESET being held low.

You’d know it was something with the Serial data being sent too soon in the sketch if the response was resp=0x(something other than 00). When it’s 0x00 like that, it’s most likely just not communicating at all.

I know it’s not the fact that you’re using a clone because I haven’t bought an official Arduino Nano in years, and mine has the CH340 chip as well. I think it’s sold by Elegoo.

Let me know what happens with these different situations and we can close in on what the issue is. And then I can write a guide for using the Jumperless with arduino-cli directly from the command line.

oh no, I am having the exactly same issue and this solution that is a bit scary for me, I prefer not to mess with the board at that level if I can help it.

Is there some specific version of arduino nano that would work without having to do this procedure?

I am using the cheapest version that I found in ali express and I thought that could be the issue. Please please tell me that I can get away with a different nano board.
:fearful:

1 Like

Luckily, you posted a video on Twitter so I know that the Nano you have should work fine without any of these modifications. Yours is a standard ATMega328-based Nano (except it has USB-C but that makes no difference).

Flashing an Arduino this way is sort of a touchy, timing critical process so sometimes it just doesn’t “catch” the Arduino at the right time and fails. Unplugging and replugging the Jumperless and maybe restarting the app and trying again a few times sometimes gets it to work. And pressing the reset button on the Arduino and letting go right before you click Save in Wokwi can help too.

Could you walk me through the steps you’re doing and where it’s failing so I can get an idea of what the issue is? And send me a link to your Wokwi project.

1 Like

Hi Kevin thanks for answer, this is the link of the project, I am just starting to play with it as you know .

The problem is , when the nano board is connected to the jumperless, it dont flash, I tried using the arduino ide too, and dont flash with it either when is connected to the jumperless, I tried many times and it only flashes in arduino ide when I disconected the arduino nano from the jumperless. Then when I connect again the nano to the jumperless, just de green PWR is ON in the nano board, the flashing red ligth L is always off, so it looks like when the nano board is connected to the jumperless , it does not run the code that I flashed before when I disconnected it from the jumperless.
I will keep trying , and I will let you know.

1 Like

What’s weird is in the video you posted, the Arduino’s LED seems to be flashing as it should. Is there something that changed between that video and now?

Now that red led is not flashing anymore when connected to the jumperless, I dont know when exactly stops working like that, I think when I tried to flash it with the arduino IDE but I am not very sure.

Oooh I have a possible theory. Try connecting a jumper wire from 5V (make sure the switch is in the middle) to the RST pin of the Arduino and see if it starts working.

1 Like

And I have 6 exactly the same nano boards that I got all thogether, I am trying all of them, all the same problem with all of them

I will try that and I will let you know…

The guess is that my Arduino has a pull up resistor holding the RESET line at 5V if nothing is connected, but your Arduino might not. Which is why it’s working for me and not yours.

If that works, then you can just connect the RESET line to 5V in Wokwi and it might work.

Could you send me a link to where you got them? I might be able to tell just from the pictures

link to the board https://www.aliexpress.us/item/3256805941736729.html?spm=a2g0o.order_list.order_list_main.29.66621802nkTgNY&gatewayAdapt=glo2usa4itemAdapt

I made that connection that you told me, and the red ligth start flashes like before when I am holding it. But I still cant flash code in the nano, I tried arduino ide and Wokwi always holding the conection with the red light flashing.

Well it looks like we’re on the right track. I can’t be 100% sure, but it does look like those boards lack an external pull up resistor on RESET.

Did you try just making the connection just in Wokwi (no physical jumper)? Reset does need to go low for a tiny bit to start the uploading process, so holding a wire to it will stop that from working.

But a resistor (2K - 10K) should still allow it to go low to upload and still keep it high when it’s finished. You have a resistor labeled 2K in your probe kit, try it again with that instead of the wire connecting RST to 5V and let me know if that works.

(and just for good measure, close and restart the bridge app and unplug/replug the Jumperless)

NOW WORKS WITH ARDUINO IDE!!!

now that I did the conection in Wokwi without fisical jumper, I tried to burn code again and works with arduino IDE, I made some changes in the led flashing and works!!!

Now I have to run, thanks very much for you time Kevin, now I will be able to play with it tonite when I am back.

I will keep sharing my progress this is fun!!

1 Like