Arduino Detected but no Serial Port is opened

I am on linux, NixOS specifically. Yesterday I was using my Arduino mega and everything was working perfectly fine. Today when I plug in the Arduino no serial port appears for me to connect and upload my sketches. When I run lsusb it returns: Arduino SA Mega 2560 R3 (CDC ACM) so I know the board is recognized. I know for a fact the usb cable I am using is a data cable and it worked yesterday. Additionally, I tried another mega board I had using a different usb cable. It is also detected, but again no serial port. I don't know what to do next with troubleshooting, and would be grateful for any help.

You can run dmesg -w without the board connected; the application does not close. Next connect the board and observe the changes. It might reveal something.

Well like I said before, it recognizes the usb device.

[ 1021.285632] usb 1-3: new full-speed USB device number 8 using xhci_hcd
[ 1021.414078] usb 1-3: New USB device found, idVendor=2341, idProduct=0042, bcdDevice= 0.01
[ 1021.414082] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 1021.414084] usb 1-3: Manufacturer: Arduino (www.arduino.cc)
[ 1021.414084] usb 1-3: SerialNumber: 442313133303515171C2

For some reason still no serial port though.

Edit: Hmmm is xhci_hcd the wrong driver?

This is the output that I get on Antix Linux

[ 6873.997114] usb 1-5.2: new full-speed USB device number 11 using ehci-pci
[ 6874.079156] usb 1-5.2: New USB device found, idVendor=2341, idProduct=0042
[ 6874.079162] usb 1-5.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 6874.079167] usb 1-5.2: Manufacturer: Arduino (www.arduino.cc)
[ 6874.079170] usb 1-5.2: SerialNumber: 5573932373735140D150
[ 6874.079791] cdc_acm 1-5.2:1.0: ttyACM0: USB ACM device

Your output seems to be missing some data. But if you indeed did not get the last few lines in dmesg -w, it does explain why the IDE does not see it.

I'm not familiar with drivers under Linux.

I was trying to force the arduino to use a different driver, and I removed the xhci_hcd driver from my boot modules.

[  108.974743] usb 1-3: new full-speed USB device number 9 using xhci_hcd
[  109.104592] usb 1-3: New USB device found, idVendor=2341, idProduct=0042, bcdDevice= 0.01
[  109.104606] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[  109.104614] usb 1-3: Manufacturer: Arduino (www.arduino.cc)
[  109.104620] usb 1-3: SerialNumber: 442313133303515171C2
[  109.107643] cdc_acm 1-3:1.0: ttyACM0: USB ACM device

I'm not actually sure if what I did helped or not, but it appears to be working now. Still using that other driver though.

And it rebroke itself after a restart. Still looking for a solution.

To open the Serial Port for the arduino the kernel module cdc_acm needs to be enabled.

I ran lsmod | grep cdc_acm to check my currently running kernel modules. It returned nothing. I added cdc_acm to my kernel modules and rebooted. Now the arduino is detected again.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.