I am try to read the buttons of a simple Bluetooth low energy remote control (Volume, Page). For the first i tried to read "Increase Volume" but had no success.
What I have done so far:
- Scan the BLE (ArduinoBLE-->Central-->Scan). Works fine and gets lots of Data.
- Push different Buttons during the scans (Point 1) an compare whether a bit switches --> nothing.
- Test with Smartphone. Press "Increase Volume" Button --> ok, works fine.
- Try to sniff the data --> could not find the "button bits".
I think my error is, that I have to send a "Read request" or something else. I am new to Bluetooth and don't know how.
Would be glad if there is an example code for doing this.
OK I think I understand your question now. It seems that you are trying to see if advertisement data changed based on the button switch from the remote control. While this is very application/product dependant, most BLE communication and data exchange happens over a connection. In other words, you need to connect from your ArduinoBLE to the BLE remote control.So your steps are:-
Unfortunately, connecting to the BLE remote controller is the easy part, and the difficult part is reading the BLE data. In BLE, data exchange happens over GATT which is a unique thing to Bluetooth (it works in a similar fashion to client-server communication, where the remote will be a GATT server hosting data and the Nano 33 will be a GATT client reading the data from the server). Besides the complexity of the GATT communication, not all vendors expose how their data is represented in the GATT communication. In other words, if your remote control vendor does not expose how the button presses are exposed over GATT, it might be very difficult to find what you're looking for.
In any case, I've added a few links below to help you start on your journey:-