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.

1 Like

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.

1 Like

Hi,
Thanks for your work on this. I’ve got a bluetooth (classic) keyboard with touchpad I wanted to use the HID bluetooth remapper with, but just as a HID proxy not actually remapping anything. I tried the pico W single version. It flashed ok and seemed to work the first time, but I found if I changed to one of the other bluetooth channels on the keyboard and then went back to the channel paired with the pico W, it wouldn’t work any more. After lots of trial and error, I found that it was intermittent in that, if I disconnected it for a while, or plugged it back into the PC using a different USB port, it would often start working (without being re-paired).

When it works, it works very well, keyboard and touchpad all working fine, and if I just keep using it, it works for I think I tried it up to about and hour, so I suspect it would keep working fine. It’s just if I interrupt things by turning off the keyboard or switching it to a different bluetooth pairing that things seem to stop working (for a while at least).

If there is any testing I can do that might help diagnose the issue please let me know?

Do you think the dual pico / pico W version would do any better?

Cheers
:slight_smile:

Hi,
In addition to my first post above, the file I used to flash my pico W was taken from link above in this thread. When I connect to it with the configuration tool, it tells me to update the firmware (or use a link to an older version of the configuration tool). The link to new firmware takes me to a folder with a file called remapper_pico2.uf2 amongst others. Can I flash this to my pico W to update the firmware? I assume it is for a pico 2 W? If I get a pico 2 W and flash it, might it fix my issue with the unit only working after a restart and stopping again (until a restart) if I switch bluetooth channel on the keyborad and then switch back to the channel paired with the pico W?
I really hope I can get this working through switching bluetooth channels on my keyboard.
Thanks again for all your work on this.
Cheers
:slight_smile:

The main releases don’t have the Pico W Bluetooth builds, those are still in experimental/discovery stage. I didn’t make new builds so you just have to use the old versions of the website with them. The Pico 2 build is the USB version for the Pico 2.

You could try seeing what it prints out on the debug serial output, but you’d need a USB-to-UART adapter and there’s no guarantee it will tell us anything about the nature of the issue.

Has there been any further development on this branch to add BLE? I was thinking about making a BT dongle and would rather help you test this with a Pico W than going down the nRF52840 route.

No, if you only need BLE the nRF52840 version is currently your best bet.

Will this work with the RP2350 versions or only the RP2040 ones?

Also, any updates to releasing the source for this version? I’d love to fork it so I can add the code I added to my fork of the regular version (ie a few new custom expression functions, 8-layer support, persisting expression comments when saving to/reading back out from the board.)