Hello everyone,
I'm using the Bluetooth peripheral sample and I'm in a scenario where I want to connect to my board from only one device at a time, meaning I don't want multiple simultaneous connections. However, I also have pairing activated. So, I set my parameters in the .conf file like this:
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1
I'm not interested in bonding devices to the flash, so I commented out the following parameters:
# CONFIG_SETTINGS=y
# CONFIG_BT_SETTINGS=y
# CONFIG_FLASH=y
# CONFIG_FLASH_PAGE_LAYOUT=y
# CONFIG_FLASH_MAP=y
# CONFIG_NVS=y
The issue is, when my board is ON and I try to connect to it from my phone, I can connect and pair. But when I switch to another phone, I can connect but not pair. So, I changed the settings to:
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=128
Now, I have no simultaneous connections, but I can pair with any device (assuming I don't exceed the maximum).
Can someone confirm if this is a good solution? I think it's just a workaround, and I might be missing something.
Thank you for your help!
Iheb