Connecting Ubuntu 22.04 With Arduino

I had some problems connecting my Ubuntu machine with an Arduino card.

I installed the Arduino IDE V2 via flask without any problems, but it was unable to communicate with the USB ports. This is a common problem with flask applications.

To allow communication to USB ports, add the following lines to the file at "/etc/udev/rules.d/50-arduino.rules".

KERNEL=="ttyUSB[0-9]*",MODE="0666"

KERNEL=="ttyACM[0-9]*",MODE="0666"

Log off (or restart) for the system to pick up this change. Although this allowed the IDE to connect to the relevant USB port correctly.

I found that a program was interfering with the USB port and not allowing the Adruino board to connect. To see this I ran dmesg with the "-w" flag (for watch).

sudo dmesg -w

Then, plug in the board and watch for output that looks like this.

[ 2545.167358] ch341 1-4:1.0: ch341-uart converter detected
[ 2545.167775] ch341-uart ttyUSB0: break control not supported, using simulated break
[ 2545.167824] usb 1-4: ch341-uart converter now attached to ttyUSB0
[ 2545.709848] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input34
[ 2545.807529] usb 1-4: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1

If you see this then the best solution (assuming you aren't using it) is to remove the BRLTTY screen keyboard driver using apt.

sudo apt remove brltty

Unplug and plug the board back in.

The Arduino IDE should work completely now

Add new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
4 + 6 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.