IDE on RPi4 - Upload failing

Colleagues,

I have been running the IDE on an RPi14 for a Nano 33 IoT.

All has been going well until I uploaded the TimeSerial example. This example requires you to enter the time on the Serial monitor (in seconds since Jan 1 1970) and runs from there. That worked.

The header to the example states that you can set the time from Linux (Raspbian on the RPi4) with the command:

"date +T%s\n > /dev/ttyACM0"

(Note that the Nano 33 IoT is on /dev/ttyACM0.)

The command did not work (the clock did not run) and has not run since. I am now unable to upload any further sketches and the yellow LED on the Nano is pulsating. It is not blinking on and off but pulsating slowing from bright to dim and back to bright again.

I cycled the power and performed resets on both the RPi4 and the Nano. It looks like the data that I directed to /dev/ttyACM0 has corrupted the uploader firmware on the Nano in some way.

Is there any way to recover from this?

Thanks in advance for any suggestions.

Regards,

Paul.

Please do this:

  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to “Show verbose output during: compilation”
  • Check the checkbox next to "Show verbose output during: upload
  • Click “OK”
  • Sketch > Upload
  • After the upload fails, you’ll see a button on the right side of the orange bar “Copy error messages” (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

Hello,

Thanks for the reply.

Here’s the error message:

#############################################################

Arduino: 1.8.10 (Linux), Board: “Arduino NANO 33 IoT”

Sketch uses 34736 bytes (13%) of program storage space. Maximum is 262144 bytes.
Forcing reset using 1200bps open/close on port /dev/ttyACM0
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
PORTS {/dev/ttyACM0, /dev/ttyAMA0, } / {/dev/ttyACM0, /dev/ttyAMA0, } => {}
Uploading using selected port: /dev/ttyACM0
/root/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3/bossac -i -d --port=ttyACM0 -U true -i -e -w -v /tmp/arduino_build_749485/ssd1306_128x64_i2c.ino.bin -R
An error occurred while uploading the sketch
No device found on ttyACM0

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

############################################################################

A new piece of information: The Nano is not faulty (probably). I am able to use the Web Editor on a Mac - this uploaded successfully. The problem appears to be with the IDE on the RPi.

I hope that this information helps. I shall look out for your reply.

Regards,

Paul.

Hello Pert,

Thanks to your suggestion, I was looking at the upload command:

/root/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3/bossac -i -d --port=ttyACM0 -U true -i -e -w -v /tmp/arduino_build_749485/ssd1306_128x64_i2c.ino.bin -R

I wondered whether or not the part “port=ttyACM0” might by mistake find some other object of the same name, in the home directory for example. I then remembered that I had made a typo when entering the command that destroyed everything.

Instead of:

“date +T%s\n > /dev/ttyACM0”

my first entry before correcting it was:

“date +T%s\n > ttyACM0”.

This, of course, created a file ttyACM0 in my home directory.

I have just removed this file and all is well.

My apologies for bothering you with a silly problem - I am suitably embarrassed.

Regards,

Paul.

Thanks for taking the time to post an update with your solution @Paul58513. I'm glad to hear it's working now. Enjoy!