I know this question has been asked many times but I cannot make it work. I have a FTDI serial-usb converter. I have generated 10-fhss-usb.rules in /etc/udev/rules.d/:
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTTA5DMA", SYMLINK+="fhss", GROUP="dialout", MODE="0777", RUN+="echo USB CONNECTED!"I have also added my user to dialout group:
sudo usermod -a -G dialout $USER
and groups $USER returns:
jvgomez : jvgomez adm dialout sudo plugdev lpadmin sambashare(The plugdev group was created following another post) Now, when I connect the USB, running ls -al I can see:
$ ls -al /dev/fhss
lrwxrwxrwx 1 root root 7 Jun 4 17:13 /dev/fhss -> ttyUSB0
$ ls -al /dev/ttyUSB0
crw-rw-r-- 1 root dialout 188, 0 Jun 4 17:13 /dev/ttyUSB0The echo USB CONNECTED! message is never displayed. And when I use screen /dev/fhss/ it immediately says [screen is terminating]. To make it work, I sill have to run chmod
$ sudo chmod a+rwx /dev/fhss And now:
$ ls -al /dev/ttyUSB0
crwxrwxrwx 1 root dialout 188, 0 Jun 4 17:13 /dev/ttyUSB01) What am I missing? I still have to run chmod which is what I am trying to avoid.
2) What is the difference between using SUBSYSTEM=="tty" and SUBSYSTEM=="usb"?
Any help is welcome!
EDIT: adding NAME="my_device" as proposed in Usb udev rule never worked for me didn't change anything.
22 Answers
To make a FTDI breakout work on Ubuntu:
Open the file /etc/group with root permissions:
sudo nano /etc/groupAfter that, search for tty:x5: and dialout:x20:
Add your user to this groups typing your username in front of each line:
tty:x5:<user>
dialout:x20:<user>
You can also use the next two commands to avoid search for the file:
sudo usermod -aG tty <user>
sudo usermod -aG dialout <user>Where <user>, is your user name.
Finally, reboot your computer.
If you want to use udev rules, connect the FTDI Module, then run:
lsusbThis will show the vendorID and the productID. For example:
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching HubWhere 8087 is the vendorID, and 0024 the productID.
Then, create a rule like this:
ATTRS{idVendor}="8087", ATTRS{idProduct}="0024", MODE="0660", GROUP="dialout" 2 I use a FT232RL chip in Bit Bang mode and ran into the same permission issues. The rules suggested above did not work for me for reasons I do not understand. However, with some modification I got it working.
Hopefully this can be of help to someone:
$ lsusb:
Bus 001 Device 023: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
As above, I added the user to dialout and tty:$ sudo usermod -aG dialout $USER
$ sudo usermod -aG tty $USER
But, the line in /etc/udev/rules.d/99-libftdi.rules, is different:
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS={idProduct}=="6001", OWNER="user", MODE="0777", GROUP="dialout"
It could be that the crucial difference is SUBSYSTEM=="usb".