Obviously this library was meant to be used in conjunction with NimBLE versions 1.4.x, but even downgrading the NimBLE library in Arduino doesn't work anymore.
Moreover, after inspecting another BLE-M3 through hidraw under linux, the patterns don't match my model. So there seems to be variations of the codes sent.
For the record, if anyone is interested in coupling this device with an ESP32, here's what I learnt connecting one to my PC (Linux) and eavesdropping on the bluetooth HID traffic : They are fairly more complicated than a keyboard. Most buttons except camera send a hail of reports to the host. When decoded, it turns out this device mimics a finger driven digitizer of all things. The "UP" button for instance sets the X coordinate at the centre row of the screen and decreases the Y axis from the top, while maintaining a simulated finger pressure ("pulling" down as one would do to see the screen on top of the current viewport). The other directional buttons work in the same manner, counterintuitively in the opposite direction they are pointing ! The centre button simulates a double tap straight in the middle of the screen. Most buttons finish by sending the pointer back at the top left corner. Even the camera button is quirky, it flip-flops between Vol UP and Vol DOWN at each press. Moreover, most buttons have other functions for long presses (left key sends POWER (sic !!!) and shuts down the connected device!!! almost had a heart attack when my computer started to shutdown...) These are early findings. I'm backing up from writing an HID interpreter for my app, I will simply create a setup phase and record the key presses in turn, saving the patterns in the NVS along the MAC address of the device and be done with it.
Hope this may help someone else...
Obviously this library was meant to be used in conjunction with NimBLE versions 1.4.x, but even downgrading the NimBLE library in Arduino doesn't work anymore.
Moreover, after inspecting another BLE-M3 through hidraw under linux, the patterns don't match my model. So there seems to be variations of the codes sent.
For the record, if anyone is interested in coupling this device with an ESP32, here's what I learnt connecting one to my PC (Linux) and eavesdropping on the bluetooth HID traffic : They are fairly more complicated than a keyboard. Most buttons except camera send a hail of reports to the host. When decoded, it turns out this device mimics a finger driven digitizer of all things. The "UP" button for instance sets the X coordinate at the centre row of the screen and decreases the Y axis from the top, while maintaining a simulated finger pressure ("pulling" down as one would do to see the screen on top of the current viewport). The other directional buttons work in the same manner, counterintuitively in the opposite direction they are pointing ! The centre button simulates a double tap straight in the middle of the screen. Most buttons finish by sending the pointer back at the top left corner. Even the camera button is quirky, it flip-flops between Vol UP and Vol DOWN at each press. Moreover, most buttons have other functions for long presses (left key sends POWER (sic !!!) and shuts down the connected device!!! almost had a heart attack when my computer started to shutdown...) These are early findings. I'm backing up from writing an HID interpreter for my app, I will simply create a setup phase and record the key presses in turn, saving the patterns in the NVS along the MAC address of the device and be done with it.
Hope this may help someone else...