Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RK84 ISO keyboard #46

Closed
wants to merge 5 commits into from
Closed

Conversation

Luro02
Copy link
Contributor

@Luro02 Luro02 commented Mar 1, 2024

This PR should close #45. It is a mystery to me why it did not initially find my keyboard and now it works.

@Luro02 Luro02 marked this pull request as ready for review March 1, 2024 10:18
@carlossless
Copy link
Owner

@Luro02 I'll test the reboot functionality and take a look at this in about a week or two. 👍

@carlossless carlossless added enhancement New feature or request device-report labels Mar 2, 2024
@Luro02
Copy link
Contributor Author

Luro02 commented Mar 3, 2024

As mentioned in #45 (comment) the real issue is that it selects the wrong device for request/data. For fixing this, we need to differentiate between the two devices, the problem is that they only differ in the path:

DEBUG [sinowealth_kb_tool::isp] Found Request Device {
  path: "\\\\?\\HID#VID_0603&PID_1020&Col02#8&2da0b3f2&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}",
  vendor_id: 0x0603,
  product_id: 0x1020,
  serial_number: Some(""),
  serial_number_raw: None,
  release_number: 256,
  manufacturer: Some("(Standard system devices)"),
  product: Some(""),
  product_raw: None,
  usage_page: 0xff00,
  usage: 0x0001,
  interface_number: 0,
  bus_type: Usb,
}
DEBUG [sinowealth_kb_tool::isp] Found Data Device {
  path: "\\\\?\\HID#VID_0603&PID_1020&Col03#8&2da0b3f2&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}",
  vendor_id: 0x0603,
  product_id: 0x1020,
  serial_number: Some(""),
  serial_number_raw: None,
  release_number: 256,
  manufacturer: Some("(Standard system devices)"),
  product: Some(""),
  product_raw: None,
  usage_page: 0xff00,
  usage: 0x0001,
  interface_number: 0,
  bus_type: Usb,
}

I pushed a temporary solution that swaps them if the selected request device has &0002 in the path.

@carlossless
Copy link
Owner

carlossless commented Mar 9, 2024

Hey @Luro02,

Thanks for all your efforts here! I used your changes to create #47.

I did a couple of adjustments on top of your PR:

  • I opted to sort all enumerated devices, instead of swapping them based on a fragment of their path. This should have the same effect.
  • I setup the reboot function to be based on the reported device bootloader and overridden through a separate cli arg.
  • I adjusted the MD5 sum for your device bootloader based on the dump you had previously shared, I believe you might have used the MD5 of something else?
  • I adjusted the output format of the list function (to be more similar to lsusb). I hope to add more debug features like this myself in the future!

Also, I was able to successfully reboot my air60 when using your bootloader! However, I noticed that this cfc8661d bootloader is not recognized as an HID device by macOS. I started documenting this in the readme.

I'll close this PR, so let's continue the discussion on #47

@carlossless carlossless closed this Mar 9, 2024
carlossless added a commit that referenced this pull request Mar 9, 2024
…k84-iso support (#47)

Initiated from
#45 and
#46

This PR adds:
* Sorting to device enumeration, so that `data` and `request` devices on
Windows are selected deterministically.
* Reboot functionality for devices that use bootloaders that are
currently known to support it - `cfc8661d`. Also exposed as an arg, so
that it can be enabled/disabled whenever that's not the default option
for the device/bootloader.
* A section in the readme tracking bootloader / host platform support
and bootloader / function support.
* The Royal Kludge RK84 part.
* A new debugging function meant to list out all connected HID devices.

Thanks to @Luro02 who tracked down the device enumeration issue and
proposed a fix for it (along with the reboot feature, list feature, and
rk84 device report)!

---------

Co-authored-by: Luro02 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device-report enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[device-report] royal kludge rk84 iso layout (ger)
2 participants