Issue on Delete bonding key (Stack v2.1.0)

classic Classic list List threaded Threaded
1 message Options
ssinprem ssinprem
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Issue on Delete bonding key (Stack v2.1.0)

I use function gecko_cmd_sm_delete_bonding(...);

for specific remove bonding key on Bluetooth device


this function use in 2 scenario.

1. Write remove bonding command to characteristic

                case QR_REMOVE_BONDING:
                        if(data[1]==0){
                                gecko_cmd_sm_delete_bonding(data[2]);
                        }

2. When bonding error with 0x0305 reason code

        case gecko_evt_sm_bonding_failed_id:
              switch(evt->data.evt_sm_bonding_failed.reason){
                    case 0x0305:  //repairing with the same button (not remove key on Mobile)
                bondId = conGetBondingId();
                if(bondId!=0xFF){
             gecko_cmd_sm_delete_bonding(bondId);
                }


In 1. scenario,it great work correctly.

In 2., when i remove bonding key with id 1,the bonding id 0 will be removed.
remove 1, 1 and 0 will be removed
remove 2, 2 and 0 will be removed
remove 0, only 0 will be removed

Please suggestion for me.
Loading...