Auto-connect in NimBLE
Posted: Tue Jul 08, 2025 6:03 am
I'm currently working on esp32c3 as ble central. I'm trying to connect to a phone with my app advertising. Since iOS doesn't always let the app advertise in the background, I was wondering if there was any other way for me to initiate a connection to auto-connect in case there is a disconnection.
I have tried initiating the connection using the bonded peer address stored in the flash. This has been working for my use case but I'm not sure about the underlying implementation.
I need a few clarifications about initiating a connection from a pre-stored address:
1. In which channel does esp initiate a connection?
2. Does esp perform a directed scan of some sort?
3. Does it cycle through all three (37,38,39) channels?
4. Is this approach recommended?
I've tried to capture these packets on a sniffer but with no luck. Any insights would be much appreciated.
PS: I'm new to this, if there is any documentation on this topic that I've missed please lmk.
Thank you :)
I have tried initiating the connection using the bonded peer address stored in the flash. This has been working for my use case but I'm not sure about the underlying implementation.
I need a few clarifications about initiating a connection from a pre-stored address:
1. In which channel does esp initiate a connection?
2. Does esp perform a directed scan of some sort?
3. Does it cycle through all three (37,38,39) channels?
4. Is this approach recommended?
I've tried to capture these packets on a sniffer but with no luck. Any insights would be much appreciated.
PS: I'm new to this, if there is any documentation on this topic that I've missed please lmk.
Thank you :)