Re: USB chip CH9102F

From: Daniel Braniss <danny_at_cs.huji.ac.il>
Date: Thu, 15 Sep 2022 12:36:06 UTC
don’t know if this went out:



> On 14 Sep 2022, at 17:52, Hans Petter Selasky <hps@selasky.org> wrote:
> 
> On 9/14/22 16:46, Daniel Braniss wrote:
>>> On 14 Sep 2022, at 17:38, Hans Petter Selasky <hps@selasky.org> wrote:
>>> 
>>> On 9/14/22 16:34, Daniel Braniss wrote:
>>>>> On 14 Sep 2022, at 17:27, Hans Petter Selasky <hps@selasky.org> wrote:
>>>>> 
>>>>> On 9/14/22 15:43, Daniel Braniss wrote:
>>>>>> Hi,
>>>>>> is there/will there be any support for this chip? CH9102F.
>>>>>> there is a driver for linux and windows, but event though it sort of works on FreeBSD,
>>>>>> the magic needed to flash the firmware on newer esp32’s is not working.
>>>>>> thanks,
>>>>>> 	danny
>>>>> 
>>>>> Which driver is currently used for this chip?
>>>>> 
>>>> Sep 14 12:17:23 pampero kernel: ugen0.4: <vendor 0x1a86 USB Single Serial> at usbus0
>>>> Sep 14 12:17:23 pampero kernel: umodem0 on uhub0
>>>> Sep 14 12:17:23 pampero kernel: umodem0: <vendor 0x1a86 USB Single Serial, class 2/0, rev 1.10/4.43, addr 53> on usbus0
>>>> Sep 14 12:17:23 pampero kernel: umodem0: data interface 1, has no CM over data, has no break
>>>>> --HPS
>>> 
>>> Can you dump the usb configuration and device descriptors for this device. Just wipe the serial number :-)
>>> 
>>> —HPS
>>> 
>> sure, but will have to wait till tomorrow, usbdump yes?
> 
> Hi,
> 
> usbconfig -d X.Y dump_all_config_desc dump_device_desc
> 
> Dropped hackers@
> 
> —HPS
> 


pampero# usbconfig -d 0.4 dump_all_config_desc dump_device_desc
ugen0.4: <vendor 0x1a86 USB Single Serial> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (134mA)

 bLength = 0x0012 
 bDescriptorType = 0x0001 
 bcdUSB = 0x0110 
 bDeviceClass = 0x0002  <Communication device>
 bDeviceSubClass = 0x0000 
 bDeviceProtocol = 0x0000 
 bMaxPacketSize0 = 0x0008 
 idVendor = 0x1a86 
 idProduct = 0x55d4 
 bcdDevice = 0x0443 
 iManufacturer = 0x0000  <no string>
 iProduct = 0x0002  <USB Single Serial>
 iSerialNumber = 0x0003  <5479010352>
 bNumConfigurations = 0x0001 


Configuration index 0

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

   Interface 0
     bLength = 0x0009 
     bDescriptorType = 0x0004 
     bInterfaceNumber = 0x0000 
     bAlternateSetting = 0x0000 
     bNumEndpoints = 0x0001 
     bInterfaceClass = 0x0002  <Communication device>
     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 = 0x05
     bDescriptorType = 0x24
     bDescriptorSubType = 0x01
      RAW dump: 
      0x00 | 0x05, 0x24, 0x01, 0x00, 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


    Endpoint 0
       bLength = 0x0007 
       bDescriptorType = 0x0005 
       bEndpointAddress = 0x0083  <IN>
       bmAttributes = 0x0003  <INTERRUPT>
       wMaxPacketSize = 0x0010 
       bInterval = 0x0001 
       bRefresh = 0x0000 
       bSynchAddress = 0x0000 


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

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

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





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

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