HID Remapper
github.com
github.com
There is an open source gamepad library for the RP2040 but they said on GitHub issues and discord that they have no plan to pursue force feedback support.
But I designed a really nice brushless motor controller for the RP2040 and I’d love to make a force feedback wheel with it! I already have a motorized wheel I built to test this and I even made it work with motorized return to center as a regular USB joystick device, I just don’t know the magic incantations to make it in to a force feedback device.
It would work though, and I do want a wheel even for myself (the surplus motor I got for it is a beast). Might be my best bet.
If you have enough USB experience you might be able to do it by (a) adding the necessary configuration reports to expose HID force feedback and (b) implementing the matching endpoint. But it's quite fiddly and benefits from having a device you can copy.
Unfortunately I don't think Android supports acting like a HID device. But possibly custom firmware in the dongle could support some USB serial protocol.
The best solution I've found for pocket-sized USB HID is an EspUSB Tiny:
https://github.com/cnlohr/espusb
It's an ESP8285 acting as a USB keyboard, with the keystrokes coming over WiFi from a nearby phone.
An RP2040 device with 2 USB downstream facing port and 1 USB upstream facing port can be made, stuffed into a conspicuous Y-cable, appropriately programmed and appear as a single USB keyboard. Out of my reach but not impossible.
edit: Actually the port to connect to the PC goes through a UART chip, so you can't emulate HID devices using that port. So it won't work.
If you want a product, why not just get a USB-Bluetooth adaptor? It would support HID as well as A2DP (music) and other Bluetooth protocols.
If you want to build something, I'd recommend getting a board with an ESP32.
The ESP32 comes with plenty of example code in their esp-idf SDK. You'd be needing:
esp-idf/examples/peripherals/usb/device/tusb_hid
esp-idf/examples/bluetooth/esp_hid_host
I went with a USB and BLE chip on the external side of my keyboard to connect to both workstation and phone to push the passwords, MFA, and encrypted text from the manager I built into the keyboard itself.
Was it a lot cheaper than the Elgato one?
https://www.amazon.com/Elgato-Stream-Deck-Pedal-footswitches...
I'm thinking this remapper would get some buttons working on some old USB keyboards that have driver issues. BUT, the cost and time to make one of these remappers makes it only useful in very extreme circumstances where buying a alternate replacement device is not possible, feasible or desirable.
Looking at the store page is refreshing my memory. I ended up being unwilling to install the sketchy software. I just took it for granted it would come with a sensible default. Mouse3+, or a joypad input. Something.
And since you are skipping the redundant USB step, you can also use dumb non USB pedals. There are plenty of options available meant for sewing machines, midi keyboards and industrial equipment. Just need to watch out as some of them contain a potentiometer for modulating the output instead of on/off switch. That may or may not be what you want. It should still be possible to emulate regular switches with them, but it will require a bit more coding.
This is more suited for moderate complexity HID devices where direct rewiring is less practical due to amount of inputs (keyboard) or size constraints+non trivial undocumented sensors(mice, barcode scanner, other specialized input devices), or don't want to take it apart.
And, despite its obvious usefulness, this can also be used as base for a device to mess with coworkers. Change the firmware so that it rotates the mouse "north" by an arbitrary value between -30° and +30°, slowly changing over time. Or randomly remap keyboard keys to other neighboring keys but only once every n seconds/minutes. Just enough to evade suspicion. So many possibilities :-D
I found this because I was looking for something else for the access controller. It's basically the other way around: I want to use the controller on a mac and need to remap it's outputs to something useful. I don't have a playstation and apparently you need one to remap the controller keys once before plugging it in to a PC, otherwise only 3 out of 8 buttons will send something that is recognized as USB HID
[0] https://www.youtube.com/watch?v=MtXdPWN6NBw [1] https://www.playstation.com/en-us/accessories/access-control...
The PlayStation Access Controller has profiles that can be configured from a PS5 as you say, but regardless of the current profile or mapping, it always sends the raw button/joystick states in the report. They're not properly exposed in the report descriptor, but they're there. You would have to use what HID Remapper calls "custom usages" to get to this raw data. I can assist you with that if you're interested. Though it might be easier to find someone with a PS5 for the one time setup.
No, it works completely in software, it's just on a different CPU. Still neat though!
The only thing missing is Wifi really.
Sadly, the firmware for the CYW43439 is a binary blob provided in the form of C header files[1] -- even though it's free for commercial use[2] as long as it's used with a RP2040 like in the Pico W.
[1] https://github.com/georgerobotics/cyw43-driver/tree/main/fir...
[2] https://github.com/georgerobotics/cyw43-driver/blob/main/LIC...
This is Hacker News - let's start reverse-engineering it. :-)
Then it's "do it 4 times in software for free" and the software is not the same and this solution suddenly becomes attractive.
You could solve it by getting a keyboard that supports macros on the keyboard hardware maybe. Or keep your existing keyboard you know and love and insert this little solution.
Connecting the 2040 via serial emulating USB keyboard and mouse would make it possible to use older rasperry pi 3 devices for pikvm.
This project seems to prove that this is possible...
> I am expecting to see 60fps and I am not, why?
"PiKVM receives the entire signal, but then the encoding is the bottleneck. For 1080p, this is no more than 30 fps. V4 throws out every second frame of 60 hz/fps, and 30 fps is encoded. V3 and DIY can't process 60 hz and is only able to capture 50 hz, and in the same way they take every second frame, all you get out is 25 fps. The reason why V3 and DIY does not encode 30 out of 50 is that the picture will be jerky, but smooth at 25."
The main website claims 1080p60 support, which is true on the input side, but that's not what you get on the output... a bit of false advertising IMO.
This remapper should be able to remap the Command/Windows key to Ctrl.
If your mouse has a sample rate of, say, 100Hz, what benefit does it bring to increase that to 1000Hz? You would still get 10 samples with the same data, then the next 10, and so on...
Or am I missing something here?
Many mice are capable of higher reporting rates than their defaults, they just need to be asked nicely.