guild icon
Toit
#BLE notifications
Thread channel in help
Oliver M
Oliver M 02/13/2023 09:46 AM
Question for @MikkelD -- I'm trying to interact with a button via BLE, but I must be missing something. I've tried this both with an "AB Shutter3" button, and a "VR-PARK" joystick. I scan, discover, and connect to the device. Then I retrieve the relevant service, and the characteristic.The properties are 18 and 26 respectively, ie they support notifications. I subscribe to the characteristic, and then wait_for_notification on it. This blocks, and nothing happens, even if I press the button(s) to create events. (Actually, even reading out the characteristic without bothering with the notification doesn't yield any changed values). Any idea what I'm missing? For the VR-PARK, there is some sample code which I'm trying to replicate: https://github.com/BigJBehr/ESP32-Bluetooth-BLE-Remote-Control/blob/master/BLE-VRBOX.ino(edited)
An Example of using a BLE Remote Controller with an ESP32 - ESP32-Bluetooth-BLE-Remote-Control/BLE-VRBOX.ino at master 路 BigJBehr/ESP32-Bluetooth-BLE-Remote-Control
floitsch
floitsch 02/13/2023 09:52 AM
@MikkelD any idea?
Oliver M
Oliver M 02/13/2023 10:06 AM
Here is my test program
MikkelD
MikkelD 02/13/2023 11:15 AM
Nothing springs to mind as to what the problem can be. I would probably need the HW to debug.
Oliver M
Oliver M 02/13/2023 11:21 AM
I'm just puzzled that it happens on both devices -- I got the VR-PARK after the AB Shutter3 didn't work, but that doesn't either. Is there another way I can test whether they work? I assuem I cannot run that on my Ubuntu machine, as that won't have BLE?
Oliver M
Oliver M 02/13/2023 11:22 AM
I've got a third button on order to arrive in about two weeks...
MikkelD
MikkelD 02/13/2023 11:26 AM
BLE scanner on the android is my go-to tool to verify if the device is working as expected. It can subscribe and show updates.
MikkelD
MikkelD 02/13/2023 11:27 AM
It is not unreasonable to expect the toit-ble has issues. So we need to narrow it down.
Oliver M
Oliver M 02/13/2023 11:33 AM
Alas I have an iPhone :馃槮:
Oliver M
Oliver M 02/13/2023 06:21 PM
When I pair either device with my phone, I can use them to change the volume (as the AB Shutter3 simulates a camera remote, and the VR-PARK is intended for media applications), so they definitely send something via bluetooth.
MikkelD
MikkelD 02/13/2023 11:24 PM
Moat likely it is the pairing part. The toit implementation does not support pairing (yet).
Oliver M
Oliver M 02/14/2023 08:46 AM
Ah, OK...
Oliver M
Oliver M 02/14/2023 08:47 AM
Just for planning purposes: is that on the cards to be added? If not then I need to find a different solution for my project.
MikkelD
MikkelD 02/14/2023 09:02 AM
It is very much on my list of things to do soon. We also need a remote control in our project and I already ordered the sony vr controller(edited)
Oliver M
Oliver M 02/14/2023 09:16 AM
Great! I'd be happy to help with testing if needed.
MikkelD
MikkelD 03/07/2023 01:55 PM
Ok. So I kind of implemented the secure/pairing stuff. Unfortunately, it seems to not be enough. These devices uses L2CAP stuff. I will keep trying to find a solution.
Oliver M
Oliver M 03/07/2023 05:51 PM
Thanks. As I said, happy to help with testing, I鈥檝e got three bluetooth buttons now to play with!
MikkelD
MikkelD 03/07/2023 06:45 PM
Right. So, I got the VR-PARK working. The root cause was that the HID service uses the same UUID for several characteristics. That was not anticipated by the code. I am getting data now when pressing keys and using the joystick.
馃檪1
MikkelD
MikkelD 03/07/2023 07:12 PM
Added support for
-- Bonding
-- Secure connection to remote peers
-- Callback for read requests
19 messages in total