3

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.

  • Did you ever get a solution? – Goddard Apr 15 '16 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 V Apr 19 '16 at 11:41
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"
  • 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 '17 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". – PJ_Finnegan Feb 12 '19 at 16:24
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".

  • It worked for me. You can substitute ATTRS="idProduct" with ATTRS{idProduct} though, as in idVendor. – PJ_Finnegan Feb 12 '19 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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