So, I happened to umm…  own both the Logitech Performance MX, and the sleek Anywhere MX, both supporting Logitech Unifying receivers. Meaning a single usb receiver can be used to connect more multiple Logitech peripherals at once. To do that, Logitech has provided Windows and Mac users with the Logitech Unifying software.

Unifying receiver for Anywhere MX

Linux? Not so much.

Anyway, Benjamin Tissoires posted a program that we can compile and use to connect an existing usb receiver to additional logitech stuff. First, get the script here.

Update 08/17/2012:

It seems that some of you are having trouble compiling the script on 32-bit environment. Actually, despite the warning, the program compiled just fine. I have updated the script so it can be compiled without warning on 32-bit or 64-bit. You can get it here

Put the file in a directory, let say /opt/unify, then compile the program

ikhsan@Mach5-NX:/opt/unify$ sudo gcc -o pairing_tool pairing_tool.c

Next, we need to find out which hidraw device represents the unifying receiver. Unplug and replug the receiver, and type:

ikhsan@Mach5-NX:/opt/unify$ dmesg

You should see messages such as these:

 [18675.906824] generic-usb 0003:046D:C52B.000F: hiddev99,hidraw8: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1d.0-1.6/input2

Unfortunately, it seems that, all of hidraw devices in my box (0 to 8) belong to the receiver, so I ended up trying each of them one by one. To start connecting, do this:

ikhsan@Mach5-NX:/dev$ sudo /opt/unify/pairing /dev/hidrawx

Where x is the number of hidraw device that belong to the receiver, in my case, it’s hidraw2. You should see this message:

The receiver is ready to pair a new device.
Switch your device on to pair it.

Turn on the new device, and it will be ready for use.

By ikhsan

18 thoughts on “Logitech unifying receiver on Ubuntu”
  1. I get this error when I try to compile it (on Mint 13):
    pairing_tool.c:78:25: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘unsigned int’ [-Wformat]

    Would you mind posting the binary?

    1. it seems that the script will spew some error if compiled under 32-bit machine. I have updated the script so that it no longer give that particular warning message. I have tested it under mint 11 32-bit, and it compiled just fine. Get the new script here

  2. It worked great with the keyboard, but the next day it wouldn’t work with the mouse (M705). On hidraw0 and hidraw1 it says “broken pipe” and on hidraw2 I get the “ready to pair” message, but it still won’t work.

    Would you have any suggestions?

      1. After plugging the receiver into a Windows XP system and installing the Logitech software, I figured it out: The receiver’s table fo max. 6 devices was full! (Devices from the former owner, I had no idea.) I deleted them and paired the second mouse on the Windows machine. It now works nicely on my Ubuntu.

        Would anyone know how to pimp the script so that it returns a message if the receiver is maxed out?

  3. Worked fine !

    I had 2 devices; keyboard + mouse.

    Unplugged the mouse-device, turned if off.. Used the program with hiddraw0 (this was the keyboard receiver-dj). Turned the mouse back on.. everything worked just fine !

    thanx

  4. compiled the program ok under rhel6.2

    have 3 devices that show up in dmesg hidraw0,1 and 2

    get broken pipe error with all 3…tried rebooting with receiver out and plugging back in…same deal….tried a different receiver…same deal

  5. Keep getting sudo /opt/unify/pairing_tool /dev/hidraw4
    Error: 32
    write: Broken pipe
    Red Hat Enterprise Linux Workstation release 6.4 (Santiago) Linux 2.6.32-358.11.1.el6.x86_64 x86_64

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.