Hi, I am completely new to Arduino.
I am trying to upload sketches to my Arduino Nano 33 BLE Sense, but the process is failing every time.
OS: Ubuntu 20.04.2 LTS 64bit
Arduino IDE: 1.8.5
Arduino Agent: 1.2.3-b696989
I have tried using both the web editor and tried uploading from the IDE. It failed every time.
- I tried to upload the
micro_speech
example from the Arduino_TensorFlowLite library. - Then I tried the magic wand example from Harvard_TinyMLx library.
- Then I finally tried the Blink example that comes with the IDE.
Nothing worked.
The error message shown every time contains-
No device found on ttyACM0
I have done the usual setup. I can see the board connected in the web IDE, the port information is correct.
When connected, lsusb
shows the device as-
Bus 001 Device 033: ID 2341:805a Arduino SA Nano 33 BLE
So my OS sees it alright.
And the web IDE shows the connecting message. So the agent sees that as well.
Here is a topic from 8 years ago that says-
[..] so after spending hours surfing and testing, the solution was incredibly simple. when i plug in the due, the baud rate is set at 115200 automatically. all i have to do is set the baud rate to 1200 before every upload and all uploads are successful from the ide!
And suggests that the baud rate of the port should be changed, like so-
stty -F /dev/ttyACM0 speed 1200 cs8 -cstopb -parenb
And the OP said that it worked.
But the user was using a different board (Mega) and a different OS (Debian 1.0.3 - 2012.12.10).
Should I do the same? Is trying that out safe?
This is the error message that I see when the yellow light on the board is blinking discretely (the board is in normal mode):
Full Error Message (IDE)
Sketch uses 83392 bytes (8%) of program storage space. Maximum is 983040 bytes.
Global variables use 43920 bytes (16%) of dynamic memory, leaving 218224 bytes for local variables. Maximum is 262144 bytes.
processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$UploadHandler.run(Editor.java:2055)
at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Error touching serial port '/dev/ttyACM0'.
at processing.app.Serial.touchForCDCReset(Serial.java:107)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
... 5 more
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Permission denied.
at jssc.SerialPort.openPort(SerialPort.java:170)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
... 6 more
And here's the error message that I see when the yellow light is phasing in and out smoothly (programming mode):
Full Error Message (IDE)
Sketch uses 83392 bytes (8%) of program storage space. Maximum is 983040 bytes.
Global variables use 43920 bytes (16%) of dynamic memory, leaving 218224 bytes for local variables. Maximum is 262144 bytes.
processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$UploadHandler.run(Editor.java:2055)
at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Error touching serial port '/dev/ttyACM0'.
at processing.app.Serial.touchForCDCReset(Serial.java:107)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
... 5 more
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Permission denied.
at jssc.SerialPort.openPort(SerialPort.java:170)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
... 6 more
And here's the output of the web IDE (board on programming mode)-
Full Error Message (Arduino Cloud)
/home/builder/opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware /home/builder/opt/arduino-builder/hardware -hardware /home/builder/.arduino15/packages -tools /home/builder/opt/arduino-builder/tools -tools /home/builder/.arduino15/packages -built-in-libraries /home/builder/opt/libraries/latest -logger humantags -fqbn arduino:mbed_nano:nano33ble -build-cache /tmp -build-path /tmp/343472908/build -verbose -prefs runtime.tools.arm-none-eabi-gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs runtime.tools.bossac.path=/home/builder/.arduino15/packages/arduino/tools/bossac/1.9.1-arduino2 -prefs runtime.tools.dfu-util.path=/home/builder/.arduino15/packages/arduino/tools/dfu-util/0.10.0-arduino1 -prefs runtime.tools.openocd.path=/home/builder/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2 -prefs runtime.tools.rp2040tools.path=/home/builder/.arduino15/packages/arduino/tools/rp2040tools/1.0.2 -prefs runtime.tools.nrf5x-cl-tools.path=/home/builder/.arduino15/packages/arduino/tools/nrf5x-cl-tools/9.3.1 -prefs runtime.tools.i586-poky-linux-uclibc.path=/home/builder/.arduino15/packages/Intel/tools/i586-poky-linux-uclibc/1.6.2+1.0 -prefs runtime.tools.sketchUploader.path=/home/builder/.arduino15/packages/Intel/tools/sketchUploader/1.6.2+1.0 -prefs runtime.tools.esptool_py.path=/home/builder/.arduino15/packages/esp32/tools/esptool_py/3.0.0 -prefs runtime.tools.CMSIS.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS/4.5.0 -prefs runtime.tools.serial-discovery.path=/home/builder/.arduino15/packages/builtin/tools/serial-discovery/1.2.1 -prefs runtime.tools.arc-elf32.path=/home/builder/.arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1 -prefs runtime.tools.core2-32-poky-linux.path=/home/builder/.arduino15/packages/Intel/tools/core2-32-poky-linux/1.6.2+1.0 -prefs runtime.tools.avr-gcc.path=/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs runtime.tools.x86-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/x86-linux-gcc/7.2.0 -prefs runtime.tools.avrdude.path=/home/builder/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino8 -prefs runtime.tools.esptool.path=/home/builder/.arduino15/packages/esp8266/tools/esptool/2.5.0-3-20ed2b9 -prefs runtime.tools.arduino101load.path=/home/builder/.arduino15/packages/Intel/tools/arduino101load/2.0.1 -prefs runtime.tools.xtensa-esp32-elf-gcc.path=/home/builder/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0 -prefs runtime.tools.CMSIS-Atmel.path=/home/builder/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0 -prefs runtime.tools.ctags.path=/home/builder/.arduino15/packages/builtin/tools/ctags/5.8-arduino11 -prefs runtime.tools.mkspiffs.path=/home/builder/.arduino15/packages/esp8266/tools/mkspiffs/2.5.0-3-20ed2b9 -prefs runtime.tools.linuxuploader.path=/home/builder/.arduino15/packages/arduino/tools/linuxuploader/1.5.1 -prefs runtime.tools.arm-linux-gcc.path=/home/builder/.arduino15/packages/arduino/tools/arm-linux-gcc/4.9.3 -prefs runtime.tools.flashpack.path=/home/builder/.arduino15/packages/Intel/tools/flashpack/2.0.0 -prefs runtime.tools.xtensa-lx106-elf-gcc.path=/home/builder/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9 -prefs runtime.tools.arduinoOTA.path=/home/builder/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -libraries /tmp/343472908/custom -libraries /tmp/343472908/pinned /tmp/343472908/sketch_jun22a
Sketch uses 83352 bytes (8%) of program storage space. Maximum is 983040 bytes.
Global variables use 43920 bytes (16%) of dynamic memory, leaving 218224 bytes for local variables. Maximum is 262144 bytes.
Upload started
Programming with: Serial
Restarting in bootloader mode
Flashing with command:/home/ritobrata/.arduino-create/arduino/bossac/1.9.1-arduino2/bossac -d --port=ttyACM0 -U -i -e -w /tmp/arduino-create-agent426166998/sketch_jun22a.bin -R
No device found on ttyACM0
I have two questions at this point-
- Is this a simple permission problem where I need to run the agent and the IDE with root access to be able to use the port?
- Should I change baud rate as advised in that post?
What should I do? Any advice is appreciated.