-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLE HID composite devices #1587
BLE HID composite devices #1587
Conversation
…d). Removed sdkoverride again, doesn't work.
…arduino-pico into BLEHID_Composite
@benjaminaigner can you check that you've |
THX for the hint, I somehow overlooked the CI notice. |
Sorry for the delay in review/merge. Been occupied elsewhere recently but jut made a note to make GH bug me until I actually do review and merge this. 😆 |
No worries, I know it can be very time consuming managing a project. |
I just pulled this patch and did some basic sanity testing, Unfortunately, even the non-changed BLE teste (i.e. KeyboardBLE/Password) do not function and seem to hang when any HID communication happens (i.e. on BOOTSEL press). For sanity, I just reset to the So, it looks like there's something on your system but not in this PR. Could you double check that nothing else is different? (you could simply pull a complete new copy of this repo, |
Dear @earlephilhower Interesting, I've tried it right now on a Notebook without any prior RP2040 core, using following steps:
Opening Arduino, selected "RPi Pico W", changed to "IPv4 + Bluetooth" and uploaded Worked on:
What device do you use for testing? |
Update: I've tried One hint: you definitely need to re-pair your PicoW, otherwise the HID report map is cached and not updated. |
Therein lies the rub, maybe. Are you using any different submodules (different pico-sdk, different btstack)? That's your repo and not what will happen to this repo should it merge. I just did the following in a clean directory, moving my development git clone to a safe spot before beginning:
This takes the PR here, as-is, and combines with the I'm using Ubuntu 20.04 and a TP-Link USB BT adapter that runs fine w/master, and I did remove any pairing before reconnecting. The behaviour I'm seeing under the Mouse/Circle.ino example is:
This hang happens even when there is no pairing present. With Other examples give the same kind of behavior. No BLE HID messages received and no response to subsequent BOOTSEL presses. |
Dear @earlephilhower sry for the delay, other important stuff to do. Unfortunately, I cannot reproduce this issue. I'll need to check the problem with a Ubuntu machine, with Debian & Android it works out well. |
I don't believe this is related to the host OS at all. When I run this PR against master I get the hang in the Pico described, even when there is no BT pairing. In |
I've just pulled and built this PR again, and then run against a Windows machine instead of my normal Ubuntu server. While Windows does show it as a BLE composite device (like Ubuntu), the new combined example doesn't actually seem to work or send anything at all when BOOTSEL is pressed. The same failure is seen on the simple KeyboardBLE example. Pairs, but nothing at all is received by the Windows PC and the BT stack seems to lock up the loop, causing add'l BOOTSEL pressed to be ignored. This is the same as Ubuntu for me, unfortunately. I think maybe you have a new library or missing override file that's not been checked in to the GH branch. |
OK, I found 2 bugs, which might caused this error:
I've tested it on my Windows machine and it works! Please unpair the device, otherwise the old ATT db is still cached by Windows. Nevertheless, interesting that it works on a Debian machine, but not on an Ubuntu. |
Thanks. I'm traveling this week, but will give the latest update a try when I get home this weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success! This latest push does connect and run properly as far as I can see. The single-device and multi-device examples I've tried over BLE all seem to work fine.
Thx for digging into this!
Wonderful, I'm glad I found the issue. |
I'm not sure if this is the place to say it, but... MASSIVE THANK YOU to you both for this. I've developed a bluetooth NFC reader and I have been struggling for ages with iPads not showing the onscreen keyboard when connected to a bluetooth keyboard. However, with this, I was able to present a "mouse" and a keyboard to the iPad. Now that the iPad saw a mouse, I was able to turn on "Assistive Touch" on the ipad, and then turn on the "On Screen Keyboard". This works like a charm with the NFC data being sent via the keyboard, but the user is still able to enter text with the onscreen keyboard. |
Dear all,
I've added the BLE HID composite device, where you can use either Mouse, Keyboard, Joystick or any combination of these libraries to have a variable HID device.
An example with all 3 of them is
BLECircleKeysJoystick
in the MouseBLE library.