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.