From nobody Thu Sep 15 12:36:06 2022 X-Original-To: usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MSxWt0qx3z4c6jJ for ; Thu, 15 Sep 2022 12:36:10 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MSxWr6pSpz3ntD for ; Thu, 15 Sep 2022 12:36:08 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version:Content-Type:Message-Id:From; bh=Yq2ukg8lXJS60S2f15YJa6iD6fitcsSVOLvValboljA=; b=frB+1pVq2/iQCkaNwtsIze+r/6A2+hycNsNtGAFy1Ga7gAeajQOHH8zeMttoY78NT8JROgTDTUe1XucPgi08mRs0iif41hAZwxorbvU6IxkWYceSdyPo9obvphkQJ5mmGROoVeAtG9dik4ME0m6ETgyMdxQkm2/pCGw4Mby4301FyDlKHf9xdx/PtrMOGrm8bYsXagN6/JxyngLJOO6BFRGpJBfD3sELoEG0ybKGgMeUVT1xkfWQjaeEUNL+CPCs6twpeanXy4MJIvSBffg60AWZLrif6qO+GMdR1UCnZP/pLdo2FdF7wErRazsAWort/HqqPeJ51plPENuWugR8Bg==; Received: from imac.bk.cs.huji.ac.il ([132.65.179.42] helo=smtpclient.apple) by kabab.cs.huji.ac.il with esmtp id 1oYo6B-000DVe-4I; Thu, 15 Sep 2022 15:36:07 +0300 From: Daniel Braniss Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_34C547A2-8A66-4A9D-BF03-7B94E1DEB16B" List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: USB chip CH9102F Date: Thu, 15 Sep 2022 15:36:06 +0300 In-Reply-To: <7243b074-f06c-b500-62f9-ba3947130f4d@selasky.org> Cc: "usb@freebsd.org" To: Hans Petter Selasky References: <117B32B3-E6F9-4611-A8C1-BBBF9BE69372@cs.huji.ac.il> <8780922F-E48B-4AC5-9CCE-D8C940AFED15@cs.huji.ac.il> <7243b074-f06c-b500-62f9-ba3947130f4d@selasky.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4MSxWr6pSpz3ntD X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.huji.ac.il header.s=57791128 header.b=frB+1pVq; dmarc=pass (policy=none) header.from=huji.ac.il; spf=none (mx1.freebsd.org: domain of danny@cs.huji.ac.il has no SPF policy when checking 132.65.116.210) smtp.mailfrom=danny@cs.huji.ac.il X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[huji.ac.il,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[cs.huji.ac.il:s=57791128]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[usb@FreeBSD.org]; R_SPF_NA(0.00)[no SPF record]; ASN(0.00)[asn:378, ipnet:132.64.0.0/15, country:IL]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_EQ_ADDR_SOME(0.00)[]; DKIM_TRACE(0.00)[cs.huji.ac.il:+]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[danny]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_34C547A2-8A66-4A9D-BF03-7B94E1DEB16B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 don=E2=80=99t know if this went out: > On 14 Sep 2022, at 17:52, Hans Petter Selasky wrote: >=20 > On 9/14/22 16:46, Daniel Braniss wrote: >>> On 14 Sep 2022, at 17:38, Hans Petter Selasky = wrote: >>>=20 >>> On 9/14/22 16:34, Daniel Braniss wrote: >>>>> On 14 Sep 2022, at 17:27, Hans Petter Selasky = wrote: >>>>>=20 >>>>> 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=E2=80=99s = is not working. >>>>>> thanks, >>>>>> danny >>>>>=20 >>>>> Which driver is currently used for this chip? >>>>>=20 >>>> Sep 14 12:17:23 pampero kernel: ugen0.4: at usbus0 >>>> Sep 14 12:17:23 pampero kernel: umodem0 on uhub0 >>>> Sep 14 12:17:23 pampero kernel: umodem0: on usbus0 >>>> Sep 14 12:17:23 pampero kernel: umodem0: data interface 1, has no = CM over data, has no break >>>>> --HPS >>>=20 >>> Can you dump the usb configuration and device descriptors for this = device. Just wipe the serial number :-) >>>=20 >>> =E2=80=94HPS >>>=20 >> sure, but will have to wait till tomorrow, usbdump yes? >=20 > Hi, >=20 > usbconfig -d X.Y dump_all_config_desc dump_device_desc >=20 > Dropped hackers@ >=20 > =E2=80=94HPS >=20 pampero# usbconfig -d 0.4 dump_all_config_desc dump_device_desc ugen0.4: at usbus0, cfg=3D0 md=3DHOST = spd=3DFULL (12Mbps) pwr=3DON (134mA) bLength =3D 0x0012=20 bDescriptorType =3D 0x0001=20 bcdUSB =3D 0x0110=20 bDeviceClass =3D 0x0002 bDeviceSubClass =3D 0x0000=20 bDeviceProtocol =3D 0x0000=20 bMaxPacketSize0 =3D 0x0008=20 idVendor =3D 0x1a86=20 idProduct =3D 0x55d4=20 bcdDevice =3D 0x0443=20 iManufacturer =3D 0x0000 iProduct =3D 0x0002 iSerialNumber =3D 0x0003 <5479010352> bNumConfigurations =3D 0x0001=20 Configuration index 0 bLength =3D 0x0009=20 bDescriptorType =3D 0x0002=20 wTotalLength =3D 0x0043=20 bNumInterfaces =3D 0x0002=20 bConfigurationValue =3D 0x0001=20 iConfiguration =3D 0x0000 bmAttributes =3D 0x00a0=20 bMaxPower =3D 0x0043=20 Interface 0 bLength =3D 0x0009=20 bDescriptorType =3D 0x0004=20 bInterfaceNumber =3D 0x0000=20 bAlternateSetting =3D 0x0000=20 bNumEndpoints =3D 0x0001=20 bInterfaceClass =3D 0x0002 bInterfaceSubClass =3D 0x0002=20 bInterfaceProtocol =3D 0x0001=20 iInterface =3D 0x0000 Additional Descriptor bLength =3D 0x05 bDescriptorType =3D 0x24 bDescriptorSubType =3D 0x00 RAW dump:=20 0x00 | 0x05, 0x24, 0x00, 0x10, 0x01 Additional Descriptor bLength =3D 0x05 bDescriptorType =3D 0x24 bDescriptorSubType =3D 0x01 RAW dump:=20 0x00 | 0x05, 0x24, 0x01, 0x00, 0x01 Additional Descriptor bLength =3D 0x04 bDescriptorType =3D 0x24 bDescriptorSubType =3D 0x02 RAW dump:=20 0x00 | 0x04, 0x24, 0x02, 0x02 Additional Descriptor bLength =3D 0x05 bDescriptorType =3D 0x24 bDescriptorSubType =3D 0x06 RAW dump:=20 0x00 | 0x05, 0x24, 0x06, 0x00, 0x01 Endpoint 0 bLength =3D 0x0007=20 bDescriptorType =3D 0x0005=20 bEndpointAddress =3D 0x0083 bmAttributes =3D 0x0003 wMaxPacketSize =3D 0x0010=20 bInterval =3D 0x0001=20 bRefresh =3D 0x0000=20 bSynchAddress =3D 0x0000=20 Interface 1 bLength =3D 0x0009=20 bDescriptorType =3D 0x0004=20 bInterfaceNumber =3D 0x0001=20 bAlternateSetting =3D 0x0000=20 bNumEndpoints =3D 0x0002=20 bInterfaceClass =3D 0x000a bInterfaceSubClass =3D 0x0000=20 bInterfaceProtocol =3D 0x0000=20 iInterface =3D 0x0000 Endpoint 0 bLength =3D 0x0007=20 bDescriptorType =3D 0x0005=20 bEndpointAddress =3D 0x0002 bmAttributes =3D 0x0002 wMaxPacketSize =3D 0x0020=20 bInterval =3D 0x0000=20 bRefresh =3D 0x0000=20 bSynchAddress =3D 0x0000=20 Endpoint 1 bLength =3D 0x0007=20 bDescriptorType =3D 0x0005=20 bEndpointAddress =3D 0x0082 bmAttributes =3D 0x0002 wMaxPacketSize =3D 0x0040=20 bInterval =3D 0x0000=20 bRefresh =3D 0x0000=20 bSynchAddress =3D 0x0000=20 Endpoint 0 bLength =3D 0x0007=20 bDescriptorType =3D 0x0005=20 bEndpointAddress =3D 0x0002 bmAttributes =3D 0x0002 wMaxPacketSize =3D 0x0020=20 bInterval =3D 0x0000=20 bRefresh =3D 0x0000=20 bSynchAddress =3D 0x0000=20 Endpoint 1 bLength =3D 0x0007=20 bDescriptorType =3D 0x0005=20 bEndpointAddress =3D 0x0082 bmAttributes =3D 0x0002 wMaxPacketSize =3D 0x0040=20 bInterval =3D 0x0000=20 bRefresh =3D 0x0000=20 bSynchAddress =3D 0x0000 --Apple-Mail=_34C547A2-8A66-4A9D-BF03-7B94E1DEB16B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 don=E2=80=99t 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=E2=80=99s 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 :-)

=E2=80=94HPS

sure, but will have to wait till = tomorrow, usbdump yes?

Hi,

usbconfig -d X.Y dump_all_config_desc = dump_device_desc

Dropped hackers@

=E2=80=94HPS



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

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


Configuration= index 0

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

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

     Additional Descriptor

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


     Additional = Descriptor

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


     Additional = Descriptor

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


     Additional = Descriptor

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


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


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

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

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





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

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

= --Apple-Mail=_34C547A2-8A66-4A9D-BF03-7B94E1DEB16B--