Bluetooth classic - HID and SPP connection (RFCOMM) simultaneously #2420
alessandro-satanassi
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The PicoW must connect to the PC (windows) via Bluetooth and must emulate a keyboard/mouse/gamepad (HID) and at the same time must also create a serial connection (SPP-RFCOMM) with which it must communicate with an App. I tried to use the PICOBluetoothHID and SerialBT libraries and individually they work, but together they don't. I modified the libraries a little to make them work together, leaving almost all the code unchanged and managing the initializations and gap commands. The PC recognizes the PicoW device with the HID and SPP services (a COM port is created) and associates it regularly and connects it automatically. The problem is that the COM port that it creates appears to me already connected when I try to open it from the app with which it must communicate. Is there a way or some configuration to make sure that the COM port is not automatically connected but only associated? ..or a way to make the PC recognize two different devices each with its own service (HID or SPP independent) and not a single device with the two services (HID-SPP)? thanks
Beta Was this translation helpful? Give feedback.
All reactions