蓝牙HID协议笔记

上传人:m**** 文档编号:564994245 上传时间:2023-01-01 格式:DOCX 页数:6 大小:67.69KB
返回 下载 相关 举报
蓝牙HID协议笔记_第1页
第1页 / 共6页
蓝牙HID协议笔记_第2页
第2页 / 共6页
蓝牙HID协议笔记_第3页
第3页 / 共6页
蓝牙HID协议笔记_第4页
第4页 / 共6页
蓝牙HID协议笔记_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《蓝牙HID协议笔记》由会员分享,可在线阅读,更多相关《蓝牙HID协议笔记(6页珍藏版)》请在金锄头文库上搜索。

1、蓝牙 HID 协议笔记(2013-07-31 15:05:53)转载进标签:分类:Blue tooth1. 概述The Human Interface Device (HID)定义了蓝牙在人机接口设备中的协议、特征和使用规程。 典型的应用包括蓝牙鼠标、蓝牙键盘、蓝牙游戏手柄等。该协议改编自USB HID Protocol。2. 一些概念(1) HID Reports:Bluetooth HID devices 支持三种 Report: Input, Output, and Feature。(2) HID 建立 Control Channel 和 Interrupt Channel 两个通道,r

2、eport 可以在这两条 channel 上 传输,在 Control channel 上传输的 report 称为 synchronous reports ;在 Interrupt channel 上传 输的 report 称为 asynchronous reports。(3) Feature reports are always transferred synchronously using GET_REPORT or SET_REPORT requests。(4) Report Protocol Mode 和 Boot Protocol Mode。 Bluetooth HID Hosts

3、 至少支持一种, Bluetooth HID Device 则需要支持 Report Protocol Mode,并且 Report Protocol Mode 是 Bluetooth HID Device 的默认 Mode。3. Bluetooth HID Protocol Messages这些message不能超过L2CAP的MTU,大小超过MTU的message将被忽略。Message Header 的格式如下:76543210HIDP Message TypeParameterFigure 3.1: Bluetooth HID Protocol Message Header Octet

4、 (HIDP-Hdr)HexMessage TypeSent ByMessage Length (Octets)C-FReservedW/ATable 3.1: Bluetooth HID Protocol Message Type CodesThe foHoxnng 佃廿怎 lite the supported HI DP Message types:M&ssags Type5nt ByMsa-age Length (Octets)0HAHD&HAKEDevicenr1HID CONTROL口戟比色 tirrd Hosl2-3ReservedN/A4| GET REPORTHo&t1 tD4

5、5SET REPORTHosti + Rfiport data payload6GET PROTOCOLHO轧17SE I PROTOCOLHast1DEPRECATEDADATADevice and Hosl1 + Report data payloadSEPRECATEDOv,:e ai:d Has*十 口:皿 ii;.H.ui 炉 w:;t :j射日 pa-,;:?:d(1) HANDSHAKE该 Message 用来 acknowledgeSET_REPORT, SET_IDLE and SET_PROTOCOL等 request。只 在 Control Channel 上传输,只由

6、Bluetooth HID device。Parameter 部分定义如下:FildSiz-s (Octets |iDescription-HIDP-Hdr1Bits specifying characteiistics of nequesr.7.4 HIDP Message TypeQ = HANDSHAKEJ.0 ResuH Code0x0 二 SUCCESSFUL. This code is used to acknowledge f&quesls. A device thal has oorneedy received SET_REPORTr 5ET_IOLE ar SET_PROTO

7、COL payload transmits an acknowlfidgmefit tc the host.6x1 = NOREADY This cads iriditaies tlwt a d&wice is loo busy 10 accept data The Bfueloatti HID Has1 should retransmit the delta (he next time it conmunicates wilh t怜e d卓= ERRNWALI口REPORT口. in曲lid report IU transmtlled0x3 = ERRNSUPPORTEDREQUEST. T

8、he devicenot suppoit IMnequesl This result crde shall be used 頁 lhe H1DP message lype is urrtu 卩口口冃弓日,- ERR_I NVALfD. PARAK-T ER. A parameter valu is ouf of range or in逛iprapri届 for the 固“卓引Dx5-DD = Re$ein/&cfDxE = erf?_unknowm 口evice could ntrf identify the 白冲r 妙1創泊九 DrF = ERR FATAL Restart Is斡轻rit

9、il to O$UFM fuiKtiOnNty.JaJjie 3.2: HANDSHAKE Parameter Definition(2) HID_CONTROL控制 Bluetooth HID device 改变状态Parameter 部分定义如下:FiefdSize (Octets)DescriptionHIDP-Hdr1Bits specifying characteristics of request.7.4HIDP Message Type1 = HID_CONTROL3 Controf Operation0 = NOP: DEPRECATED: No Operation.1 二 H

10、A尺D_RESET DEPRECATED: Device performs Power On System Test POST) then initializes all internal variables and iniiiates norm创 operations.2 = SOFT_RESET DEPRECATED: Device iriitialrzes all internal variabies and inftiates normal operations.3 = SUSPEND: Go to reduced power mode.4 = EXIT_SUSPEND: Exit r

11、educed power mode.5 = VIRTU AL_CA BL E_U N P LUG6-15 = Reservedra/j/e 3 3: HID CONTROL Parameter Definition(3) GET_REPORTBluetooth HID Host 用来请求 Bluetooth HID device 的传输。 定义如下:FisiaSize OEtetsjDescriptionHIDP-Hdr1Bi!s specifying 匚h-arscterislics of requ-est.7. 4HIDP Message T/p4 GET_REPORT3日刼o * Th*

12、 hMt hasa burrarto ih* tiat of ihte wport1 口 A 2-odt BuTff5i2 nld rcMios 加 Rsport ID. Ttii* Tiskl indicate th取 $iz对 thft bufl&r allocated by the hast. A device limits tne relumeo4 Fnolocol Mad&. 0thrv/is* ffia field does nai &xlsl. ErfferSize2i If Required) t.!aimLim number of oclets- ta EraR&fer du

13、ring data phase This fieldnot &xist if 1ha Size liid orth& H&ader = 0. BufferGize i& littlandian.I. the LSB ts tra nsnftitlsd IMTdb倍 3.4: GET REPORT HMO#r Dnnin(4) SET_REPORTBluetooth HID Host 用来向 Bluetooth HID device 发起传输。格式如下:| FieldSize (Octets)DescriptionHfDP-Hdr1Bits specifying characteristics of request.7.4HIDP Message Type5 = SET_REPORT3. 2 Reserved (Q)1.0 Report Type0 =尺 eserved1 = Input2 - Output3 - FeatureReport Data Pay loadNReport data for the device.Table 3.5: SET_REPORT Header Definition(5) GET_PROTOCOL用来获取 Bluetoot

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 学术论文 > 其它学术论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号