蓝牙HID协议笔记.doc
8页蓝牙HID协议笔记(2013-07-31 15:05:53)转载▼标签: 分类:Bluetooth1 •概述The Human Interface Device (HID)定义了蓝牙在人机接口设备中的协议、特征和使用规程 典世的应川包括蓝牙鼠标、蓝牙键盘、蓝牙游戏手柄等该协议改编自USB HID Protocol2. -些概念(1 )HID Reports:B!uetooth HID devices 支持三种 Report: Input, Output, and Feature0(2) HID 建立 Control Channel 和 Interrupt Channel 两个通道,report 可以在这两条 channel 上 传输,在 Control channel 上传输的 report 称为 synchronous reports ;在 Interrupt channel .1;传 输的 report 称为 asynchronous reports □(3) Feature reports are always transferred synchronously using GET_REPORT or SET_REPORT requests o(4) Report Protocol Mode 和 Boot Protocol Mode□ Bluetooth HID Hosts 至少支持一种,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的格式如下:7 6 5 4 3 2 1 0HIDP Message TypeParameterFigure 3.1: Bluetooth HID Protocol Message Header Octet (HIDP-Hdr)The following table lists the supported HIDP Message types:HexMessage TypeSent ByMessage Length (Octets)0HANDSHAKEDevice11HID CONTROLDevice and Host12-3ReservedA4GET REPORTHost1 to 45SET REPORTHost1 + Report data paytoad6GET PROTOCOLHost17SET PROTOCOLHost1 1ADevice and Host1 + Report data payloadHexMessage TypeSent ByMessage Length (Octets)C-FReservedN/ATable 3J; Bluetooth HID Protocol Message Type Codes(I) HANDSHAKE该 Message 用来 acknow!edgeSET_REPORT, SET_IDLE and SET_PROTOCOL 等「equest。
K在 Control Channel 上传输,只由 Bluetooth IIID device0Parameter部分定义如下:FieldSize (Octets)DescriptionHIDP- Hdr1Brts specifying characteristics of request7.. 4 HIDP Message Type0 a HANDSHAKE3.. 0 Resutt Ccxie0x0 = SUCCESSFUL This code is used to acknowledge requests. A device that has correctly received SET_REPORT. SETJDLE or SET_PROTOCOL payload transmrts an acknowledgment to the host0x1 = NOT^READY. This code indicates that a device is too txjsy to accept data The Bluetooth HID Host should retransmit the data the next time It communicates with the device,0x2 = ERRJNVALID^REPORTJD Invalid report ID transmitted0x3 = ERR^UNSUPPORTED^REQUEST. The device does not support the request This result code shall be used if the HIDP message type is unsupported 0x4 = ERR^INVALID^PARAMETER A parameter value is out of range or inappropriate for the request 0x5-0xD = ReservedOxE - ERR^UNKNOWN Device could not identify the error condition OxF = ERR^FATAL Restart is essential to resume functionalityTable 3.2 HANDSHAKE Parameter Definition(2) HID_CONTROL控制 Bluetooth HID device 改变状态。
Parameter部分定义如下:FieldSize (Octets)DescriptionHIDP- Hdr1Bits specifying characteristics of request.7.・4 HIDP Message Type1 = HID_CONTROL3..0 Control Operation0 = NOP: [DEPRECATED]: No Operation.1 = HARD_RESET [DEPRECATED]: Device performs Power On System Test (POST) then initializes all internal variables and initiates normal operations.2 = SOFT_RESET [DEPRECATED]: Device initializes all internal vanables and initiates normal operations.3 = SUSPEND: Go to reduced power mode.4 = EXIT_SUSPEND: Exit reduced power mode.5 = virtDal_cable_unplug6-15 = Reserved「able 33 HID CONTROL Parameter Definition(3) GET_REPORTBluetooth HID Host 用来请求 Bluetooth HID device 的传输。
定义如下:FieldSize (Octets)DescriptionHIDP-Hdf1Bits specifying characteristics of request.7.. 4 HIDP Message Type4 > GET-REPORT3 Size0 ・ The host has allocated a buffer equal to the size of the report1 ・ A 2-octtt BufferSize field foilowl the Report ID. Thkt field indicates the size of the buffer allocated by the host. A device limits the returned payload size to BufferSize. Nott that the BufferSize is Increased by 1-octet for Boot Protocol Mode reports to include the Report ID imposed by the Bluetooth HID. See §3.3.2 more information on Boot Protocol Mode.2 Reserved (0)1.. 0 Report Type0 ・ Reserved1 - Input2 ■ Output3 = FeatureRtportID1(If Required) Report ID of requested report. This Mid i$ required in Report Protocol Mode wtwn any Report ID Global Items are declared in the report descriptor, and in Boot Protocol Mode. Other wise the field does not exist.BufferSize2(If Required) Maximum number of octets to transfer during data phase This field does not exist tf the Size field of the Header « 0. BufferSize is little-endian. ! •. the LSB ts transmitted firstTobS 34 GET REPORT DoflMton(4) SET_REP0RTBluetooth HID Host 用来向 Bluetooth HID device 发起传输。
格式如卜:FieldSize (Octets)DescriptionHIDP-Hdr1Bits specifying characteristics of request.7.. 4 HIDP Message Type5 = SET_REPORT3. 2 Reserved (0)1.. 0 Report Type0 = Reserved1 = Input2 = Output3 = FeatureReport Data PayloadNReport data for the device.Table 3. 5: SET REPORT Header Definitiorl(5) GET_PR0T0C0L用来获取 Bluetooth HID device 的 Protocol Mode,然丿E Blu。

卡西欧5800p使用说明书资料.ppt
锂金属电池界面稳定化-全面剖析.docx
SG3525斩控式单相交流调压电路设计要点.doc
话剧《枕头人》剧本.docx
重视家风建设全面从严治党治家应成为领导干部必修课PPT模板.pptx
黄渤海区拖网渔具综合调查分析.docx
2024年一级造价工程师考试《建设工程技术与计量(交通运输工程)-公路篇》真题及答案.docx
【课件】Unit+3+Reading+and+Thinking公开课课件人教版(2019)必修第一册.pptx
嵌入式软件开发流程566841551.doc
生命密码PPT课件.ppt
爱与责任-师德之魂.ppt
制冷空调装置自动控制技术讲义.ppt


