微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > BLE periheral 初始化有个 passkey 参数是

BLE periheral 初始化有个 passkey 参数是

时间:10-02 整理:3721RD 点击:

 

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 是哪里用到呢? 在配对要求输入密码的请求 是另外一个函数随机成成的密码  和这个密码好像没有关联 ?

thinkcore wu,看下这个

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

上一篇:NV FLASH
下一篇:simpleBLEcentral的連接問題

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top