有以下2個問題,請您回復(fù):
?BLE的綁定,是由誰發(fā)起的?
?外圍設(shè)備解除綁定就是擦除綁定信息嗎?
Central例程有下面設(shè)置:
? // Setup the GAP Bond Manager
? {
? ? uint32 passkey = DEFAULT_PASSCODE;
? ? uint8 pairMode = DEFAULT_PAIRING_MODE;
? ? uint8 mitm = DEFAULT_MITM_MODE;
? ? uint8 ioCap = DEFAULT_IO_CAPABILITIES;
? ? uint8 bonding = DEFAULT_BONDING_MODE;
? ??
? ? GAPBondMgr_SetParameter( GAPBOND_CENT_DEFAULT_PASSCODE, sizeof( uint32 ), &passkey );
? ? GAPBondMgr_SetParameter( GAPBOND_CENT_PAIRING_MODE, sizeof( uint8 ), &pairMode );
? ? GAPBondMgr_SetParameter( GAPBOND_CENT_MITM_PROTECTION, sizeof( uint8 ), &mitm );
? ? GAPBondMgr_SetParameter( GAPBOND_CENT_IO_CAPABILITIES, sizeof( uint8 ), &ioCap );
? ? GAPBondMgr_SetParameter( GAPBOND_CENT_BONDING_ENABLED, sizeof( uint8 ), &bonding );
? }
Peripheral例程有下面設(shè)置:
? // Setup the GAP Bond Manager
? {
? ? uint32 passkey = 0; // 0-->passkey "000000",1-->"000001",
? ? uint8 pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
? ? uint8 mitm = TRUE;
? ? uint8 bonding = TRUE;
? ? uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
? ? GAPBondMgr_SetParameter( GAPBOND_PERI_DEFAULT_PASSCODE, sizeof ( uint32 ), &passkey );
? ? GAPBondMgr_SetParameter( GAPBOND_PERI_PAIRING_MODE, sizeof ( uint8 ), &pairMode );
? ? GAPBondMgr_SetParameter( GAPBOND_PERI_MITM_PROTECTION, sizeof ( uint8 ), &mitm );
? ? GAPBondMgr_SetParameter( GAPBOND_PERI_IO_CAPABILITIES, sizeof ( uint8 ), &ioCap );
? ? GAPBondMgr_SetParameter( GAPBOND_PERI_BONDING_ENABLED, sizeof ( uint8 ), &bonding );
? }