Linux tells me a serial port is in use, but it isn't
Solution 1:
There is probably no real usage of the line, but a permission issue. quick and dirty way to test for me was to execute:
ls -la /dev/ttyUSB0
sudo chmod 666 /dev/ttyUSB0
and retry cu
. If it starts working, you need to take care of the respective udev
file and the user permissions/groups. For my device it looked like this (being member in plugdev
group):
> cat /etc/udev/rules.d/42-CP210x.rules
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SUBSYSTEMS=="usb",
ACTION=="add", MODE="0666", GROUP="plugdev"
Solution 2:
Serial devices privileges are granted to members of the dialout
group. To get connected to /dev/ttyS0
I added the current user to the group using:
sudo adduser <username> dialout
Solution 3:
It seems that this is a bug in cu
. I solved this by changing owner group of /dev/ttyUSB0
using following command:
chown root:root /dev/ttyUSB0