Jun 132019

To help diagnose USB HID communication and to test out updates to hidapi, I wrote hidapitester. It is a command-line program that allows you to exercise just about every aspect of hidapi. Pre-built binaries for MacOS, Windows, and Linux Ubuntu x64.

I’ve found it very useful. You can use it to:

  • Scan for connected HID devices, optionally by VID, PID, usagePage, usage
  • Send OUTPUT reports, with or without Report IDs
  • Receive INPUT reports, with or without Report IDs
  • Send FEATURE reports, with or without Report IDs
  • Receive FEATURE reports, with or without Report IDs

Commands are specified in-order on the command-line, so you can do all of these, repeated reads, close-and-open, etc. all in a single command. More details can be found on the hidapitester github README page.

It is written in really vanilla C to maximize compatibility and ease-of-compilation.

Here’s the help page:

  hidapitester <cmd> [options]
where <cmd> is one of:
  --vidpid <vid/pid>          Filter by vendorId/productId (comma/slash delim)
  --usagePage <number>        Filter by usagePage
  --usage <number>            Filter by usage
  --list                      List HID devices (by filters)
  --list-detail               List HID devices w/ details (by filters)
  --open                      Open device with previously selected filters
  --open-path <pathstr>       Open device by path (as in --list-detail)
  --close                     Close currently open device
  --send-feature <datalist>   Send Feature report (1st byte reportId, if used)
  --read-feature <reportId>   Read Feature report (w/ reportId, 0 if unused)
  --send-output <datalist>    Send Ouput report to device
  --read-input [reportId]     Read Input report (w/ opt. reportId, if unused)
  --read-input-forever [rId]  Read Input reports in a loop forever
  --length <len>, -l <len>    Set buffer length in bytes of report to send/read
  --timeout <msecs>           Timeout in millisecs to wait for input reads
  --base <base>, -b <base>    Set decimal or hex buffer print mode
  --quiet, -q                 Print out nothing except when reading data
  --verbose, -v   

 Posted by at 9:30 pm
Jun 042019

I upgraded the firmware on my beloved-but-long-unused 1986 Oberheim Matrix 6r! These synths are the royalty of analog fatness. I love their sound. This is the result I was looking for:

It’s remarkably clean inside for a machine made in 1986. I acquired it used in the early 90s.

Just look at the bank of six voices. The CEM3396 chips are the VCF/VCA chips that give this synth its distinctive lushness. And made each voice circuit like 5x smaller than possible just a few years earlier.

The firmware upgrade was just a simple EPROM swap. Out with the old, in with the new! I got the chip from a chap on Reverb who’s using new EPROM stock (not old ceramic parts) The firmware update itself allows the Matrix to be used with modern MIDI patch editors and is a testament of amazing microcontroller assembly language hacking. Check out the page by the author of the Matrix firmware update. Thank you so much!

And the result is the same as before the upgrade: it still sounds glorious.

 Posted by at 12:47 pm
Jun 032019

Here is HIDPyToy. It’s a small app written in PyQt using the hid Python package to talk to USB HID devices (like Teensy RawHID or blink(1) USB RGB LEDs). Pre-build binaries are available for MacOS and Windows.

HIDPyToy allows you to exercise pretty much the entire hidapi library from Python. You can:

  • List for all HID devices on a system
  • Send OUT reports, with or without Report Ids
  • Send FEATURE reports, with or without Report Ids
  • Receive IN reports, with or without Report Ids
  • Receive FEATURE reports, with or without Report Ids

 Posted by at 9:26 pm
Nov 252018

One of the goodies from the Hackaday Superconference was an Adafruit HalloWing. And I thought: surely a Jolly Wrencher case must be made for this skull-shaped circuit board! How has no one made of these yet?

So I remixed an existing clip-on case that fits the included battery (Thanks DoctorWhich!), added the Jolly Wrenches and printed it out. It came out pretty great. Though now I wish I had some black PLA.

Here’s a video showing it:

See also:

 Posted by at 2:05 pm
Jul 082017

I really like the generation previous to the current Macbook Pros. You know the ones. They had all the useful ports like USB-A, HDMI, an SD Card slot, and MagSafe!  And it had a long-lived battery in a thin case. That is my Macbook Pro. And it’s wonderful.

But now 3.5 years on, the once legendary battery was at about half its design capacity. I got 1600 charge cycles out of it though, which is astounding.  And it still worked, unlike a previous Macbook’s battery that ended up getting a bad cell that caused it to unceremoniously shutdown at 20%.  So I replaced it and I think it is working out great.

Continue reading »

 Posted by at 7:31 pm