User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Multiple USB > Serial adaptors

Fri Jun 08, 2012 11:07 pm

I'm working on a little project to control video recorders from a Raspberry Pi using 'Sony 9-pin protocol' which is RS422. The hardware is a Lego clad Pi powered by an iPhone charger with a Logitech K260 wireless keyboard and mouse, USB hub and various USB to RS422 or RS232 and converter combinations - all Prolific PL2303 based. The software is my first attempt at Python, running under the standard Debian Squeeze with Pyserial to handle the serial comms. I haven't done much serious programming for a while, but I used to make a living designing PIC hardware and software so I'm not a complete novice. The Pi is doing a great job controlling a single VT machine, but when I try to open more than one serial port...

Code: Select all

for vtr in range(0,12):
    if os.path.exists('/dev/ttyUSB'+str(vtr)):
        ser.append(serial.Serial('/dev/ttyUSB'+str(vtr), 38400, timeout=0.01, parity=serial.PARITY_ODD, stopbits=1))
        parked.append(vtr+1)
...I get an error...

Code: Select all

File "/usr/local/lib/python2.6/dist-packages/serial/serialposix.py", line 278, in open
raise SerialException("could not open port %s: %s" % (self._port, msg))
serial.serialutil.SerialException: could not open port /dev/ttyUSB1: [Errno 71] Protocol error: '/dev/ttyUSB1'
The same code works very nicely on a netbook running Ubuntu, but this is meant to be a Raspberry Pi project! I did wonder if it was a problem with my USB hub, but I have now tried three different hubs including a new D-Link 7 port - which can power the Pi quite nicely - and I don't think that's the problem. The first port opens fine but any further ports give the error. I read somewhere that it could be a timeout problem in the driver, but can't seem to find that page now.
Any ideas would be most welcome...

User avatar
rew
Posts: 438
Joined: Fri Aug 26, 2011 3:25 pm

Re: Multiple USB > Serial adaptors

Sat Jun 09, 2012 7:50 pm

This requires some debugging.

As a test, can you start to open /dev/ttyUSB1 first, and see what happens? Maybe that will give you a hint.

It could be possible that your python module does not allow you to open more than one serial port at a time. On the other hand, you say that on the netbook it does...

Another thing to try is to use "strace". This will show you all system calls that a program does. It should show you what system call is failing.
Check out our raspberry pi addons: https://www.bitwizard.nl/shop/

stevePIman
Posts: 24
Joined: Tue May 29, 2012 8:07 am

Re: Multiple USB > Serial adaptors

Sun Jun 10, 2012 9:07 am

Hi,

I use a prolific USB<->RS232 cable with some success. As suggested, try a couple of commands first to verify the Pi sees the adaptor:

Code: Select all

lsusb
ls /dev/ttyU*
With my double ported cable I get a couple of lines of blurb mentioning Prolific from lsusb and the devs ttyUSB0 and ttyUSB1 created. Here's my Python code that I use to talk to a serial IO board:

Code: Select all

#! /usr/bin/python

import time
import serial
import os

# configure the serial connections (the parameters differs on the device you are connecting to)
ser = serial.Serial(
        port='/dev/ttyUSB1',
        baudrate=9600,
        parity=serial.PARITY_NONE,
        stopbits=serial.STOPBITS_ONE,
        bytesize=serial.EIGHTBITS
)

ser.open()
ser.isOpen()
inp=1
finName='/tmp/ip'
foutName='/tmp/op'
running = 1
while running == 1 :
        if os.path.exists(finName):
                fin = open(finName,'r+')
                cmd = fin.readline()
                fin.close()
                os.remove(finName)

                if cmd == 'exit\n':
                        ser.close()
                        running = 0
                else:
                        ser.write(cmd + '\r\n')
                        out = ''
                        # let's wait one second before reading output (let's give device time to answer)
                        time.sleep(1)
                        while ser.inWaiting() > 0:
                                out += ser.read(1)

                        if out != '':
                                fout = open(foutName,'w')
                                fout.write( out )
                                fout.close()
        else:
                time.sleep(1)
Take the bits you need. It reads one line of text from an input file (ip) and sends the text to the device then reads any response & puts it in the output (op) file. I start this via init.d & have a web front end I'm working on to create the ip file & read the op file. My problem at the moment is sometimes whilst the Pi is running (it's on 24x7) ttyUSB1 will dissappear & USB2 will appear... which causes the above io.py to fail :( . A work in progress....

Oh, you can use minicom to talk to your device serially too, if it accepts ASCII characters.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Multiple USB > Serial adaptors

Sun Jun 10, 2012 8:43 pm

Thanks for the replies.

rew, changing ttyUSB numbers makes no difference, it always fails when I try to open a second port. Even with a long (six second) sleep between ports it still fails.

Running strace the failure looks like...

Code: Select all

open("/dev/ttyUSB1", O_RDRWIO_NOCTTYIO_NONBLOCKIO_LARGEFILE) = -1 EPROTO (Protocol error)
... The previous open call returning a value of 3.

stevePIman, ls/dev/ttyU* shows all the serial ports I have plugged in. My program will connect to any one of those ports, but if I try to connect to a second one that is when it fails with an error. If I set up a port the way you show and then try to open it, it says port already open.

I did think about trying FTDI serial ports instead, but looking on this forum they seems to have more problems.

User avatar
patrikg
Posts: 168
Joined: Sun Mar 18, 2012 10:19 pm

Re: Multiple USB > Serial adaptors

Sun Jun 10, 2012 9:27 pm

Just a tip.

Have you tried to run the script as root ??
I struggle i little bit with my jtag ftdi adapter on my x86 ubuntu setup because of lagging of permission to the device.

/Patrik

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Multiple USB > Serial adaptors

Sun Jun 10, 2012 9:59 pm

Good thought, patrikg, but that doesn't seem to make any difference. But when I tried it on the netbook I was running through sudo to get permission for the serial ports, so there may be something in it.

I have tried running the open command in a try except loop to see if it would work if I kept retrying. It didn't.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Multiple USB > Serial adaptors

Tue Jun 12, 2012 4:00 pm

I have now tried the program on Debian Wheezy and Arch Linux, and the same thing happens. Also with a different power supply, different hub and different pl2303 USB adaptors. So the only common link seems to be the Raspberry Pi. And the Lego, but that's probably a red herring.

karl101
Posts: 70
Joined: Wed Jan 11, 2012 10:09 am

Re: Multiple USB > Serial adaptors

Sun Jun 17, 2012 11:47 am

the user your using to run the python needs to be a member of the dialout group. Check this with:

Code: Select all

$ groups
if not then add to the group with:

Code: Select all

$ sudo usermod -a -G dialout <username>
Karl

karl101
Posts: 70
Joined: Wed Jan 11, 2012 10:09 am

Re: Multiple USB > Serial adaptors

Sun Jun 17, 2012 12:18 pm

This *seems* to work on Debian Pi. I only have one USB serial device though.

Code: Select all

#! /usr/bin/python

import serial
import pprint

serialConn = {}
for vtr in range(0,12):
    tryPort='/dev/ttyUSB' +str(vtr)
    try:
        ser = serial.Serial(port=tryPort, baudrate=19200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS)
        serialConn[tryPort[8:]] = ser
        print "++ found serial on " + tryPort
    except:
        print "-- no serial on " + tryPort

pp = pprint.PrettyPrinter(indent=4)
print " "
print "++ serial ports open (open=True):"
pprint.pprint(serialConn)


serialConn['USB0'].open()
print serialConn['USB0'].isOpen()

for con in serialConn:
    serialConn[con].close()

print " "
print "++ serial ports open (open=False):"
pprint.pprint(serialConn)
Karl

rgh
Posts: 212
Joined: Fri Nov 25, 2011 3:53 pm

Re: Multiple USB > Serial adaptors

Sun Jun 17, 2012 12:35 pm

The code karl101 posted above seems to work with multiple devices, on raspbian with the latest kernel, at least.

These are my devices:


[ 54.076120] usb 1-1.3.2: new full speed USB device number 5 using dwc_otg
[ 54.177569] usb 1-1.3.2: New USB device found, idVendor=067b, idProduct=2303
[ 54.184858] usb 1-1.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 54.193844] usb 1-1.3.2: Product: USB-Serial Controller
[ 54.200162] usb 1-1.3.2: Manufacturer: Prolific Technology Inc.
[ 54.284031] usbcore: registered new interface driver usbserial
[ 54.293805] USB Serial support registered for generic
[ 54.302858] usbcore: registered new interface driver usbserial_generic
[ 54.310673] usbserial: USB Serial Driver core
[ 54.326662] USB Serial support registered for pl2303
[ 54.332015] pl2303 1-1.3.2:1.0: pl2303 converter detected
[ 54.343341] usb 1-1.3.2: pl2303 converter now attached to ttyUSB0
[ 54.353473] usbcore: registered new interface driver pl2303
[ 54.360348] pl2303: Prolific PL2303 USB to serial adaptor driver
[ 69.686404] usb 1-1.3.4: new full speed USB device number 6 using dwc_otg
[ 69.788132] usb 1-1.3.4: New USB device found, idVendor=067b, idProduct=2303
[ 69.795418] usb 1-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 69.804281] usb 1-1.3.4: Product: USB-Serial Controller
[ 69.810625] usb 1-1.3.4: Manufacturer: Prolific Technology Inc.
[ 69.827071] pl2303 1-1.3.4:1.0: pl2303 converter detected
[ 69.849469] usb 1-1.3.4: pl2303 converter now attached to ttyUSB1

and when I run karl101's code:

richard@pisces:~$ ./ttyUSB.py
++ found serial on /dev/ttyUSB0
++ found serial on /dev/ttyUSB1
-- no serial on /dev/ttyUSB2
-- no serial on /dev/ttyUSB3
-- no serial on /dev/ttyUSB4
-- no serial on /dev/ttyUSB5
-- no serial on /dev/ttyUSB6
-- no serial on /dev/ttyUSB7
-- no serial on /dev/ttyUSB8
-- no serial on /dev/ttyUSB9
-- no serial on /dev/ttyUSB10
-- no serial on /dev/ttyUSB11

++ serial ports open (open=True):
[Serial<id=0x21de4d0, open=True>(port='/dev/ttyUSB0', baudrate=19200, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False),
Serial<id=0x21de510, open=True>(port='/dev/ttyUSB1', baudrate=19200, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)]

++ serial ports open (open=False):
[Serial<id=0x21de4d0, open=False>(port='/dev/ttyUSB0', baudrate=19200, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False),
Serial<id=0x21de510, open=False>(port='/dev/ttyUSB1', baudrate=19200, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)]
richard@pisces:~$


Also I can link the two serial ports with a crossover cable and use screen to access them, via "screen /dev/ttyUSB0 9600,cs8" and "screen /dev/ttyUSB1 9600,cs8", and then whatever I type in one screen window appears in the other. So, multiple adaptors are clearly working here..

I doubt running raspian rather than debian makes a difference, but I suppose having the latest kernel might.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Multiple USB > Serial adaptors

Sun Jun 17, 2012 1:14 pm

Thanks Karl and rgh.

That sounds promising. Unfortunately I'm at work today, and though I have my Pi with me, lots of DVI monitors in front of me, and the Pi seems happy to take power from the waveform monitor on my desk, the only spare keyboard I can find has a broken USB cable and won't play. So I'll have to try it tomorrow.

I'd be surprised if it was a permissions problem when it works fine on a single adaptor, and has the same problem on Arch where I'm logged in as root, but you never know.

My next thing to try was going to be rewriting some of the code in C, but it's about 18 years since I did any C. Raspbian sounds good.

Simon R.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Multiple USB > Serial adaptors

Mon Jun 18, 2012 7:07 pm

I tried running karl101's code today, and it came up with an 'already open' error, which suggests that it uses a different version of pyserial. So I've made up an SD card with Raspbian, fully updated, with pyserial2.5 rather than the 2.6 I used earlier. The program only found one ttyUSB port.

What Raspbian did show up though was that a list of errors including...

Code: Select all

ERROR::dwc_otg_hcd_urb_enqueue:487
Googling this error showed a possible link with my wireless keyboard adaptor upsetting the USB handling. So I tried a little experiment of adding a short delay at the start of the program so I could unplug the keyboard after starting the program before it started opening ports. It worked! the program would now find two ttyUSB ports. So I rushed out excitedly and bought a wired usb keyboard.

Sadly, this seems to be another red herring. The same problem happens with a normal keyboard. So it is starting to look like a problem with having more than two usb devices connected to the Pi. Or perhaps it is a problem with the usb hub after all.

rgh - are you using a hub to connect the derial adaptors to the Pi? and does it make any difference if you add more usb devices?

Many thanks all,
Simon R.

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Multiple USB > Serial adaptors

Mon Jun 18, 2012 7:20 pm

Not that it is any direct help to you at the moment, but it is my suspicion that there are one or more bugs lurking within the R-Pi USB system.

I say that because
1) a significant number of USB keyboards being incompatible with R-Pi
2) mysterious interactions between X window system and ethernet (accesed on the R-Pi as a USB device)
3) unexplained USB packet loss as mentioned here: http://www.raspberrypi.org/phpBB3/viewt ... 9&start=25

rgh
Posts: 212
Joined: Fri Nov 25, 2011 3:53 pm

Re: Multiple USB > Serial adaptors

Mon Jun 18, 2012 9:28 pm

scrishton wrote:rgh - are you using a hub to connect the derial adaptors to the Pi? and does it make any difference if you add more usb devices?
For my test I had a four port unpowered hub connected to the Pi, with the two serial adaptors plugged in to the hub. I didn't have any other USB devices connected. I can do more experiments for you, but not for a few days as I'm away from home.

I agree there are likely bugs in the USB system. I started with a Microsoft 800(?) wireless keyboard which didn't work (and is noted as not working on the wiki). It had the 'stuck keys' issue. I found that if I connected that keyboard through a hub the keyboard worked, but it killed the ethernet connection. Other wireless keyboards worked, various different power supplies didn't help.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27417
Joined: Sat Jul 30, 2011 7:41 pm

Re: Multiple USB > Serial adaptors

Mon Jun 18, 2012 9:50 pm

Do Sony still use RS422? I remember writing some software to drive Betacam device about 20 years ago via 422!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Multiple USB > Serial adaptors

Mon Jun 18, 2012 10:44 pm

Yes, Sony still use RS422. And despite everyone believing that VHS wiped out Beta, Beta is still alive and kicking, albeit Betacam SR, Digibeta, and HDCam.
And meanwhile, at the shiny new studio complex at MediaCity in Salford, where everything is designed to be tapeless, recorded straight onto servers, there are six bays full of Sony VT machines - and no control system. Yet.
But I'm working on my own solution...

Image

And to coin a phrase... "here's one I made earlier"...

Image


Image

karl101
Posts: 70
Joined: Wed Jan 11, 2012 10:09 am

Re: Multiple USB > Serial adaptors

Tue Jun 19, 2012 9:01 am

For my test I had a four port unpowered hub connected to the Pi, with the two serial adaptors plugged in to the hub. I didn't have any other USB devices connected. I can do more experiments for you, but not for a few days as I'm away from home.
I would be inclined to try a powered hub. Also, lowering the baudrate on the serial device (obviously you need to change the baudrate on your device to match) can improve data reliability, although 9600 baud and below can be a bit slow. I've been using a Logitech Wireless Combo MK260 keyboard and mouse and not had any problems (yet).

With everything plugged in, what do you see when you do: ls -la /dev/ttyU*

Karl.

rgh
Posts: 212
Joined: Fri Nov 25, 2011 3:53 pm

Re: Multiple USB > Serial adaptors

Tue Jun 19, 2012 6:22 pm

@karl101
It's not me that has the problem; scrishton has, so me trying a powered hub isn't going to help :) It doesn't sound like things like baud rate are an issue (yet) - he just can't (usually) open more than one device. The second device is clearly visible to the system as he's able to try and open /dev/ttyUSB1, and gets a protocol error rather than device not found. Could be power related though, I guess.

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Multiple USB > Serial adaptors

Mon Jul 02, 2012 6:23 am

In case it's relevant: I have exactly the same experience reported in the thread below by 'synthaxx', with my PL2303 USB-serial adaptor modules (cheap on ebay).
http://www.raspberrypi.org/phpBB3/viewt ... 03#p101962

It works OK plugged direct into one of the RPi USB ports, but it does NOT work plugged into an external powered hub: I get the same dmesg errors that are listed above. The hub power and the RPi power are ok per multimeter (measured RPi TP1-TP2 at 5.07 V). My other devices work OK in the hub, including USB sticks, mouse, keyboard and FTDI serial adaptors. I'm pretty sure this is a USB driver problem, or a RPi USB subsystem problem. There is no problem using these PL2303 adaptors on a WinXP system.

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Multiple USB > Serial adaptors

Mon Jul 02, 2012 6:54 am

Update: I take that right back! I just plugged two PL2303 devices to the USB hub and they were both recognized without errors in dmesg. I have no idea what caused the difference. Here the hub is the only thing connected to the RPi via USB (other onboard USB socket empty) and the hub had 2x PL2303 serial devices, mouse, keyboard, and a USB HDD connected. I'm running Linux 3.1.9+ #138 (June 26 2012)

tickett
Posts: 15
Joined: Sun Feb 12, 2012 6:09 pm
Contact: Website

Re: Multiple USB > Serial adaptors

Wed Jul 04, 2012 8:06 pm

I'm suffering similar problems- although i've managed to open 3 usb serial ports simultaneously- but the 4th and 5th don't normally want to open. The error normally looks like:

Traceback (most recent call last):
File "serial.py", line 2, in <module>
ser = serial.Serial('/dev/ttyUSBCCost', 57600)
File "/home/pi/pyserial-2.5/serial/serialutil.py", line 260, in __init__
self.open()
File "/home/pi/pyserial-2.5/serial/serialposix.py", line 276, in open
raise SerialException("could not open port %s: %s" % (self._port, msg))
serial.serialutil.SerialException: could not open port /dev/ttyUSBCCost: [Errno 71] Protocol error: '/dev/ttyUSBCCost'

Or simply:

Cannot open serial port (#5)

wallabybob
Posts: 17
Joined: Thu Aug 18, 2011 2:08 am

Re: Multiple USB > Serial adaptors

Sat Jul 07, 2012 6:29 am

I suspect it is unlikely your system has a device /dev/ttyUSBCCost. USB serial ports on Linux system are usually named /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2 etc.

Please post the output of the shell command: ls /dev/ttyUSB*

tickett
Posts: 15
Joined: Sun Feb 12, 2012 6:09 pm
Contact: Website

Re: Multiple USB > Serial adaptors

Sat Jul 07, 2012 2:00 pm

I have assigned virtual names otherwise they change everytime I boot:

Code: Select all

pi@raspberrypi:~$ ls -al /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Jul  4 20:50 /dev/ttyUSBCCost
crw-rw---- 1 root dialout 188, 1 Jan  1  1970 /dev/ttyUSBJeelabs
crw-rw---- 1 root dialout 188, 2 Jan  1  1970 /dev/ttyUSBJeeRF
crw-rw---- 1 root dialout 188, 4 Jul  6 16:27 /dev/ttyUSBRFXCom

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Multiple USB > Serial adaptors

Sat Jul 07, 2012 2:18 pm

I have the problem of USB port names changing (I think when my flaky hub gets bumped and the cable is momentarily disconnected, when it reconnects, suddenly /dev/ttyUSB0 and USB1 disappear, and I get USB2 and USB3 instead). Can I assign fixed names to devices, if so how? They are Jeenodes connected using FTDI USB-serial chips.

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Multiple USB > Serial adaptors

Sat Jul 07, 2012 3:31 pm

From reading this thread: https://bugs.launchpad.net/ubuntu/+sour ... bug/107208
the recommended solution for keeping USB serial ports in order, seems to be creating 'udev' rules that depend on unique strings associated with each USB serial port adaptor.

In case of interest, my two FTDI devices are shown below in the output from 'lsusb -v' and I do not see a useful serial number, so I presume am I out of luck for uniquely identifying these ports? Anyone have an idea for a reasonably inexpensive equivalent which does have a serial number? One of these parts was a standalone FTDI board from https://www.adafruit.com/products/284 and the other is the built-in FTDI chip on an 'Iteaduino' (Arduino clone) from http://iteadstudio.com/store/index.php? ... cts_id=467

Code: Select all

Bus 001 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0403 Future Technology Devices International, Ltd
  idProduct          0x6001 FT232 USB-Serial (UART) IC
  bcdDevice            6.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               90mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0403 Future Technology Devices International, Ltd
  idProduct          0x6001 FT232 USB-Serial (UART) IC
  bcdDevice            6.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               90mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

Return to “Interfacing (DSI, CSI, I2C, etc.)”