USB Serial Hosting

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB Serial Hosting

1,330件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by brownm on Fri May 10 02:06:32 MST 2013

Hi There I am trying to connect to a USB Modem with the LPC1768, To begin with I thought that I would take easy steps.


1. Get the USB library working on a LPCExpresso 1769 with the Base board - done


2. Plug in a Keyboard and run up the example code (no problems) - put the jumpers in on J61 on the base board!!


3. Plug in a serial to USB Cable from FTDI and host this. I have the example code VirtualSerialHost.c which I got from another posting - this all compiles and detects the insertion of the serial cable no problems.


4. the CDC device class is 0x02 but the FTDI implements its own class 0xFF (for Vendor specific)


so I hit this Assertion in  <span style="font-size: x-small;"><strong>EVENT_USB_Host_DeviceEnumerationComplete</strong></span>


<p align="LEFT"><span style="color: #7f0055; font-size: x-small;"><span style="color: #7f0055; font-size: x-small;"><strong>if</strong></span></span><span style="font-size: x-small;"> (CDC_Host_ConfigurePipes(&amp;VirtualSerial_CDC_Interface, </span><span style="font-size: x-small;">ConfigDescriptorSize, ConfigDescriptorData) != </span><em><span style="color: #0000c0; font-size: x-small;"><span style="color: #0000c0; font-size: x-small;">CDC_ENUMERROR_NoError</span></span></em><span style="font-size: x-small;">)</span>

<span style="font-size: x-small;">{</span>


<span style="font-size: x-small;">       </span><span style="font-size: x-small;">puts_P(PSTR(</span><span style="color: #2a00ff; font-size: x-small;"><span style="color: #2a00ff; font-size: x-small;">"Attached Device Not a Valid CDC Class Device.\r\n"</span></span><span style="font-size: x-small;">));</span><span style="font-size: x-small;">LEDs_SetAllLEDs(LEDMASK_USB_ERROR);</span>


<span style="font-size: x-small;"> </span><strong><span style="color: #7f0055; font-size: x-small;"><span style="color: #7f0055; font-size: x-small;">    return</span></span></strong><span style="font-size: x-small;">;</span>


 <span style="font-size: x-small;">}</span>


 


<h2>How do I accept the FTDI serial dongle as a valid CDC device? so that I can accept it as serial device?</h2>

 


Everything else seems to be working fine  - sorry about the formating on the post it went a bit weird when I cut an paste into it and the font is really tiny.


Thanks and Regards


 


Marshall Brown


 


 


Heres the details from USB View (from the FTDI website)


 


Device Descriptor:
bcdUSB:             0x0200
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x08 (8)
idVendor:           0x0403 (Future Technology Devices International Limited)
idProduct:          0x6001
bcdDevice:          0x0600
iManufacturer:        0x01
0x0409: "FTDI"
iProduct:             0x02
0x0409: "FT232R USB UART"
0x0409: "FT232R USB UART"
iSerialNumber:        0x03
0x0409: "A901CT6L"
bNumConfigurations:   0x01


ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     Full
Device Address:       0x06
Open Pipes:              2


Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0040 (64)
bInterval:            0x00


Endpoint Descriptor:
bEndpointAddress:     0x02  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0040 (64)
bInterval:            0x00


Configuration Descriptor:
wTotalLength:       0x0020
bNumInterfaces:       0x01
bConfigurationValue:  0x01
iConfiguration:       0x00
bmAttributes:         0xA0 (Bus Powered Remote Wakeup)
MaxPower:             0x2D (90 Ma)


Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0xFF
bInterfaceSubClass:   0xFF
bInterfaceProtocol:   0xFF
iInterface:           0x02
0x0409: "FT232R USB UART"
0x0409: "FT232R USB UART"


Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0040 (64)
bInterval:            0x00


Endpoint Descriptor:
bEndpointAddress:     0x02  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0040 (64)
bInterval:            0x00


 


Original Attachment has been moved to: Example_VirtualSerialHost_0_1.zip

ラベル(1)
  • USB

0 件の賞賛
返信
2 返答(返信)

1,005件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by brownm on Fri May 10 13:32:15 MST 2013

Thanks for the feedback


 


I have a USB Modem that I am trying to connect to (Sierra Wireless 8790) via USB and it has the same interface class i.e Vendor Specific - This is a modem, and nothing wierd or wonderful. Any thoughts on how to connect this via CDC.


Regards


Marshall


Device Descriptor:
bcdUSB:             0x0200
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x40 (64)
idVendor:           0x1199
idProduct:          0x683C
bcdDevice:          0x0006
iManufacturer:        0x03
0x0409: "Sierra Wireless, Incorporated"
iProduct:             0x02
0x0409: "MC8790V"
iSerialNumber:        0x00
bNumConfigurations:   0x01


ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     High
Device Address:       0x0B
Open Pipes:             18


Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x01  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x82  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x02  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x83  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x03  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x84  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x05


Endpoint Descriptor:
bEndpointAddress:     0x85  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x04  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x86  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x05


Endpoint Descriptor:
bEndpointAddress:     0x87  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x05  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x88  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x05


Endpoint Descriptor:
bEndpointAddress:     0x89  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x06  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x8A  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x05


Endpoint Descriptor:
bEndpointAddress:     0x8B  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x07  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Configuration Descriptor:
wTotalLength:       0x00C6
bNumInterfaces:       0x07
bConfigurationValue:  0x01
iConfiguration:       0x01
0x0409: "Sierra Configuration"
bmAttributes:         0xE0 (Bus Powered Self Powered Remote Wakeup)
MaxPower:             0x00 (0 Ma)


Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0xFF
bInterfaceSubClass:   0xFF
bInterfaceProtocol:   0xFF
iInterface:           0x00


Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x01  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Interface Descriptor:
bInterfaceNumber:     0x01
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0xFF
bInterfaceSubClass:   0xFF
bInterfaceProtocol:   0xFF
iInterface:           0x00


Endpoint Descriptor:
bEndpointAddress:     0x82  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x02  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Interface Descriptor:
bInterfaceNumber:     0x02
bAlternateSetting:    0x00
bNumEndpoints:        0x02
bInterfaceClass:      0xFF
bInterfaceSubClass:   0xFF
bInterfaceProtocol:   0xFF
iInterface:           0x00


Endpoint Descriptor:
bEndpointAddress:     0x83  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x03  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Interface Descriptor:
bInterfaceNumber:     0x03
bAlternateSetting:    0x00
bNumEndpoints:        0x03
bInterfaceClass:      0xFF
bInterfaceSubClass:   0xFF
bInterfaceProtocol:   0xFF
iInterface:           0x00


Endpoint Descriptor:
bEndpointAddress:     0x84  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x05


Endpoint Descriptor:
bEndpointAddress:     0x85  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x04  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Interface Descriptor:
bInterfaceNumber:     0x04
bAlternateSetting:    0x00
bNumEndpoints:        0x03
bInterfaceClass:      0xFF
bInterfaceSubClass:   0xFF
bInterfaceProtocol:   0xFF
iInterface:           0x00


Endpoint Descriptor:
bEndpointAddress:     0x86  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x05


Endpoint Descriptor:
bEndpointAddress:     0x87  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x05  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Interface Descriptor:
bInterfaceNumber:     0x05
bAlternateSetting:    0x00
bNumEndpoints:        0x03
bInterfaceClass:      0xFF
bInterfaceSubClass:   0xFF
bInterfaceProtocol:   0xFF
iInterface:           0x00


Endpoint Descriptor:
bEndpointAddress:     0x88  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x05


Endpoint Descriptor:
bEndpointAddress:     0x89  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x06  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Interface Descriptor:
bInterfaceNumber:     0x06
bAlternateSetting:    0x00
bNumEndpoints:        0x03
bInterfaceClass:      0xFF
bInterfaceSubClass:   0xFF
bInterfaceProtocol:   0xFF
iInterface:           0x00


Endpoint Descriptor:
bEndpointAddress:     0x8A  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x05


Endpoint Descriptor:
bEndpointAddress:     0x8B  IN
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


Endpoint Descriptor:
bEndpointAddress:     0x07  OUT
Transfer Type:        Bulk
wMaxPacketSize:     0x0200 (512)
bInterval:            0x20


 


0 件の賞賛
返信

1,005件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Fri May 10 03:18:06 MST 2013

The FTDI chip is not a CDC device.


A serial port is not a CDC device.


A typical CDC device is a modem, and speaks the AT protocol.


You may want to look at the USB ftdi driver in Linux, or at libftdi.


0 件の賞賛
返信