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

BLE periheral 初始化有个 passkey 参数是

 

uint32 passkey = 132 ; // passkey "000000"
uint8 pairMode =GAPBOND_PAIRING_MODE_NO_PAIRING ;//GAPBOND_PAIRING_MODE_WAIT_FOR_REQ ;
uint8 mitm = TRUE;
// 定义你设备的能力 是否具备显示 输入 能力
uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY ;
uint8 bonding = TRUE; GAPBondMgr_SetParameter( GAPBOND_DEFAULT_PASSCODE, sizeof ( uint32 ), &passkey );
 

请问这个passkey 是哪里用到呢? 在配对要求输入密码的请求 是另外一个函数随机成成的密码  和这个密码好像没有关联 ?

admin admin1:

thinkcore wu,看下这个

GAP also handles the initiation of security features during a BLE connection. Certain data may bereadable or writeable only in an authenticated connection. Once a connection is formed, twodevices can go through a process called pairing. When pairing is performed, keys are establishedwhich encrypt and authenticate the link. In a typical case, the peripheral device will require thatthe central device provide a passkey in order to complete the pairing process. This could be afixed value, such as “000000”, or could be a randomly generated value that gets provided to theuser (such as on a display). After the central device sends the correct passkey, the two devicesexchange security keys to encrypt and authenticate the link.

赞(0)
未经允许不得转载:TI中文支持网 » BLE periheral 初始化有个 passkey 参数是
分享到: 更多 (0)