Bluetooth management #19
Replies: 4 comments 5 replies
-
Maybe I'm wrong, but I think I discovered that with the 'arduino-pico' libraries it is not possible to use 'serialBT' and 'PICOBluetoothHID' at the same time, unless you change part of the code of these libraries. Can you confirm this? Do you know if there is any other way or do you have any other ideas? ('PICOBluetoothHID' is needed to create the keyboard, mouse and gampad devices, while 'serialBT' is needed to make the App communicate with the gun and also for MameHooker' during the game |
Beta Was this translation helpful? Give feedback.
-
Could I try to create a Bluetooth library specifically for OpenFire by merging and partially modifying the code of the two libraries arduino-pico serialBT and PICObluetoothHID? (I thought the bluetooth support in the arduino-pico libraries was more advanced) |
Beta Was this translation helpful? Give feedback.
-
As promised, I'm implementing Bluetooth management, both for the HID part (keyboard, mouse, gampad emulation ... which was basically already done, except for a problem with the gamepad due to problems with the arduino-pico libraries), and for the serial connection via Bluetooth for 'Mamehooker' and communication with the OpenFire App on the PC. I'm still working on it and I had to do a lot of testing, because there is little documentation on Bluetooth management on the Pico W. I have little time and so I'm going slowly. |
Beta Was this translation helpful? Give feedback.
-
With regards to lockups when Bluetooth mode is enabled, it might not actually be (fully) related to the BTstack at all; see #22 |
Beta Was this translation helpful? Give feedback.
-
I found the reason why with the bluetooth initialization an error is reported when trying to insert the three profiles (keyboard, absmouse and gamepade16) in the 'description report' (desc_bt_report) ... the problem is not in the Tiny_USBdevices.cpp code, but in the arduino-pico library in the PICOBluetoothHID.h file at line 247 (uint8_t _hid_service_buffer[300];). The buffer is too small and the long definition string of the 3 devices does not fit. Just increase the size of the buffer and the problem is solved. Changing it with uint8_t _hid_service_buffer[1300]; .. the initialization occurs correctly and the three devices are recognized by the operating system. (I think even fewer bytes are enough). In the meantime I continue with the study and arrangement of the part regarding the connection via bluetooth.
Beta Was this translation helpful? Give feedback.
All reactions