How to make BLE client connect to only specific server
How to make BLE client connect to only specific server
I've a BLE application (NimBLE stack), it works as expected. But now I want the client to connect to a specific server and don't connect to anything else. How can I do this? How can I tell the client to connect to a specific server?
Re: How to make BLE client connect to only specific server
Please can anyone help ?
Re: How to make BLE client connect to only specific server
I meant, the server and client boots up and connects for first time. The client then stores some info about the server so that it connects to this particular server only (if there are other servers in the vicinity) next time it connects and not to some other server with same services and uuid.
May be store the mac address or something
Last edited by listout on Fri Jun 10, 2022 6:57 am, edited 1 time in total.
Re: How to make BLE client connect to only specific server
The specific term is called bonding.. i thing there is the example in the esp-idf folderlistout wrote: ↑Fri Jun 10, 2022 6:45 amI meant, the server and client boots up and connects for first time. The client then stores some info about the server so that it connects to this particular server only (if there are other servers in the vicinity) next time it connects and not to some other server with save service and uuid.
May be store the mac address or something
Re: How to make BLE client connect to only specific server
Wouldn't bonding require some I/O capability. My device doesn't have any I/O. I've tried the bleprph and blecent example from master branch. After each connect when it shows the connection information in bleprph example the bonding and encryption was shown as 0. I've tried changing various things through menuconfig, nothing helped (mainly the options in example config and there was another option in nimble to store info in nvs, however I haven't found the later in v4.4.1)abansal22 wrote: ↑Fri Jun 10, 2022 6:52 amThe specific term is called bonding.. i thing there is the example in the esp-idf folderlistout wrote: ↑Fri Jun 10, 2022 6:45 amI meant, the server and client boots up and connects for first time. The client then stores some info about the server so that it connects to this particular server only (if there are other servers in the vicinity) next time it connects and not to some other server with save service and uuid.
May be store the mac address or something
Re: How to make BLE client connect to only specific server
I have done long time ago, you can use just works security, if no i/o capabilities..listout wrote: ↑Fri Jun 10, 2022 6:55 amWouldn't bonding require some I/O capability. My device doesn't have any I/O. I've tried the bleprph and blecent example from master branch. After each connect when it shows the connection information in bleprph example the bonding and encryption was shown as 0. I've tried changing various things through menuconfig, nothing helped (mainly the options in example config and there was another option in nimble to store info in nvs, however I haven't found the later in v4.4.1)abansal22 wrote: ↑Fri Jun 10, 2022 6:52 amThe specific term is called bonding.. i thing there is the example in the esp-idf folderlistout wrote: ↑Fri Jun 10, 2022 6:45 am
I meant, the server and client boots up and connects for first time. The client then stores some info about the server so that it connects to this particular server only (if there are other servers in the vicinity) next time it connects and not to some other server with save service and uuid.
May be store the mac address or something
Re: How to make BLE client connect to only specific server
Tried that the bonding flags still remains 0. Both on master and 4.4.1 tagabansal22 wrote: ↑Fri Jun 10, 2022 6:57 amI have done long time ago, you can use just works security, if no i/o capabilities..listout wrote: ↑Fri Jun 10, 2022 6:55 amWouldn't bonding require some I/O capability. My device doesn't have any I/O. I've tried the bleprph and blecent example from master branch. After each connect when it shows the connection information in bleprph example the bonding and encryption was shown as 0. I've tried changing various things through menuconfig, nothing helped (mainly the options in example config and there was another option in nimble to store info in nvs, however I haven't found the later in v4.4.1)
I was looking at this thread https://github.com/espressif/esp-nimble/issues/14, doesn't look like I can use bonding in my scenario
Re: How to make BLE client connect to only specific server
@abansal22 I was finally able to form a bond, do you know how to connect to only bonded device. I the thread I mentions said something about a PR but I couldn't find any such PR
Re: How to make BLE client connect to only specific server
Good to hear that!
I think bonding itself means to connect with the specific device. In the bonding process, they exchange the cypto keys. So next time it is available, then it is able to find and connect it.
Thanks
Who is online
Users browsing this forum: No registered users and 305 guests