-
Notifications
You must be signed in to change notification settings - Fork 535
Add a new plugin for Lenovo accessories #9760
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
base: main
Are you sure you want to change the base?
Conversation
|
@lenovo-li I've done quite a few fixups -- I really hope I've not broken anything -- apologies if so. |
|
@lenovo-li maybe it's obvious to say but please just commit fixes to the lenovo-li/lenovo-accessory branch on origin -- there's no need to do a new PR to merge fixes. |
|
@lenovo-li and if you want to send me hardware in the UK to help test this (or to generate the emulation) that's totally fine too -- just email me and I'll share my postal address with you. 100% okay if you don't want (or can't) do this. :) |
|
Hi @hughsie, Thank you so much for your kind offer to help with testing and emulation! We truly appreciate you taking the extra time to support this plugin. I've consulted with my supervisor, and we'd be happy to send you the hardware! Please send your postal address to my email ([email protected]), and I will arrange the shipment as soon as possible. I will also push the code fixes (README updates, udev removal, GET/SET macro fix, and the enum/address cleanups we discussed) to this branch shortly. Thanks again for your guidance! |
|
@lenovo-li yell when you've pushed your changes -- I think there's quite a bit simplification if we use a GObject interface -- i.e. the only difference between |
- Add necessary enumeration data for the protocol. - Update README.md to detail HID (single-bank) and BLE (dual-bank) update behaviors. - Remove redundant USB subsystem restriction from the quirk file. - Fix command direction for DFU attribute retrieval.
|
|
@lenovo-li I've split it out as an interface as we talked about and I think it's a lot cleaner. The BLE and HID devices now implement I wasn't sure if It's highly likely I've broken this on real hardware, and apologies if so :) Once this plugin has an emulation recorded and uploaded to the LVFS (which I can do for you if required...) I'd be happy to approve merging. |
| static gboolean | ||
| fu_lenovo_accessory_hid_device_probe(FuDevice *device, GError **error) | ||
| { | ||
| return TRUE; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove this -- or do you need to skip the parent fu_hidraw_device_setup() from running? I think removing the ->_probe() completely would populate more (helpful) properties from FuHidrawDevice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pointer! I will remove the ->probe() implementation as suggested to allow the parent fu_hidraw_device_setup() to run and populate the properties correctly.
- ble-device: Add notes regarding CRC discrepancy between stream and GBytes methods - hid-device: Remove probe function - rust: Ensure FuStructLenovoAccessoryCmd remains 6 bytes per protocol
|
@hughsie Regarding |
Should we do this in |
|
I don't think we need to add it there. The HID device is already in the bootloader state when in DFU mode, so it behaves as a separate device entity. Also, for BLE devices, the |
|
Hi,@hughsie |
Type of pull request: