kriomant / ch57x-keyboard-tool

Utility for programming ch57x small keyboard
MIT License
437 stars 50 forks source link

Unexpected interface parameters #82

Open erdesigns-eu opened 1 month ago

erdesigns-eu commented 1 month ago

I got this error trying to use this utility:

Error: unexpected interface parameters: InterfaceDescriptor { bLength: 9, bDescriptorType: 4, bInterfaceNumber: 0, bAlternateSetting: 0, bNumEndpoints: 1, bInterfaceClass: 3, bInterfaceSubClass: 1, bInterfaceProtocol: 1, iInterface: 0, }

Im trying to use it with this macro keyboard: https://www.amazon.com/Swappable-Mechanical-Customized-Separation-Programming/dp/B0CLDW1CS6

Which originally came with this software: https://i0.wp.com/www.itworks.hu/wp-content/uploads/2023/11/image-2.png?w=994&ssl=1

This seems to be a compatible keyboard, it has the same VID/PID - but the utility is not working. Any ideas?

IIRoan commented 1 month ago

So i had the same issue as you, for me it worked when using version 1.2.4 instead of 1.4

erdesigns-eu commented 1 month ago

Alright ill try that, i did notice though the original software that came with works a bit different, the original software doesnt seem to have 3 layers even though the software shows it .. And also the software that came with mine, sends some different formatted commands.. So im now working on my own tool, and ill do some more reverse engineering to find out.. Ill update this comment when its finished, maybe someone else who needs it :)

TidusXD commented 1 month ago

Alright ill try that, i did notice though the original software that came with works a bit different, the original software doesnt seem to have 3 layers even though the software shows it .. And also the software that came with mine, sends some different formatted commands.. So im now working on my own tool, and ill do some more reverse engineering to find out.. Ill update this comment when its finished, maybe someone else who needs it :)

Hi friend, I'm having tremendous difficulty finding this software, could you provide a link? or contact me by email: tiduzgamer@gmail.com

TidusXD commented 1 month ago

I'm using this device, but even though I get a "success" response, it seems that no information is recorded or it arrives in the wrong way because the keys always have the Shift+Ctrl function (even though I didn't send this configuration), Does anyone have any idea what to do?

HID\VID_1189&PID_8890&REV_0100&MI_00 HID\VID_1189&PID_8890&MI_00 HID\VID_1189&UP:0001_U:0006 HID_DEVICE_SYSTEM_KEYBOARD HID_DEVICE_UP:0001_U:0006 HID_DEVICE

erdesigns-eu commented 1 month ago

@TidusXD I only have the original software with a virus in it, so im not going to share it here.. Because i dont want anyone to get infected..

[Edit] Since it's a holiday tomorrow in Belgium im using today and tomorrow to write my own tool. Ill put a link here when it's done - or done enough for testing purposes..

MrRKernelPanic commented 1 month ago

Running Linux, exactly the same error. 1.4 doesn't work, but 1.24 worked first time! Sorry to grumble this is awesome software and I really appreciate you taking the time, just joining the discussion for those who find this... Some info of device below... (when I first plugged it in, just got 'c' for every key and knob. It's a 3x2 +1 knob layout. (AliExpress finest)

Bus 002 Device 008: ID 1189:8890 Acer Communications & Multimedia Couldn't open device, some information will be missing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x1189 Acer Communications & Multimedia idProduct 0x8890 bcdDevice 0.00 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x006d bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 1 Keyboard iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 64 Report Descriptors: UNAVAILABLE Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 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 36 Report Descriptors: UNAVAILABLE Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 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 86 Report Descriptors: UNAVAILABLE Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 2 Mouse iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 52 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 0x0004 1x 4 bytes bInterval 10

erdesigns-eu commented 1 month ago

It seems like the device i have (and probably others that use v1.24) have older firmware on the device, in the newer versions of the software there is a start-sequence that is send before the key data is send, and then a end-sequence that is needed to confirm the setting of a macro key. The device i have doesnt use this sequence, but just sends a simple command in this format:

Byte 1: Key Index (In my case $01 - $0F) Byte 2: Modifier (If multiple modifiers then this value is the concatenation of these modifiers)

The other bytes vary depending on the key type (Mouse, Wheel, Media, Keyboard). Im still reversing this firmware so its taking a bit longer than expected - but i think ill manage to create a first test release this weekend.

ElTinoo commented 1 month ago

Hi ! I've the same error as you but on an other device i bought it here : https://fr.aliexpress.com/item/1005005419376722.html?spm=a2g0o.order_list.order_list_main.4.6e1e5e5bDP9qEI&gatewayAdapt=glo2fra

Error: unexpected interface parameters: InterfaceDescriptor { bLength: 9, bDescriptorType: 4, bInterfaceNumber: 0, bAlternateSetting: 0, bNumEndpoints: 1, bInterfaceClass: 3, bInterfaceSubClass: 1, bInterfaceProtocol: 1, iInterface: 0, }

I tried to find the id of the device and the constructor but nothing :')

I installed the project with cargo as said on the 3*1 doc page.

I've found that USB\VID_1189&PID_8890\6&E9BCFE3&0&11 for the device.

Anyone any idea ? Thanks !

erdesigns-eu commented 1 month ago

First beta release of my own software for the macro keyboard. Only for windows but with a GUI. https://github.com/erdesigns-eu/HID-Macro-Keyboard

jclulow commented 1 month ago

First beta release of my own software for the macro keyboard. Only for windows but with a GUI. https://github.com/erdesigns-eu/HID-Macro-Keyboard

Fair warning: the executable linked from this "alternative software" is flagged by Windows Detector as containing a virus.

erdesigns-eu commented 1 month ago

First beta release of my own software for the macro keyboard. Only for windows but with a GUI. https://github.com/erdesigns-eu/HID-Macro-Keyboard

Fair warning: the executable linked from this "alternative software" is flagged by Windows Detector as containing a virus.

thanks this was indeed my fault, i forgot to check it before uploading - uploaded from a VM, but i already replaced it with a clean one (is checked on virustotal), but if you really want to be sure - all code is there, so recompiling yourself shouldn't be an issue.

kriomant commented 1 month ago

Try 1.4.1