Find the answer to your Linux question:
Results 1 to 6 of 6
Hi all, I hope this is not the wrong section ... I managed to run an usb-rs232 adpater on a mint 13 distro with: PHP Code: sudo modprobe ftdi_sio vendor = 0x05d1 product = ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2012
    Posts
    5

    Serial port adapter


    Hi all,
    I hope this is not the wrong section ...

    I managed to run an usb-rs232 adpater on a mint 13 distro with:
    PHP Code:
    sudo modprobe ftdi_sio vendor=0x05d1 product=0x5001
    sudo chmod o
    +rw /dev/ttyUSB0 
    But I've to do this everytime the pc starts.
    For the permissions on ttyUSB* I found a solution adding my account to dialout group.
    But how run modprobe every time I plugin the adapter?

    The manufactor guide says to copy a .rules file to

    /etc/udev/rules.d

    but it doesn't work.
    This is the file (99-bbftdisio.rules):

    PHP Code:
     *********** Brainboxes USB2Serial range *********************
    #
    # US-101 - USB 1xRS232
    SYSFS{idProduct}=="1011"SYSFS{idVendor}=="05d1"RUN+="/sbin/modprobe -q ftdi_sio product=0x1011 vendor=0x05d1"
    # US-324 - USB 1xRS422/485 1Mbaud
    SYSFS{idProduct}=="1013"SYSFS{idVendor}=="05d1"RUN+="/sbin/modprobe -q ftdi_sio product=0x1013 vendor=0x05d1"
    # US_357 - USB 1xRS232/422/485
    SYSFS{idProduct}=="7001"SYSFS{idVendor}=="05d1"RUN+="/sbin/modprobe -q ftdi_sio product=0x7001 vendor=0x05d1"
    # US-257 - USB 2xRS232 1Mbaud
    SYSFS{idProduct}=="5001"SYSFS{idVendor}=="05d1"RUN+="/sbin/modprobe -q ftdi_sio product=0x5001 vendor=0x05d1"
    # US-313 - USB 2xRS422/485 1Mbaud
    SYSFS{idProduct}=="6001"SYSFS{idVendor}=="05d1"RUN+="/sbin/modprobe -q ftdi_sio product=0x6001 vendor=0x05d1" 
    What I've to do to load ftdi_sio when the adapter is plugged in?

    Thanks
    Last edited by grumpos; 11-14-2012 at 04:21 PM.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hi,

    Have you looked at the output of udevadm info?

    First, with the device plugged in, find your tty device in /sys:
    Code:
    find /sys/devices/ -name ttyUSB0
    Then run udevadm info on the path that command returns, e.g.:
    Code:
    udevadm info --query=all --path=/sys/devices/pnp0/00\:07/tty/ttyUSB0
    also, try using udevadm test, while it is plugged in, e.g.:
    Code:
    udevadm test /dev/ttyS0
    the output of that command should show you any errors in your rules file, and also show you other rules that are getting processed.

  3. #3
    Just Joined!
    Join Date
    Nov 2012
    Posts
    5
    hi atreyu,
    thanks for your help

    this is the output of udevadm test /dev/ttyS0

    Code:
    add_rule: invalid rule '/etc/udev/rules.d/70-bbftdisio.rules:66'
    add_rule: unknown key 'SYSFS{idProduct}' in /etc/udev/rules.d/70-bbftdisio.rules
    Each rule give the same error. Some advice?

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Can you post that file (/etc/udev/rules.d/70-bbftdisio.rules) in its entirety?

    FYI, the :66 at the end of the line means that udev is detecting a syntax problem on line 66 of that file. Also, clearly, your version of udev does not honor the SYSFS{idProduct} key either. That has aggravated me it the past, too.

  5. #5
    Just Joined!
    Join Date
    Nov 2012
    Posts
    5
    I posted a piece of .rules on first post (all the rules are the same, only vendor and product change)

    However, I found that SYSFS, BUS and ID keys have been removed from udev.
    So, I changed SYSFS with ATTR key and now the rule works and the adapter is attached to ttyUSB0 when it is plugged in.

    Thanks for your help

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Sweet, glad it's sorted. I'll mark this thread as Solved for you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •