Re: usb ACM device doesn't work

From: Ian FREISLICH <ianf_at_clue.co.za>
Date: Sun, 23 Jun 2013 16:17:32 +0200
Hans Petter Selasky wrote:
> On 06/23/13 10:33, Ian FREISLICH wrote:
> >   status 0xea1a1 <OPEN|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SET
UP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
> > 10:29:19.904434 usbus0.2 SUBM-BULK-EP=00000002,SPD=FULL,NFR=1,SLEN=4,IVAL=0
> >   frame[0] WRITE 1 bytes
> >   0000  6F -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |o               
|
> >   flags 0x9 <FORCE_SHORT_XFER|PIPE_BOF|0>
> >   status 0x4a023 <OPEN|TRANSFERRING|STARTED|BDMA_ENABLE|BDMA_SETUP|CAN_CANC
EL_IMMED|0>
> 
> If you don't get a DONE-BULK-EP=00000002, then the device does not 
> receive the data. It is blocking the write. Did you set the correct baud 
> rate?

I did.  It's 9600.

> Also, what does usbconfig -d X.Y dump_device_desc dump_curr_config_desc 
> say ?

[zen] ~ # usbconfig -d ugen0.2 dump_device_desc 
ugen0.2: <USB CDC COM KMT> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (0mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0110 
  bDeviceClass = 0x0002 
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0008 
  idVendor = 0x04d8 
  idProduct = 0xfef9 
  bcdDevice = 0x0100 
  iManufacturer = 0x0001  <KMT>
  iProduct = 0x0002  <USB CDC COM>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001 


[zen] ~ # usbconfig -d ugen0.2 dump_curr_config_desc
ugen0.2: <USB CDC COM KMT> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (0mA)


 Configuration index 0

    bLength = 0x0009 
    bDescriptorType = 0x0002 
    wTotalLength = 0x0043 
    bNumInterfaces = 0x0002 
    bConfigurationValue = 0x0001 
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x00c0 
    bMaxPower = 0x0000 

    Interface 0
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0000 
      bAlternateSetting = 0x0000 
      bNumEndpoints = 0x0001 
      bInterfaceClass = 0x0002 
      bInterfaceSubClass = 0x0002 
      bInterfaceProtocol = 0x0001 
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x05
      bDescriptorType = 0x24
      bDescriptorSubType = 0x00
       RAW dump: 
       0x00 | 0x05, 0x24, 0x00, 0x10, 0x01


      Additional Descriptor

      bLength = 0x04
      bDescriptorType = 0x24
      bDescriptorSubType = 0x02
       RAW dump: 
       0x00 | 0x04, 0x24, 0x02, 0x02


      Additional Descriptor

      bLength = 0x05
      bDescriptorType = 0x24
      bDescriptorSubType = 0x06
       RAW dump: 
       0x00 | 0x05, 0x24, 0x06, 0x00, 0x01


      Additional Descriptor

      bLength = 0x05
      bDescriptorType = 0x24
      bDescriptorSubType = 0x01
       RAW dump: 
       0x00 | 0x05, 0x24, 0x01, 0x00, 0x01


     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0008 
        bInterval = 0x00fa 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 


    Interface 1
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0001 
      bAlternateSetting = 0x0000 
      bNumEndpoints = 0x0002 
      bInterfaceClass = 0x000a 
      bInterfaceSubClass = 0x0000 
      bInterfaceProtocol = 0x0000 
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0002  <OUT>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0040 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

     Endpoint 1
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0082  <IN>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0040 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 



-- 
Ian Freislich
Received on Sun Jun 23 2013 - 12:17:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:38 UTC