V
6  
Tags
There are no tags for this page.
Attachments
Dobrica Pavlinušić's random unstructured stuff
CH9326
ch9326-test.py

CH9326DS1.PDF

UART to USB 1.1 HID

I first learned about this chip from video https://youtu.be/jJoD2ioJPP0

chip on sop16 breakout

Connecting only VCC, GND USB- and USB+ to target and UART RX, TG and GND to USB serial works without any additional components.

IMG_20191019_175736-800px.jpg

[2022258.670458] usb 1-5.2.3: new full-speed USB device number 41 using ehci-pci
[2022258.780644] usb 1-5.2.3: New USB device found, idVendor=1a86, idProduct=e010, bcdDevice=34.00
[2022258.780657] usb 1-5.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[2022258.780663] usb 1-5.2.3: Product: HID To Serial
[2022258.780669] usb 1-5.2.3: Manufacturer: WCH.CN 4
[2022258.780674] usb 1-5.2.3: SerialNumber: 12345678
[2022258.791635] hid-generic 0003:1A86:E010.000D: hiddev3,hidraw3: USB HID v1.00 Device [WCH.CN 4 HID To Serial] on usb-0000:00:1a.7-5.2.3/input0

I does not create normal /dev/input device under Linux, but sending chars over serial at 9600 8n1 does produce output at /dev/hidraw3 device

dpavlin@x200:~$ microcom -s 9600 -p /dev/ttyUSB0

lsusb

dpavlin@x200:~$ sudo lsusb -d 1A86:E010 -v

Bus 001 Device 041: ID 1a86:e010 QinHeng Electronics
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x1a86 QinHeng Electronics
  idProduct          0xe010
  bcdDevice           34.00
  iManufacturer           1 WCH.CN 4
  iProduct                2 HID To Serial
  iSerial                 3 12345678
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0029
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 (error)
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      37
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

 

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: