5

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/ttyUSB0

The 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/ttyUSB0

1) 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.

2
  • Did you ever get a solution?
    – Goddard
    Apr 15, 2016 at 5:51
  • @Goddard I have it working yes, although the udev rule is exactly the same as posted (with NAME="my_device" ). I cannot tell what I did to make it work, I cannot remember, sorry!
    – Javi
    Apr 19, 2016 at 11:41

2 Answers 2

3

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".

1
  • It worked for me. You can substitute ATTRS="idProduct" with ATTRS{idProduct} though, as in idVendor. Feb 12, 2019 at 16:33
2

To make a FTDI breakout work on Ubuntu:

Open the file /etc/group with root permissions:

sudo nano /etc/group

After 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:

lsusb

This will show the vendorID and the productID. For example:

Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

Where 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
  • 1
    This was what I was looking for all the time. I had got the "ftdi" driver as part of my linux kernel (/usr/share/hwdatausb.ids) to detect the vendor ID available and could confirm that "udev rules" had my Vid and Pid. But still, the driver wasn't detected the connection. THis was the trick ! Thanks @Gtronick !!
    – Adit Ya
    Jul 20, 2017 at 10:21
  • 2
    There's a typo, it should be ATTRS{idVendor}="8087", ATTRS{idProduct}="0024", MODE="0660", GROUP="dialout", instead of the second "ATRRS". Feb 12, 2019 at 16:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .