what is the exact behavior of this function? No matter what i set, there are bondings at every time possible, so this function is useless?
What can I do instead to prevent further bondings?
What SDK version are you using?
Bluetooth SDK 2.1.1
Same question here... I tried to play with gecko_cmd_sm_set_bondable_mode(0) but that does not prevent bonding on Gecko SDK 1.1.1 & Bluetooth SDK 126.96.36.199.
As a workaround I did this:
case gecko_evt_sm_confirm_bonding_id :
This way when evt_sm_confirm_bonding is triggered the request is rejected.
Working so far.
The device is bondable if it is in bondable mode or bonding is required or already bonded.
Your solution to force disable bonding looks fine.