-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Getting BLERemoteService from BLERemoteCharacteristic #3367
Comments
Note on this bug the real issue is that when you call |
I was able to fix this by first updating the library I was using to the most recent build from this repo (the ESP bundled one is out of date) and making some meaningful changes to the way I tried to jump from BLE device to BLE device. I'll update the repo I pointed to in this ticket with my new code. |
I'm having the same issue, trying to build a BLE gateway, any strategic reason I'm missing as to why |
Sorry for not following the standard bug report template here..
What I'm trying to do is use an ESP32 to connect/get some notification data / disconnect / go on to next device for N number of identical BLE servers and I'm having problems because of accessors in the API being set to private.
What I want to do is this:
2a) Parse out the relevant data from the capture, store in a struct for that device ID
The problem I'm running into is that the
BLERemoteCharacteristic::registerForNotify
callback is unnecessarily limited because not only does it not make room to pass in any sort of contextvoid *
, but what it does pass in doesn't let you figure it out which device this notification came from.One easy solution here would be to make
BLERemoteCharacteristic::getRemoteService()
public
instead ofprivate
. This way, from within the callback you could callcharacteristic->getRemoteService()->getClient()->getPeerAddress()
and get the address of the device sending the notification.At the end of the day what I'd like to do is be able to tell from within a characteristic callback what device sent the notification.
The text was updated successfully, but these errors were encountered: