如何进行加密写
我用hearRate的demo改,command 的value属性为GATT_PERMIT_AUTHEN_WRITE,可是lightblue总是一直在写,我把断点设在外设这端写回调一直没反应?请问加密写要注意什么呢?
补充一下,我用的是cc2540
Not sure I understand your questions correctly.
For TI BLE stack 1.3.2 release, with Heart rate firmware and Mini Keyfob.
It will wait for pairing request from Central device after connections.
It can be tested with TI BTools with CC2540 dongle. (go to the “pairing/bonding’ Tab in Btools
Alternatively, you can change the Heart rate firmware to force pairing by
in function: HeartRate_Init();
…..
// Setup the GAP Bond Manager
{
uint32 passkey = 0; // passkey "000000"
uint8 pairMode = GAPBOND_PAIRING_MODE_INITIATE;
uint8 mitm = FALSE;
uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8 bonding = TRUE;
GAPBondMgr_SetParameter( GAPBOND_DEFAULT_PASSCODE, sizeof ( uint32 ), &passkey );
GAPBondMgr_SetParameter( GAPBOND_PAIRING_MODE, sizeof ( uint8 ), &pairMode );
GAPBondMgr_SetParameter( GAPBOND_MITM_PROTECTION, sizeof ( uint8 ), &mitm );
GAPBondMgr_SetParameter( GAPBOND_IO_CAPABILITIES, sizeof ( uint8 ), &ioCap );
GAPBondMgr_SetParameter( GAPBOND_BONDING_ENABLED, sizeof ( uint8 ), &bonding );
}
….