TI中文支持网
TI专业的中文技术问题搜集分享网站

如何进行加密写

我用hearRate的demo改,command 的value属性为GATT_PERMIT_AUTHEN_WRITE,可是lightblue总是一直在写,我把断点设在外设这端写回调一直没反应?请问加密写要注意什么呢???

sky fang:

补充一下,我用的是cc2540

Jerry:

回复 sky fang:

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 byin 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 );

  } 

….

赞(0)
未经允许不得转载:TI中文支持网 » 如何进行加密写
分享到: 更多 (0)