Logitech unifying receiver monitoring

While going through Fedora’s Tagger, I came across a package called Solaar, a Linux device manager for Logitech’s Unifying Receiver.

I thought “Well, this could be pretty useful” because until the little lights on my MX Master mouse start flashing red, I never know the charge status of the mouse.

Installing the package with dnf install solaar gave me a taskbar icon, but for some reason it didn’t find any devices to manage. After poking around in the Solaar installation documentation, it looked like my problem was that the Fedora package didn’t install the udev rules that allow non-root access to the Logitech Unifying Receiver.

Once I added the rules file and a new user group, Solaar was able to find the MX Master and show me its status.

Working pretty well so far, and it’s nice being able to see the charge status of my mouse. Doesn’t let me configure buttons or change DPI settings, but maybe that’s something I can convince solaar to do.

~/workspace> solaar show
Unifying Receiver
  Device path  : /dev/hidraw4
  USB id       : 046d:c52b
  Serial       : 89629F0B
    Firmware   : 12.03.B0025
    Bootloader : 02.15
    Other      : AA.AA
  Has 1 paired device(s) out of a maximum of 6.
  Notifications: wireless, software present (0x000900)
  Device activity counters: 1=130

  1: Wireless Mouse MX Master
     Codename     : MX Master
     Kind         : mouse
     Wireless PID : 4041
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: 756A9A32
        Bootloader: BOT 18.01.B0014
          Firmware: MPM 11.02.B0014
          Firmware: MPM 11.02.B0014
     The power switch is located on the base.
     Supports 29 HID++ 2.0 features:
         0: ROOT                   {0000}
         1: FEATURE SET            {0001}
         2: DEVICE FW VERSION      {0003}
         3: DEVICE NAME            {0005}
         5: RESET                  {0020}
         6: BATTERY STATUS         {1000}
         7: CHANGE HOST            {1814}
         8: REPROG CONTROLS V4     {1B04}
         9: ADJUSTABLE DPI         {2201}
        10: VERTICAL SCROLLING     {2100}
        11: SMART SHIFT            {2110}
        12: HIRES WHEEL            {2121}
        13: GESTURE 2              {6501}
        14: DFUCONTROL 2           {00C1}
        15: unknown:1813           {1813}   internal, hidden
        16: unknown:1830           {1830}   internal, hidden
        17: unknown:1890           {1890}   internal, hidden
        18: unknown:18A1           {18A1}   internal, hidden
        19: unknown:18C0           {18C0}   internal, hidden
        20: unknown:1DF3           {1DF3}   internal, hidden
        21: unknown:1E00           {1E00}   hidden
        22: unknown:1EB0           {1EB0}   internal, hidden
        23: unknown:1803           {1803}   internal, hidden
        24: unknown:1861           {1861}   internal, hidden
        25: unknown:9000           {9000}   internal, hidden
        26: unknown:9200           {9200}   internal, hidden
        27: unknown:9240           {9240}   internal, hidden
        28: unknown:1805           {1805}   internal, hidden
     Battery: 50%, discharging.

Update: Ended up running into some issues with the taskbar icon reverting back to not detecting any devices. This is apparently a known issue, so I cloned the Solaar repo and pulled in some of the PRs that are supposed to address the issue. Copied the files to where they were installed on the system (/usr/lib/python2.7/site-packages/) and restarted the app. Solaar picked up the mouse, and even some options for configuring the mouse, including DPI control. Woot! So far, no more problems with Solaar suddenly forgetting the mouse.

New mouse options
New mouse options

Reflashing the wifi router

The wifi router (a TP-Link Archer C2600) started to  have some issues with wifi dropping out and I noticed there was a new firmware available for it, so I decided it was time to give it a reset and flash the new firmware while I was at it.

It’s normally a straight forward process, but somehow the router had gotten itself into a state where any login attempts ended up returning a 500 Internal Server Error, even after doing a factory reset on it. Didn’t matter what browser I tried to log in with.

Without a way to get into the router’s interface, I thought I was going to have to get a new one, which would have been disappointing because the C2600 had been working pretty well, and wasn’t all that old.

The next thing I considered was flashing OpenWRT or LEDE to the router. After a bit of poking around in the documentation, and a suggestion from someone in one of the Slacks I hang out in, I learned that firmware could be installed via tftp. This turned out to be a fairly straight forward procedure and not too difficult to set up.

If you don’t have tftp already installed on the computer, the instructions here are pretty good.

  1. Connect the C2600 (turned off) to the computer with an ethernet cable.
  2. Manually configure the IP address of your computer to
  3. Extract the factory firmware for the C2600 and rename it to ArcherC2600_1.0_tp_recovery.bin. Copy the file to /var/lib/tftpboot/
  4. While holding the reset button down, turn the router on. Keep the reset button pressed for about 15 seconds. This should put the router into recovery mode.
  5. Wait for the firmware to be transferred to the router. You might see some messages show up in /var/log/messages indicating the transfer has occurred.
  6. Wait about 5 minutes and power cycle the router.

With any luck, the router will come back to life with the firmware installed and everything should be honky-dory. If not, try again. Once you’ve got the firmware flashed, you can disable the tftp server and close up the firewall port.

The C2600 is back in service and seems to be working fine again. I can log into the router again, and there haven’t been any problems with the wifi dropping out.

RadDB: Storing and viewing test data

Development on my equipment database has slowed down a bit partly because of being busy at work and partly because the database files on my home computer keep getting corrupted for some reason and I haven’t bothered to figure out why or fix it yet.

The equipment tracking part does pretty much everything I need now (still a few things to take care of), so my latest efforts have been on trying to get the test data locked in my spreadsheets into the database.

I started off using the PhpSpreadsheet package (which is still under development), but I found a lot of what was in the documentation wouldn’t work. I ended up going to the older PHPExcel package instead. Using this made it relatively easy to create some Laravel Artisan commands that pick out the test data from my spreadsheets and stick them into the database. Now I can batch add data to the database using a simple shell script. One problem with the current commands is that they won’t work with older version of my spreadsheets yet because the locations of some of the data has changed over time. Not sure I’m too worried about that yet. They also don’t handle problems very gracefully yet. Something to work on later perhaps.

The DB schema for the test data is still being worked on, but I think I’ve got something that will let me pick out data for an individual survey, as well as show a time series from a specific test for a given machine.

Current works in progress are views to display the test data. I’ve got a few done, but still have a bunch more to do.

I love how easy doing all of this has been with Laravel.

New monitor stands

One of the guys from the Charleston Tech Slack was selling a dual monitor mount, so now my two computer monitors are now mounted off the desk at a much more comfortable working height.

Computer monitors before
Computer monitors before

One 6mm hex wrench and 8 M4x12mm screws later, the monitors were mounted on the stand and reconnected to power and the computer.

Computer monitors after
Computer monitors after

It’s a pretty sturdy stand and seems to be holding my 21″ monitors pretty easily. I added an additional piece of 1×4 to where the stand clamps to the table as an additional shim and to help spread the load on the table top a bit more.

The monitors are up about 5 cm higher than they were with the factory stands, and a lot of space underneath the monitors is freed up. Pretty pleased with this setup.

Manual kmod rebuild

Just leaving a note to myself for future reference.

Needed to rebuild the kmod-wl package because of a borked update process (something made the computer crash mid-update).

A bit of Google searching brought me to the script in /etc/kernel/postinst.d/akmodsposttrans.

Running sudo /usr/sbin/akmods --from-kernel-posttrans --kernels `uname -r` rebuilt the missing kmods and a modprobe wl got the wifi back up and running.