Sketch never finishes uploading on Node

Received my first TTN Node today (read as: I am a n00b)! Got it “mapped” via the https://ttn.fyi/activate link so I know that works. Installed the Arduino IDE (Linux, version 1.8.5) and download the SparkFun boards and TheThingsNetwork libraries. Tried the serial monitor and it connects and shows me the data, exactly as explained in the documentation.

Next step, uploading a sketch to the Node. I am trying with the TTN “DeviceInfo” sketch since it seems simple enough as the next thing to try, baby steps. It compiles without issues and I want to upload it but… the Arduino IDE never finished uploading the sketch. Tried multiple times, rebooting the computer, etc.

Visually the Arduino IDE hangs on “Uploading…” with the progress bar at a 100%.

The upload starts, the Node shows a red LED but after that I can see it “forgets” the port setting in the Arduino IDE. A new port shows up but it’s not the same as before.

I think the Node restarts on a new port before the upload is finished, confusing the avrdude program since the device no longer lives on the port it should.

The whole thing gives up after a few minutes and the Node still runs the default sketch but not the new one.

Any idea what I am doing wrong?

see https://www.thethingsnetwork.org/docs/devices/node/troubleshooting.html

try it from a windows PC …

Thanks, I read the troubleshooting guide but nothing there seems to help. I did run through the same guide on macOS and that worked without a problem.

Is Linux not supported?

the arduino IDE installed on LINUX can give some problems especially when the processor is 32U4.

Q : not clear to me but did you succeed uploading your sketch on macOS ?

I work with ubuntu 16.04 on a dell xps15. I have no problems with the arduinos. Only the leonardo is a special one. I must hit the upload button and reset simultaneous and the usb port switches from number.

1 Like

exactly… the Leonardo is based on the ATmega32u4 … just like the TTN node and TTN uno

Yes, I can upload the sketch with macOS, no issues there.

ok solved then :wink:

Indeed, thanks! Small remark though, maybe we could add @bvdbrule’s remark to the troubleshooting page?

While looking for a solution I did find the troubleshoot page but it did not solve the issue. If this is a known issue on Linux we might as well add a note there to prevent future questions like mine? :wink:

1 Like

I had similar issues with a ATmega32u4 node on Mint 18 (Ubuntu 16.04 based). The solution was to disable the modemmanager. The troubleshooting guide actually mentions the modemmanager but doesn’t tell how to check this or what to do about it. Did you check the modemmanager? If you don’t use the modemmanager you can just uninstall it. apt-get remove modemmanager

2 Likes

Thanks @expand, removing the modemmanager did help. I can now upload sketches from the Linux machine as well! :clap: