USB port not detected with Arduino IDE 2

No ports are detected even though the Arduino UNO is connected to the front port (some time ago it wasn't detected when connected to the back, but it was when connected to the front, now its reversed).

Connected to the front (doesn't work):
lsusb:
❯ lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 1058:2621 Western Digital Technologies, Inc. Elements 2621
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 046d:c092 Logitech, Inc. G203 LIGHTSYNC Gaming Mouse
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 090c:6300 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) USB2.0 Card Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Connected to the back (works):
❯ lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 1058:2621 Western Digital Technologies, Inc. Elements 2621
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 046d:c092 Logitech, Inc. G203 LIGHTSYNC Gaming Mouse
Bus 003 Device 003: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 090c:6300 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) USB2.0 Card Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Ubuntu 20.04.
Arduino IDE 2: 2.0.2, 2.0.3, 2.0.4-nightly-20230219

Also see Entire "Tools > Port" menu disabled and no ports discovered when using back USB port · Issue #1834 · arduino/arduino-ide · GitHub

I think that you're better of asking this in a Linux forum. If your operating system does not recognise the board, the IDE will never recognise it.

That's more than likely your board. What does dmesg say when you connect it? Disconnect the board, run dmesg -w. When the output finishes, connect the board and check what happens.

How did you install your IDE on Linux/Ubuntu?

I had trouble with installing the IDE on 32-bit Linux/Mint17 until this guy showed everyone how:

It also worked for my 64-bit Linux/Mint20

I am running arduino ide 2 from the executable on a terminal, I downloaded the lastest version from github.

dmesg -w result after connecting to back USB port:

[35410.493646] usb 5-1: new full-speed USB device number 10 using xhci_hcd
[35410.656565] usb 5-1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.54
[35410.656575] usb 5-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[35410.656580] usb 5-1: Product: USB2.0-Serial
[35410.661648] ch341 5-1:1.0: ch341-uart converter detected
[35410.675688] usb 5-1: ch341-uart converter now attached to ttyUSB0

And after connecting to the front USB port:

[35493.919569] usb 1-7: new full-speed USB device number 24 using xhci_hcd
[35494.174007] usb 1-7: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.54
[35494.174017] usb 1-7: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[35494.174021] usb 1-7: Product: USB2.0-Serial
[35494.181817] ch341 1-7:1.0: ch341-uart converter detected
[35494.195850] usb 1-7: ch341-uart converter now attached to ttyUSB0

dmesg tells you the devices connected to the computer.
The IDE is telling you that, at its priv level (probably not in dialout group), it sees no comm ports.

Was it shown in the Tools > Port menu in Arduino IDE after you got that output from dmesg?

It has actually detected it in the ide, I think it might be something with the motherboard or the usb connection.

Thanks for the clarification. That backs this prognosis:

Rather than the alternative:

It is still a problem regardless, but it's important to determine which layer the problem is occurring at so you can focus your attention in the right place.

In both cases, you can run a lsusb in another terminal and both times the board should have been detected and the IDE should have picked it up.

Agreed.

It's not the dialout group or a priv level. USB detection is far before the dialout group comes into the picture. The dialout group only comes into the picture during communication with the USB device; in the Arduino world that would be opening serial monitor or uploading a sketch.

What also was against the dialout group is that adding yourself (or someone) to the dialout group applies to all ports, not a specific one. And OP could communicate with the board on one of the USB ports; so that excludes possibility that the dialout group is the culprit.

1 Like

In the end I switched to using Clion + platformio. This fixed the problem, as I use the command:

pio run --target upload --upload-port /dev/ttyUSB1 && pio device monitor -b 9600 -p /dev/ttyUSB1

That always seems to work.

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