4

I am using a NodeMcu with Arduino IDE on Ubuntu. I have managed to upload the blink script and it work. Now, when i plug the nodemcu, the serial port /dev/ttyUSB0 is briefly available in the IDE. After 2 seconds, the port menu is grayed out again and I can't use it.

Same with ls /dev/tty* /dev/ttyUSB0 is briefly available.

/dev/tty    /dev/tty23  /dev/tty39  /dev/tty54      /dev/ttyS10  /dev/ttyS26
/dev/tty0   /dev/tty24  /dev/tty4   /dev/tty55      /dev/ttyS11  /dev/ttyS27
/dev/tty1   /dev/tty25  /dev/tty40  /dev/tty56      /dev/ttyS12  /dev/ttyS28
/dev/tty10  /dev/tty26  /dev/tty41  /dev/tty57      /dev/ttyS13  /dev/ttyS29
/dev/tty11  /dev/tty27  /dev/tty42  /dev/tty58      /dev/ttyS14  /dev/ttyS3
/dev/tty12  /dev/tty28  /dev/tty43  /dev/tty59      /dev/ttyS15  /dev/ttyS30
/dev/tty13  /dev/tty29  /dev/tty44  /dev/tty6       /dev/ttyS16  /dev/ttyS31
/dev/tty14  /dev/tty3   /dev/tty45  /dev/tty60      /dev/ttyS17  /dev/ttyS4
/dev/tty15  /dev/tty30  /dev/tty46  /dev/tty61      /dev/ttyS18  /dev/ttyS5
/dev/tty16  /dev/tty31  /dev/tty47  /dev/tty62      /dev/ttyS19  /dev/ttyS6
/dev/tty17  /dev/tty32  /dev/tty48  /dev/tty63      /dev/ttyS2   /dev/ttyS7
/dev/tty18  /dev/tty33  /dev/tty49  /dev/tty7       /dev/ttyS20  /dev/ttyS8
/dev/tty19  /dev/tty34  /dev/tty5   /dev/tty8       /dev/ttyS21  /dev/ttyS9
/dev/tty2   /dev/tty35  /dev/tty50  /dev/tty9       /dev/ttyS22  /dev/ttyUSB0
/dev/tty20  /dev/tty36  /dev/tty51  /dev/ttyprintk  /dev/ttyS23
/dev/tty21  /dev/tty37  /dev/tty52  /dev/ttyS0      /dev/ttyS24
/dev/tty22  /dev/tty38  /dev/tty53  /dev/ttyS1      /dev/ttyS25

After 2 seconds:

/dev/tty    /dev/tty23  /dev/tty39  /dev/tty54      /dev/ttyS10  /dev/ttyS26
/dev/tty0   /dev/tty24  /dev/tty4   /dev/tty55      /dev/ttyS11  /dev/ttyS27
/dev/tty1   /dev/tty25  /dev/tty40  /dev/tty56      /dev/ttyS12  /dev/ttyS28
/dev/tty10  /dev/tty26  /dev/tty41  /dev/tty57      /dev/ttyS13  /dev/ttyS29
/dev/tty11  /dev/tty27  /dev/tty42  /dev/tty58      /dev/ttyS14  /dev/ttyS3
/dev/tty12  /dev/tty28  /dev/tty43  /dev/tty59      /dev/ttyS15  /dev/ttyS30
/dev/tty13  /dev/tty29  /dev/tty44  /dev/tty6       /dev/ttyS16  /dev/ttyS31
/dev/tty14  /dev/tty3   /dev/tty45  /dev/tty60      /dev/ttyS17  /dev/ttyS4
/dev/tty15  /dev/tty30  /dev/tty46  /dev/tty61      /dev/ttyS18  /dev/ttyS5
/dev/tty16  /dev/tty31  /dev/tty47  /dev/tty62      /dev/ttyS19  /dev/ttyS6
/dev/tty17  /dev/tty32  /dev/tty48  /dev/tty63      /dev/ttyS2   /dev/ttyS7
/dev/tty18  /dev/tty33  /dev/tty49  /dev/tty7       /dev/ttyS20  /dev/ttyS8
/dev/tty19  /dev/tty34  /dev/tty5   /dev/tty8       /dev/ttyS21  /dev/ttyS9
/dev/tty2   /dev/tty35  /dev/tty50  /dev/tty9       /dev/ttyS22
/dev/tty20  /dev/tty36  /dev/tty51  /dev/ttyprintk  /dev/ttyS23
/dev/tty21  /dev/tty37  /dev/tty52  /dev/ttyS0      /dev/ttyS24
/dev/tty22  /dev/tty38  /dev/tty53  /dev/ttyS1      /dev/ttyS25

How can I fix that? I have try all the usb ports. The NodeMCU settings: enter image description here

Actually Using Ubuntu 22.04 LTS

EDIT: While running sudo dmesg -w and connecting the mcu I get:

[ 3726.038486] usb 1-1: new full-speed USB device number 13 using xhci_hcd
[ 3726.220532] usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ 3726.220536] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3726.220537] usb 1-1: Product: CP2102 USB to UART Bridge Controller
[ 3726.220538] usb 1-1: Manufacturer: Silicon Labs
[ 3726.220539] usb 1-1: SerialNumber: 0001
[ 3726.229998] cp210x 1-1:1.0: cp210x converter detected
[ 3726.231005] usb 1-1: cp210x converter now attached to ttyUSB0
[ 3727.565688] usb 1-1: usbfs: interface 0 claimed by cp210x while 'brltty' sets config #1
[ 3727.566375] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[ 3727.566391] cp210x 1-1:1.0: device disconnected
6
  • 1
    the USB device here is the USB chip on the NodeMcu board, not the esp8266,
    – Juraj
    May 6, 2022 at 13:04
  • 3
    You may tail -f /var/log/syslog right before plugging in the board, and see if anything interesting shows up. May 6, 2022 at 13:56
  • 4
    sudo dmesg -w will show you what's going on. Maybe it's shutting down the port because it's drawing too much current?
    – Majenko
    May 6, 2022 at 14:30
  • I have edited the post with result of the command. May 13, 2022 at 5:55
  • From these logs, it looks like the brltty daemon tried to mess with the serial port. Can you disable this daemon and try again? May 13, 2022 at 7:33

1 Answer 1

4

This could be happening because Brltty application. Remove it and try again.

sudo apt remove brltty
sudo apt autoclean && sudo apt autoremove
2
  • 2
    brother you don't know you just saved my life for the last 2 days i was looking for this Jun 14, 2023 at 14:40
  • I'm glad about it... Aug 18, 2023 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.