1.概述

   在进行蓝牙设备的连接时,为了保护个人隐私和数据保密的需要,需要进行验证。
 
2.一些Frame
Frame74:本地发送Authentication requset command
00010001 00000100 00000010 00001001 00000000
Opcode: 0x0411
Connection Handle: 0x09 = 9
 
Frame75:Command Status event
00001111 00000100 00000000 00000010 00010001 00000100
Status: Success
 
Frame76:Link Key request event
该Event参数为BR_ADDR
00010111 00000110 10000000 10011001 00100011 01001100 11100000 00000000
Bluetooth Device Address: 0x00-e0-4c-23-99-80
注:该Event应该是对Authentication requset command的后续回应,向本地的Host要Link key。
 
Frame77:Link Key Negative request command
00001100 00000100 00000110 10000000 10011001 00100011 01001100 11100000 00000000
Bluetooth Device Address: 0x00-e0-4c-23-99-80
注:回应远端slave的Link Key request event,表示本地没有存储的Link Key。
 
Frame78:Link Key Negative request command---command complete event
 
Frame79: IO Capability request event
00110001 00000110 10000000 10011001 00100011 01001100 11100000 00000000
BD_ADDR: 0x00e04c239980
注:该event表示远端的slave要求本地Host的IO_Capability,这个参数将在pair的过程中用到。
 
Frame80:IO Capability Request Reply command
这个command的参数如下:

BD_ADDR,
IO_Capability,
OOB_Data_Present,
Authentication_Requirements
00101011 00000100 00001001 10000000 10011001 00100011 01001100 11100000 00000000 0000000100000000 00000101
Bluetooth Device Address: 0x00-e0-4c-23-99-80
IO Capability: 0x01 DisplayYesNo
OOB Data Present: 0x00 OOB authentication data not present
Authentication_Requirements:0x05 MITM Protection Required – General Bonding. Use IO capabilities to determine authentication procedure.
注:这是本地的Host回应远端的IO Capability request event的,表明本地Host具有的IO Capability。
 
Frame81:IO Capability Request Reply command--command complete
 
Frame82:IO Capability response event
该Event参数如下:

BD_ADDR,
IO_Capability,
OOB_Data_Present,
Authentication_Requirements
00110010 00001001  0000000000000000
BD_ADDR: 0x00e04c239980
IO Capability: DisplayYesNo
OOB Data Present: OOB authentication data not present
Authentication_Requirements:0x05 MITM Protection Required – General Bonding. Use IO capabilities to determine authentication procedure.
注:这个event由远端的Slave产生,用来回复IO Capability Request Reply command,参数也都基本一样,作用就是表明你的IO capability我已经收到了,是不是感觉有点多此一举呢??
 
Frame83:User Confirmation Request event
参数如下:

BD_ADDR,
Numeric_Value
00110011 00001010 10000000 10011001 00100011 01001100 11100000 00000000 10110000 10111101 00001000 00000000
BD_ADDR: 0x00e04c239980
Numeric Value: 0x0008bdb0
注:远端的slave要求一个Numeric value,本地的Host可以用User_Confirmation_Request_Reply 或者the
User_Confirmation_Request_Negative_Reply command来进行回应。
 
Frame84:User Confirmation Request Reply command
00101100 00000100 00000110 10000000 10011001 00100011 01001100 11100000 00000000
Bluetooth Device Address: 0x00-e0-4c-23-99-80
注:响应User Confirmation Request event,表示这个Numeric value实在正确的。
 
Frame85:User Confirmation Request Reply command---command complete
 
Frame86: Simple Pairing Complete event
00110110 00000111 00000000 10000000 10011001 00100011 01001100 11100000 00000000
BD_ADDR: 0xe04c23998000
status:0x00 success
注:表示配对成功
 
Frame87:Link Key Notification Event
该Event参数如下:
BD_ADDR, 
Link_Key, 
Key_Type
0011000 00010111 10000000 10011001 00100011 01001100 11100000 00000000 00010110 01010001 10001111 00011101 00100101 00110001 01101001 00001000 00000011 10110101 11101101 00011110 11110111 00000010 01001111 10101110 00000101
Bluetooth Device Address: 0x00-e0-4c-23-99-80
Link Key: 0xae 4f 02 f7 1e ed b5 03 08 69 31 25 1d 8f 51 16
Link Key Types: 0x05 Authenticated Combination Key
注:通知Host新的Link Key已经产生用来建立连接。
 
Frame89:Authentication complete event
00000110 00000011 00000000 00001001 00000000
Status: Success
Connection Handle: 9
注:表示验证的过程完成。
 
3.总结 
   主要总结了设备在Authentication过程中交换的HCI数据包和一些重要的参数,在进行完Authentication过程后将进行Encryption的一些操作,将在下一篇介绍。

最新文章

  1. android SystemServer.java启动的服务。
  2. 免费馅饼——G
  3. Ecilpse快捷键
  4. 移动到web整理
  5. mysql 索引及其原理
  6. win7,ubuntu双系统——重装win7后如何恢复ubuntu引导
  7. Oracle ODP.NET 篇
  8. spring学习笔记(转)
  9. linux下mysql的root密码忘记解决方
  10. requirejs实验001.对我来说,用AMD的方式来组织代码并不轻松.
  11. vi常用命令与设置(不断修改中)
  12. LigerUI+MVC的应用1
  13. iOS 性能优化总结
  14. 2019-01-13 [日常]mov文件转换为gif
  15. 64位win8.1系统 运行 32位程序,文件夹路径是中文遇到问题
  16. 进程池原理及效率测试Pool
  17. HDU 3183 - A Magic Lamp - [RMQ][ST算法]
  18. pthreads v3下的worker和pool的使用
  19. (数学)Knight's Trip -- hdu -- 3766
  20. 查看LINQ Expression編譯後的SQL語法(转)

热门文章

  1. HyperLink控件
  2. maven 编译报错 “找不到符号”
  3. HDU4044 GeoDefense(有点不一样的树上背包)
  4. C#中DataTable使用技巧
  5. git 用Gitk /usr/bin/which: no wish
  6. erlang-jiffy 安装手记
  7. FlyCapture2 VS2010 Configuration
  8. mysql5.6安装
  9. [转] - QBuffer类参考
  10. lucene 3.0.2 search 各种各样的Query类型