I have a product that we are porting over from NRF52 to ESP32-S3.
I am using platformio with ESP-IDF version 5.0.
Most of the development has gone smoothly.
I have 2 hurdles that seem to be stopping me currently.
#1 - On NRF52, i could programmatically via code - allow and reject pairing on my product and the phone trying to connect to it. My device has a single button that when pressed allows pairing / bonding for a 30 second window. If a phone tries to bond any time except after the button has been pressed and the 30 seconds after that, pairing / bonding is rejected. If the button is pressed, and the phone tries to pair within 30 seconds, pairing / bonding is allowed. Is there a way to do this on ESP IDF using NimBLE host?
#2 Our device sends out notifications to bonded phones (peers) (up to 3 concurrent connected phones). I currently am able to send notifications to my connected phones but it also sends the notifications to phones that are not bonded / paired. Is there a way to only send notifications to bonded devices?
Any help in the right direction would be appreciated!
NimBLE Questions - Issues
Re: NimBLE Questions - Issues
Hi @bheestand,
Just a suggestion.
1. BLE_GAP_EVENT_PASSKEY_ACTION event would be generated from stack to application to get user's input during pairing. May be you can start a timer of your preferred duration ( when button is pressed ) and only if GAP layer receives the event, then application can approve the request, or else reject it ?
2. I guess Nimble just gives API to send notification. May be application can access the nvs to know which are the bonded peers, put some check for ensuring end remote device is one of the bonded peer and only then send notification ?
Just a suggestion.
1. BLE_GAP_EVENT_PASSKEY_ACTION event would be generated from stack to application to get user's input during pairing. May be you can start a timer of your preferred duration ( when button is pressed ) and only if GAP layer receives the event, then application can approve the request, or else reject it ?
2. I guess Nimble just gives API to send notification. May be application can access the nvs to know which are the bonded peers, put some check for ensuring end remote device is one of the bonded peer and only then send notification ?
Who is online
Users browsing this forum: No registered users and 138 guests