FTDI USB to serial device

Discussion in 'Linux' started by George Shering, Nov 13, 2008.

  1. George Shering

    George Shering

    Joined:
    Nov 5, 2008
    Messages:
    24
    Likes Received:
    0
    I am trying to use this device. Following another driver post I did:

    $ dmesg | tail -3
    usb 2-2: USB disconnect, address 2
    usb 2-2: new full speed USB device using uhci_hcd and address 3
    usb 2-2: configuration #1 chosen from 1 choice

    and

    $ lsusb
    Bus 005 Device 001: ID 0000:0000
    Bus 004 Device 001: ID 0000:0000
    Bus 003 Device 002: ID 045e:007d Microsoft Corp. Notebook Optical Mouse
    Bus 003 Device 001: ID 0000:0000
    Bus 002 Device 003: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO
    Bus 002 Device 001: ID 0000:0000
    Bus 001 Device 002: ID 064e:d101 Acer Crystal Eye Webcam
    Bus 001 Device 001: ID 0000:0000

    I was told that on "full" linux systems this device appeared as ttyUSB or similar in /dev and could be programmed as a normal serial port. Nothing appears in the Aspire One /dev directory.

    How can I use this device?
     
    George Shering, Nov 13, 2008
    #1
  2. George Shering

    fweigel

    Joined:
    Oct 24, 2008
    Messages:
    118
    Likes Received:
    0
    This requires a driver -- which one? I am not sure. I'll leave that answer to someone else.
     
    fweigel, Nov 13, 2008
    #2
  3. George Shering

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Try this...
    download the attached and unzip
    $ bunzip2 ftdi_sio.ko.bz2
    move it to the right folder (might be slightly different path for you?)
    $ sudo mv ftdi_sio.ko /lib/modules/2.6.23.9lw/kernel/drivers/usb/serial/
    refresh the modules
    $ sudo depmod
    and try inserting the new module
    $ sudo modprobe ftdi_sio
    Fingers crossed, if you plug your usb cable the tty devices should appear.
     
    Duncan_Rowland, Nov 13, 2008
    #3
  4. George Shering

    George Shering

    Joined:
    Nov 5, 2008
    Messages:
    24
    Likes Received:
    0
    [user@localhost Downloads]$ dmesg | tail -3
    ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
    drivers/usb/serial/ftdi_sio.c: Detected FT232RL
    usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0

    and ttyUSB0 does indeed appear in /dev.

    Thank you Duncan (again). How do you know all this?
    Far more interesting than just plugging it into my Aspire 5103 and seeing COM7 appear in Device Manager!
    I was a bit worried when you said "it may be different in your system". Are not all Aspire One the same?
     
    George Shering, Nov 14, 2008
    #4
  5. George Shering

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Hey great - glad it works :)
    Actually, I store very little "locally", but I augment my own memory with google and that makes me appear knowledable!
    e.g.
    google for "Future Technology Devices International, Ltd 8-bit FIFO"
    First link is to :http://hardware4linux.info/component/10716/
    and that tells you the module you need (ftdi_sio).
    I did a bit more google on that module on the One and it became clear it would need compiling.
    (The driver is standard in most Linux distros', but Acer took it out of Linpus - probably just to save space)
    I have the stuff already setup to compile modules on my One, so that's what I did (couldn't test as I don't have the hardware).
    BTW - At the mo, you might find you need to modprobe the driver in everytime you reboot.
    I don't have my One with me, but it should be straightforward to make this happen automatically.
    Also, I'm sure you're already doing so, but I'd recommend backing up your entire system soon :)
    Best, -Duncan.
     
    Duncan_Rowland, Nov 14, 2008
    #5
  6. George Shering

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    Duncan,

    I'm just curious, but where did you manage to get the header files for the kernel that Acer includes with Linpus, so that you can compile modules like this? Some time ago, for a friend, I tried to install VMPlayer, but of course that required compiling some modules. The headers didn't match the kernel, so never got that running. Had to resort to Ubuntu to get that all working.

    Cheers.
     
    rbil, Nov 14, 2008
    #6
  7. George Shering

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Hiya rbil,
    I think I followed the instructions from the first link, and downloaded the .zip from the second link on this page:
    viewtopic.php?f=17&t=2097&st=0&sk=t&sd=a&start=10#p18524

    (For my own reference, I also did the following to compile the usb-serial driver)
    942 cd /usr/src
    943 ls
    944 cd linux-2.6.23.9
    945 ls
    946 mv .config .config.duncan
    947 sudo mv .config .config.duncan
    948 sudo cp /boot/config_080627 .config
    949 sudo make oldconfig
    950 sudo make modules
    951 sudo make drivers/usb/serial/ftdi_sio.ko
    952 ls drivers/usb/serial/
    953 ls drivers/usb/serial/*.ko
    954 sudo make menuconfig
    955 sudo make drivers/usb/serial/ftdi_sio.ko
    956 cd drivers/usb/serial/
    957 ls
    958 ls *.ko
    959 cp ftdi_sio.ko /lib/modules/2.6.23.9lw/kernel/drivers/usb/serial/
     
    Duncan_Rowland, Nov 14, 2008
    #7
  8. George Shering

    George Shering

    Joined:
    Nov 5, 2008
    Messages:
    24
    Likes Received:
    0
    The ttyUSB0 entry in /dev seems to persist through multiple restarts. Also

    [user@localhost dev]$ dmesg | tail -6
    ftdi_sio 2-2:1.0: device disconnected
    usb 2-2: new full speed USB device using uhci_hcd and address 5
    usb 2-2: configuration #1 chosen from 1 choice
    ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
    drivers/usb/serial/ftdi_sio.c: Detected FT232RL
    usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0

    So I think the installation persists, thank you again.
    I do not know how to back up my system?
    I have also made changes to group-app.xml and some of the .desktop files so maybe I should?
    But I have never done a backup of a windows system? Of course I save elsewhere any significant code I have written myself.

    I like rbil's solution of changing the operating system to get a device to work. Reminds me of the joke about windows and cars, "in case of problems re-install the engine". This seems like fitting one from another manufacturer!
     
    George Shering, Nov 14, 2008
    #8
  9. George Shering

    George Shering

    Joined:
    Nov 5, 2008
    Messages:
    24
    Likes Received:
    0
    Re: FTDI USB to serial device, permissions

    A small problem, Duncan, sorry to bother you. The permissions set for ttyUSB0 are no access for programs, even when started by user.
    I have to do a chmod, but if the computer stops or sleeps, or if the FTDI is re-plugged, the permissions go back. See
    [user@localhost ~]$ ls -l /dev/ttyUSB0
    crw-rw---- 1 root uucp 188, 0 2008-11-16 23:08 /dev/ttyUSB0
    [user@localhost ~]$ sudo chmod 666 /dev/ttyUSB0
    [user@localhost ~]$ ls -l /dev/ttyUSB0
    crw-rw-rw- 1 root uucp 188, 0 2008-11-16 23:08 /dev/ttyUSB0
    This rw "other" access seems to be necessary for compiled programs executed from the command line, even in user mode, otherwise I get "permission denied". Can the permissions be set in the build or installation phase?
    George.
     
    George Shering, Nov 16, 2008
    #9
  10. George Shering

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    You can solve this by adding yourself to the group "uucp":

    --Japser.
     
    Japser, Nov 17, 2008
    #10
  11. George Shering

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    p.s.: user must log out and in before it works.
     
    Japser, Nov 17, 2008
    #11
  12. George Shering

    sanger440

    Joined:
    Nov 26, 2008
    Messages:
    22
    Likes Received:
    0
    Thanks to all for this information. I was able to set my FTDI usb/serial adapter up and it seems to work well. I am actually running a serial device using Wine. I had to use a symbolic link back to the /dev/ttyusb0 device and then wine found the com port. 1 I use a Wide Band oxygen sensor in my race car and I use a windows program to datalog the sensor read outs. I was hoping to run this from linux and save me from having to set up a dual boot on my AspireOne. I use to knock my old laptop OS's off line during a race. I am hoping the SSD drive in this machine will be more stable in the car.

    Thanks again.

    Sanger.
     
    sanger440, Dec 27, 2008
    #12
  13. George Shering

    George Shering

    Joined:
    Nov 5, 2008
    Messages:
    24
    Likes Received:
    0
    I got the FTDI USB to serial converter working thanks to help from this group, thanks again.
    I got the rest of my program working but then found the ftdi_sio too slow for data transfer mode I needed.
    Three and a half times slower than on the PC, same hardware.
    FTDI offer another driver D2XX. I tried this and it was the same speed.
    I phoned FTDI who were very helpful and explained that there is a latency timer.
    A default value is compiled in in the ftdi_sio but is settable in the D2XX.
    I set it to the minimum in D2X and the speed then became identical to the PC, great.
    The ftdi_sio would give the same results I suppose, so if anyone finds it too slow then it can be re-compiled.
    George.
     
    George Shering, Dec 31, 2008
    #13
  14. George Shering

    sanger440

    Joined:
    Nov 26, 2008
    Messages:
    22
    Likes Received:
    0
    George,

    Can you give us a little more info on where you got the driver and how you compiled it? I think I am having data problems on my setup and would like to try your faster driver.

    I have compiled stuff before in linux but it has been kind of hit and miss for me on getting it to work. So any hints or instructions on how you compiled your new driver would be very helpful.

    Sanger
     
    sanger440, Jan 6, 2009
    #14
  15. George Shering

    Syco54645

    Joined:
    Aug 19, 2008
    Messages:
    48
    Likes Received:
    0
    not to necro, but i need this for my arduino and the file ftdi_sio.ko.bz2 has expired. anyone have it?
     
    Syco54645, Feb 19, 2009
    #15
  16. George Shering

    Dros

    Joined:
    Sep 12, 2008
    Messages:
    13
    Likes Received:
    0
    Hi Duncan,

    could you please repost the ftdi kernel module? It's not anymore downloadable from this thread. I think the admin has killed it to save space. And I need it..:)

    TIA
    Alex
     
    Dros, Feb 27, 2009
    #16
  17. George Shering

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Japser, Feb 27, 2009
    #17
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.