Can a GATT server refuse a connection?
Posted: Wed Oct 10, 2018 12:29 pm
Hello everyone,
I'm trying to implement a pairing protocol in my BLE GATT server. I have a device with a display that should ask the user whether the requesting client (a smartphone) is authorized before accepting to share informations.
I based my program on the GATT server example; as far as I understand once I receive the ESP_GATTS_CONNECT_EVT the connection is already established, and there is no way to "hold it off" until a confirmation is given. Am I correct?
In this case I could simply remember the connection status and refuse all requests until it is confirmed by the user (using ESP_GATT_READ_NOT_PERMIT and ESP_GATT_WRITE_NOT_PERMIT status codes). I am not a bluetooth expert so I'm asking if this is a optimal (or evend decent) solution or if I'm overlooking a more obvious choice.
I'm trying to implement a pairing protocol in my BLE GATT server. I have a device with a display that should ask the user whether the requesting client (a smartphone) is authorized before accepting to share informations.
I based my program on the GATT server example; as far as I understand once I receive the ESP_GATTS_CONNECT_EVT the connection is already established, and there is no way to "hold it off" until a confirmation is given. Am I correct?
In this case I could simply remember the connection status and refuse all requests until it is confirmed by the user (using ESP_GATT_READ_NOT_PERMIT and ESP_GATT_WRITE_NOT_PERMIT status codes). I am not a bluetooth expert so I'm asking if this is a optimal (or evend decent) solution or if I'm overlooking a more obvious choice.