Skip to content

xurubin/logitech_unifying_pid_patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Logitech unifying receiver VID/PID modification

This is a guide on how to manually change the VID/PID (046d:c52c) for Logitech unifying receiver. I did this because I wanted to passthrough one of my Logitech keyboards to a virtual machine, however I have two Logitech unifying receivers connected to the host machine with identical VID/PIDs, so it's a bit tricky to edit my VM config to passthrough the one I want. Changing the PID of one of the dongles was the solution.

Note this is carried out on the Nordic nRF24LU1-based receiver C-U0007 (firmware version RQR12.0X). There is a newer version of the unifying receiver based on TI chip (C-U0008 and firmware RQR24) which I don't know if will work, but maybe the same principle will apply. To quickly identify the chipset via the firmware version, you can use this command fwupdmgr get-devices | grep "Unifying Receiver" -A3. See examples from issue 4

Some useful resources

Steps

The basic idea is simple, just grab a known firmware, patch the PID/VID bytes, fix the CRC checksum and flash it back to the receiver. Note that some of the most recent firmwares (from the Logitech repository) are signed (*.shex file instead of *.hex file) and require a recent bootloader. My dongle uses an older bootloader so I didn't look into that in details.

Here is a sequence of commands to run to carry out the procedure:

  • Download the official firmware git clone https://github.com/Logitech/fw_updates.git
  • cd fw_updates/RQR12/RQR12.08
  • Search for C52B and 2BC5 in RQR12.08_B0030.hex and change it. Per [pwr-Solaar/Solaar#491 (comment)], it's recommended to change c52b to c532 or c517 to c526 in order to ensure maximum compatibility if you want to use Solaar in Linux. If you just want a generic mouse/keyboard, then any PID would do. Fix the line checksum per Intel Hex file format
  • Generate a binary firmware, note the fill bytes 0xFF, otherwise the CRC computation will be wrong. avr-objcopy --gap-fill=0xff -I ihex -O binary RQR12.08_B0030.hex RQR12.08_B0030.bin
  • Compute the checksum python crc.py RQR12.08_B0030.bin
  • Edit RQR12.08_B0030.hex again and set the checksum (2 bytes at location 0x67FE)
  • Compile a new firmware acceptable by fwupd
  • cd lvfs; make
  • Finally flash the patched firmware sudo fwupd.fwupdmgr --allow-older --force install Logitech-Unifying-RQR12.08_B0030.cab

Files

crc.py: python script to compute the firmware checksum Logitech-Unifying-RQR12.08_B0030.cab: patched firmware with VID/PID: 046d:c52c

About

Change the PID of Logitech unifying receiver

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages