Closed CharlesXSong closed 1 month ago
How many devices are connecting to this? The default max bond count is 3, seems you need to increase this.
How many devices are connecting to this? The default max bond count is 3, seems you need to increase this.
Sorry, I didn't make it clear. The max bond count I set is 1:
#define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 1
The situation is this device(ESP32) only connects to ONE phone at a time, and several phones will connect to it frequently for testing.
How many devices are connecting to this? The default max bond count is 3, seems you need to increase this.
Sorry, I didn't make it clear. The max bond count I set is 1:
#define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 1
The situation is this device(ESP32) only connects to ONE phone at a time, and several phones will connect to it frequently for testing.
Oh NO! I completely confused connection and bond count o(╥﹏╥)o... @h2zero Sorry for wasting ur valuable time.
I rechecked the nimconfig.h
, found that CONFIG_BT_NIMBLE_MAX_BONDS is commented, means the default value 3 is defined :
/** @brief Un-comment to change the number of devices allowed to store/bond with */
// #define CONFIG_BT_NIMBLE_MAX_BONDS 3
#ifndef CONFIG_BT_NIMBLE_MAX_BONDS
#define CONFIG_BT_NIMBLE_MAX_BONDS 3
#endif
Consider the limited RAM, is there any way to not allow device to limit the bond number? (If this can solve the pair issue)
I will add a callback in the future to ask the application code what to do when the bond limit is reached. In this case the MAX_BONDS should be increased to accommodate however many bonds are required.
I think this is resolved in the latest commits in release 1.4 and master.
Calling NimBLEDevice::setSecurityInitKey(3);
in older commits should also work;
Please re-open if you still have this issue.
I' m using NimBLE in ESP32(server), the SecurityAuth is:
ISSUE:
After several mobile phones(client) connected to the same ESP32, the connection fails on the IOS with the following error message:
Peer removed pairing information
And need to pair everytime on Android.
How to do with that?