Bluetooth Classic version testing (Pico W)

Please note this is experimental and there’s a non-zero chance it will end up getting scrapped.

(However, unlike the ESP32 version, you should be able to use it for commercial purposes with no additional license: it uses the same component, but Raspberry Pi paid for the license for you.)

I’ve been experimenting with a Pico W-based version of HID Remapper that supports Bluetooth Classic devices (the previously existing nRF52840-based version only supports Bluetooth LE).

There are currently two variants:

  • “single” variant uses a single Raspberry Pi Pico W
  • “dual” variant uses a Raspberry Pi Pico W and a regular Raspberry Pi Pico

This is somewhat similar to the regular USB version of HID Remapper that also has single and dual Pico variants, but for different reasons. I would recommend trying the single Pico variant first. If your device doesn’t work at all then the dual variant is unlikely to help. If it works, but you experience some issues like delayed or missed inputs, then you could try the dual variant.

To make the “single” variant, just take a Raspberry Pi Pico W and flash it with this firmware build:

remapper-picow-single-test1.zip (363.1 KB)

After that it should work the same as the previously existing Bluetooth variant of HID Remapper. There are additional buttons in the “Actions” tab on the configuration website for entering pairing mode and clearing existing pairings. If no device is paired then it enters pairing mode by itself.

The onboard LED will be on when HID Remapper is in pairing mode.

To make the “dual” variant, flash a regular Pico with the remapper_dual_a.uf2 firmware and a Pico W with the remapper_bt_b.uf2 firmware from here:

remapper-picow-dual-test1.zip (429.6 KB)

Then make the following connections between the two Picos (same as the regular USB dual Pico variant):

Pico (A) Pico W (B)
VBUS (pin 40) VBUS (pin 40)
GND (pin 38) GND (pin 38)
GPIO20 (pin 26) GPIO21 (pin 27)
GPIO21 (pin 27) GPIO20 (pin 26)
GPIO26 (pin 31) GPIO27 (pin 32)
GPIO27 (pin 32) GPIO26 (pin 31)

The Pico W is powered from the “A” side Pico so don’t connect it to the PC over USB.

Normal operation is the same as for the “single” variant.

I would be interested in seeing what devices you manage to get this to work with. My expectation is that it should work well with mainstream gamepads, but there might be issues with some mice and keyboards.

Either way let me know.

Please note this doesn’t currently support Bluetooth LE devices. The hardware and library support is there, so it might support it eventually, but it’s currently disabled.

Ooo! For ergonomic reasons, I like an old Microsoft Bluetooth keyboard and swapped ctrl/caps, which gives various minor grief on a Mac or on FreeBSD. I’d been gearing up to do this development myself, but hadn’t gotten to it.

Flashing the single variant with OpenOCD failed to verify, but flashing via emulated storage seemed to work.

It seems to work fine for me so far with an Arteck HB098 (generic cheap pandemic-era WFH keyboard) and a Microsoft Sculpt Mobile Keyboard, once I figured out you have to enter a PIN at pairing. Both devices work at the same time.

Both seem to take about 5-10s to connect after power off/on, or sleep/wake. They both drop keystrokes entered before the apparent connect (prior to switching the keyboard out of boot mode, I suspect).

Is source code for this work available? It doesn’t seem to be in the main hid-remapper repo.

And thanks! Even if your work never progresses past this it’s useful to me.

Thank you for testing, this is encouraging.

The source code isn’t available yet, but that’s the plan eventually of course.