![]() It's actually less scary to see a SHA1 hash than it is to see a path like /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2. It's also way easier to copy and paste into the various fwupdmgr command that require a device ID and also means we can match a partial prefix much like git allows. If we also move to a model where plugins can be changed during different stages of the update (e.g. during detach) then the device might change connection type and then the sysfs path not only becomes difficult to paste, but incorrect. Session software doesn't care about the format of the device ID (it is supposed to be an implementation detail) and so there's no API or ABI break here. A few plugins also needed to be ported, but nothing too worrying. |
||
---|---|---|
.. | ||
data | ||
fu-plugin-unifying.c | ||
lu-common.c | ||
lu-common.h | ||
lu-context.c | ||
lu-context.h | ||
lu-device-bootloader-nordic.c | ||
lu-device-bootloader-nordic.h | ||
lu-device-bootloader-texas.c | ||
lu-device-bootloader-texas.h | ||
lu-device-bootloader.c | ||
lu-device-bootloader.h | ||
lu-device-peripheral.c | ||
lu-device-peripheral.h | ||
lu-device-runtime.c | ||
lu-device-runtime.h | ||
lu-device.c | ||
lu-device.h | ||
lu-hidpp-msg.c | ||
lu-hidpp-msg.h | ||
lu-hidpp.h | ||
lu-self-test.c | ||
lu-tool.c | ||
meson.build | ||
README.md |
Unifying Support
Introduction
This plugin can flash the firmware on Logitech Unifying dongles, both the Nordic (U0007) device and the Texas Instruments (U0008) version.
This plugin will not work with the different "Nano" dongle (U0010) as it does not use the Unifying protocol.
Some bootloader protocol infomation was taken from the Mousejack[1] project, specifically logitech-usb-restore.py and unifying.py. Other documentation was supplied by Logitech.
Additional constants were taken from the Solaar[2] project.
Design Notes
When a dongle is detected in bootloader mode we detach the hidraw driver from the kernel and use raw control transfers. This ensures that we don't accidentally corrupt the uploading firmware. For application firmware we use hidraw which means the hardware keeps working while probing, and also allows us to detect paired devices.
Verification
If you do not have Unifying hardware you can emulate writing firmware using:
unifying-tool write file.hex -v --emulate=bootloader-nordic
This can also be used to produce protocol data to the command line to compare against USB dumps. This plugin should interact with the hardware exactly like the Logitech-provided flashing tool, although only a few devices have been tested.
[1] https://www.mousejack.com/ [2] https://pwr.github.io/Solaar/