[SOLVED] Tools > Serial Port greyed out in ubuntu 22.04 LTS

I'm trying to upload code to my freenove control board (works as an UNO) but it doesn't work. It says:

An error occurred while uploading the sketch
avrdude: ser_open(): can't open device "/dev/ttyACM0": No such file or directory

Here is my lsusb:

$ lsusb
Bus 001 Device 005: ID 0a5c:5804 Broadcom Corp. BCM5880 Secure Applications Processor with fingerprint swipe sensor
Bus 001 Device 004: ID 0c45:6709 Microdia Integrated_Webcam_HD
Bus 001 Device 003: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 005: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Tools menu:
Screenshot from 2022-05-13 13-57-31

I've tried the same cable and the same arduino on another machine (running windows) and it worked there. I was on an earlier version of linux and it was working, but it stopped working once I upgraded to 22.04.

I'm on ubuntu 22.04 LTS and I'm in the dialout group.
I've been scouring the forums for days.

Help.

What do you see when you monitor the system log with journalctl -f and plug in the device?

1 Like

This is what i see:

May 13 14:06:52 Jebediah gnome-shell[1826]: Object St.Button (0x561aea284760), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
May 13 14:06:52 Jebediah gnome-shell[1826]: Object St.Button (0x561aea284760), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
May 13 14:06:52 Jebediah gnome-shell[1826]: Object St.Button (0x561aea284760), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
May 13 14:06:52 Jebediah gnome-shell[1826]: Object St.Button (0x561aea284760), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
May 13 14:06:52 Jebediah gnome-shell[1826]: Object St.Button (0x561aea284760), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
May 13 14:06:52 Jebediah gnome-shell[1826]: Object St.Button (0x561aea284760), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
May 13 14:06:52 Jebediah gnome-shell[1826]: Object St.Button (0x561aea284760), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
May 13 14:06:52 Jebediah gnome-shell[1826]: Object .Gjs_ui_windowPreview_WindowPreview (0x561aec73a640), has been already disposed — impossible to get any property from it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
May 13 14:06:52 Jebediah gnome-shell[1826]: JS ERROR: TypeError: this.window_container is null
                                            hideOverlay@resource:///org/gnome/shell/ui/windowPreview.js:373:9
                                            vfunc_leave_event/this._idleHideOverlayId<@resource:///org/gnome/shell/ui/windowPreview.js:571:26
May 13 14:06:53 Jebediah systemd[1589]: app-gnome-arduino\x2darduinoide-3534.scope: Consumed 33.109s CPU time.
May 13 14:07:00 Jebediah kernel: usb 2-2: new full-speed USB device number 7 using xhci_hcd
May 13 14:07:00 Jebediah kernel: usb 2-2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
May 13 14:07:00 Jebediah kernel: usb 2-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
May 13 14:07:00 Jebediah kernel: usb 2-2: Product: USB Serial
May 13 14:07:00 Jebediah kernel: ch341 2-2:1.0: ch341-uart converter detected
May 13 14:07:00 Jebediah kernel: usb 2-2: ch341-uart converter now attached to ttyUSB0
May 13 14:07:00 Jebediah mtp-probe[6968]: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
May 13 14:07:00 Jebediah mtp-probe[6968]: bus: 2, device: 7 was not an MTP device
May 13 14:07:00 Jebediah snapd[858]: udevmon.go:149: udev event error: Unable to parse uevent, err: cannot parse libudev event: invalid env data
May 13 14:07:00 Jebediah systemd[1]: Starting Braille Device Support...
May 13 14:07:00 Jebediah brltty[6988]: BRLTTY 6.4 rev BRLTTY-6.4 [https://brltty.app/]
May 13 14:07:00 Jebediah brltty[6988]: BRLTTY 6.4 rev BRLTTY-6.4 [https://brltty.app/]
May 13 14:07:00 Jebediah brltty[6988]: brltty: executing as the invoking user: root
May 13 14:07:00 Jebediah brltty[6988]: executing as the invoking user: root
May 13 14:07:00 Jebediah snapd[858]: hotplug.go:199: hotplug device add event ignored, enable experimental.hotplug
May 13 14:07:00 Jebediah mtp-probe[7002]: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
May 13 14:07:00 Jebediah mtp-probe[7002]: bus: 2, device: 7 was not an MTP device
May 13 14:07:00 Jebediah snapd[858]: udevmon.go:149: udev event error: Unable to parse uevent, err: cannot parse libudev event: invalid env data
May 13 14:07:01 Jebediah brltty[6988]: CLDR open error: No such file or directory: /usr/share/unicode/cldr/common/annotations/en.xml
May 13 14:07:01 Jebediah brltty[6988]: possible cause: the package that defines the CLDR annotations directory is not installed
May 13 14:07:01 Jebediah brltty[6988]: brltty: CLDR open error: No such file or directory: /usr/share/unicode/cldr/common/annotations/en.xml
May 13 14:07:01 Jebediah brltty[6988]: brltty: possible cause: the package that defines the CLDR annotations directory is not installed
May 13 14:07:01 Jebediah brltty[6988]: brltty: emoji substitutiion won't be performed
May 13 14:07:01 Jebediah brltty[6988]: brltty: BrlAPI Server: release 0.8.3
May 13 14:07:01 Jebediah brltty[6988]: emoji substitutiion won't be performed
May 13 14:07:01 Jebediah systemd[1]: Started Braille Device Support.
May 13 14:07:01 Jebediah brltty[6988]: BrlAPI Server: release 0.8.3
May 13 14:07:01 Jebediah brltty[6988]: Linux Screen Driver:
May 13 14:07:01 Jebediah brltty[6988]: brltty: Linux Screen Driver:
May 13 14:07:01 Jebediah kernel: input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input26
May 13 14:07:01 Jebediah systemd-logind[868]: Watching system buttons on /dev/input/event14 (BRLTTY 6.4 Linux Screen Driver Keyboard)
May 13 14:07:01 Jebediah brltty[6988]: USB configuration set error 16: Device or resource busy
May 13 14:07:01 Jebediah brltty[6988]: brltty: USB configuration set error 16: Device or resource busy
May 13 14:07:01 Jebediah brltty[6988]: USB interface in use: 0 (ch341)
May 13 14:07:01 Jebediah brltty[6988]: brltty: USB interface in use: 0 (ch341)
May 13 14:07:01 Jebediah kernel: usb 2-2: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
May 13 14:07:01 Jebediah kernel: ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
May 13 14:07:01 Jebediah kernel: ch341 2-2:1.0: device disconnected
May 13 14:07:01 Jebediah brltty[6988]: NoSpeech Speech Driver:
May 13 14:07:01 Jebediah brltty[6988]: brltty: NoSpeech Speech Driver:

I guess your device is now named ttyUSB0.

My machine still won't recognise the arduino:

$ lsusb
Bus 001 Device 005: ID 0a5c:5804 Broadcom Corp. BCM5880 Secure Applications Processor with fingerprint swipe sensor
Bus 001 Device 004: ID 0c45:6709 Microdia Integrated_Webcam_HD
Bus 001 Device 003: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 007: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And i cant select my ttyUSB0 from the IDE

Hmm, I'm not sure what is going on here. It could be that your braille service is claiming the device. I'll have a closer look at those logs.

I had some problems like that in the past, where some 3d printing software kept hijacking the port.

I did

$ sudo apt remove brltty

and now it works

4 Likes

Great, but I suppose you need this service?

I dont

it came preinstalled I guess

Okay, problem solved then.

I know you did solve the problem but QinHeng Electronics CH340 serial converter is more than likely your Arduino. Does it disappear when you disconnect the board?

It looks like it:

$ lsusb
Bus 001 Device 005: ID 0a5c:5804 Broadcom Corp. BCM5880 Secure Applications Processor with fingerprint swipe sensor
Bus 001 Device 004: ID 0c45:6709 Microdia Integrated_Webcam_HD
Bus 001 Device 003: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I had the exact same issue and this solved it for me as well. The brlttty is apparently some sort of daemon for giving access to the unix console from a refreshable braille display (whatever that is)

For Pop!_OS 22.04 LTS, I am unable to simply remove brltty. Instead, I executed the commands

sudo systemctl stop brltty-udev.service
sudo systemctl mask brltty-udev.service
sudo systemctl stop brltty.service
sudo systemctl disable brltty.service

which I got from https://www.reddit.com/r/pop_os/comments/uf54bi/how_to_remove_or_disable_brltty/

1 Like

For months I had to drop and stop working on my custom made board which uses CH340N for USB-TTL.
This command "sudo apt remove brltty" has solve it.
Thank you for let out what you know.
I can now start working those boards.
Thank once more.

1 Like

I just wanted to let everyone know, I had this same issue, was ready to remove brltty in Synaptics, when I saw there was an update that appeared t address this. I updated it, and my NodeMCU board came right up on port: "/dev/ttyUSB0".

Though I suppose no harm in removing brltty if you don't need it.

from the changelog (I think this applies?), I was on brltty (6.4-4ubuntu2) :

brltty (6.4-4ubuntu3) jammy; urgency=medium

  • Try to resolve brltty conflicting with generic serials (lp: #1958224)
  • debian/brltty.udev.rules, debian/brltty-usb-generic.rules,
    debian/brltty.examples:
    • split the generic identifier udev rules to a separate rule which
      is going to be distributed as an example but not installed by default.
      Those rules are needed by some braille readers to work but conflict
      with cp210x and FTDI serial ports. Those special devices had required
      manual setup in Ubuntu since 2011 and were only added back to the
      default configuration due to a merge error.

That worked!! Thanks!
How on earth did you find that out..?

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