Hello,
We would like to setup a BLE server and client, both working together at the same time.
There is no example of that in esp-idv v3.3.
Can anyone enlight me and tell me if it is possible ?
Thanks for any help !
Francois
BLE server and client coexistance
Re: BLE server and client coexistance
Yes, it is possible.
Re: BLE server and client coexistance
Thanks chegewara for the answer,
When i compared the code of the two examples gatt_server and gatt_client i found that it looks easy to mix the two of them.
So i did it, the server started ok, then i started the client with a scan, found my device but strangely when i connect to the device with a call to esp_ble_gattc_open() i get a ESP_GATTS_CONNECT_EVT in the function gatts_profile_event_handler(), meaning my own server got a connection ???
But after that the client and server seems to both work ok, only the server has a kind of "ghost" connexion.
Any idea why is that ? may be i can just filter this self connexion and everything is just fine ?
Kind regards
François
When i compared the code of the two examples gatt_server and gatt_client i found that it looks easy to mix the two of them.
So i did it, the server started ok, then i started the client with a scan, found my device but strangely when i connect to the device with a call to esp_ble_gattc_open() i get a ESP_GATTS_CONNECT_EVT in the function gatts_profile_event_handler(), meaning my own server got a connection ???
But after that the client and server seems to both work ok, only the server has a kind of "ghost" connexion.
Any idea why is that ? may be i can just filter this self connexion and everything is just fine ?
Kind regards
François
Re: BLE server and client coexistance
Yes, you have to filter every event by gatt_if and conn_id.
Re: BLE server and client coexistance
ok thank you i will do that.
Who is online
Users browsing this forum: Bing [Bot] and 104 guests