getting ftdi usb to serial to work - udev help wanted

Discussion in 'Linux' started by clauswilson, Feb 21, 2009.

  1. clauswilson

    clauswilson

    Joined:
    Nov 2, 2008
    Messages:
    16
    Likes Received:
    0
    I am making my own rule for udev
    /etc/udev/rules.d/81-ftdi.rules
    contains
    BUS=="usb", SYSFS{idProduct}=="6001", SYSFS{idVendor}=="0403", SYSFS{serial}=="A8007q5V", NAME="ttyUSB0"
    It gives me the /dev/ttyUSB0 but I am not able to do anything with it.
    How can I get it to be a real device which I can communicate with?
    On AA1 lsusb gives:
    Bus 002 Device 006: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO
    On Ubuntu (where things work) I get
    Bus 001 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
    The subtle difference is of course in the end.
    What makes Ubuntu "think" right?
     
    clauswilson, Feb 21, 2009
    #1
  2. clauswilson

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    lsusb does very little, it only asks the device for its numbers ( vendor and product ) and then then it looks for these numbers in a file where it find these descriptions, so the result depends on what happens to be in this file, which may be older or newer. The system only works with the numbers.

    As far as I understand it, if you have the module in place, and have run 'depmod' and this module actually supports this device, the module should be loaded automatically when you insert it. The system sees the number and loads the module.

    The module will then create the device-node in /dev/ .

    An udev-rule might help to load the module, if this does not happen automatically.

    HTH, --Japser.
     
    Japser, Feb 21, 2009
    #2
  3. clauswilson

    clauswilson

    Joined:
    Nov 2, 2008
    Messages:
    16
    Likes Received:
    0
    As for depmod I didn't run this command yet as it killed my former setup. I have to assure that everything is working alright again and making a full backup before I call depmod again. I am still a little shocked that depmod could make my computer unbootable - as I got no errors or warnings.
    But with creating a rule with udev I can now get a fine /dev/ttyUSB0 which according to dmesg is connected to the driver of ftdi_sio. Also according to dmesg my device is recognized correctly. Only my application doesn't see this usb-port and thus it is not working. I think I have to ask at the applications forum (arduino.cc) why this is so.
    One important thing is that now I know how to restore my computer. (Thanks to Acer for making a lovely easy restore process!) So I can experiment.
    How do I send any commands to the usb-port so that I can test that it actually works? (Even though everything looks right).
     
    clauswilson, Feb 22, 2009
    #3
  4. clauswilson

    clauswilson

    Joined:
    Nov 2, 2008
    Messages:
    16
    Likes Received:
    0
    Now I have sent a few numbers to the usb-port. It works. It only doesn't with my application. So I can conclude that the driver works.
     
    clauswilson, Feb 22, 2009
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.