æ¥ç¶ã¨ãã¼ã¿äº¤æ
- GAP: æ¥ç¶ã«éç¹
- GATT: ãã¼ã¿äº¤æã«éç¹
- GATT based profiles: ãã¼ã¿ã®ãã©ã¼ããã(ï¼)
ããã¤ã¹ã®çºè¦ãæ¥ç¶ç¢ºç«ãã»ãã¥ãªãã£ãèªè¨¼ãassociation model, ãµã¼ãã¹ã®çºè¦
It also describes the behaviors and methods **for device discovery, connection establishment, security, authentication, association models and service discovery.
v4.2 vol1 partA, p98
HIDã¨HOGP
HID OVER GATT PROFILE SPECIFICATION
æ¡ææ¸ã¿ Bluetooth ã®ãããã¡ã¤ã«ããµã¼ãã¹ããããã³ã«ããã©ã³ã¹ãã¼ã
…
HOGP
HID over GATT Profile
ââ> 1.0
æå¹
2011å¹´12æ27æ¥
link(çè 訳) ãã®ãããã¡ã¤ã«ã¯USB HID specificationã«é©åãã¦ãã¾ãããã®ç®çã¯ãBLEã¯ã¤ã¤ã¬ã¹ãªã³ã¯ä¸ã§USB HID ä»æ§ãéç¨ãããã¨ã§ãã This profile is an adaptation of the USB HID specification [2] to operate over a Bluetooth low energy wireless link.
USB HID specification
USB HID: USBã§HIDã使ãããã®ãããã³ã«.
USBããã¤ã¹ã¯ããã¤ãã®device classã«åãããã. ãã®ãã¡ã®ï¼ã¤ã(USB) HID class.
These devices are broken into various device classes.
This document describes the Human Interface Device (HID) class for use with Universal Serial Bus (USB).
Viewer | Bluetooth Technology Website
HIDãã®ãã®ã®ä»çµã¿
(ãªãããã®æç®ãUSB HIDä»æ§æ¸ã¨ããã¦ãªããï¼)
HID (Human Interface Device) ã¯ã©ã¹ã§ã¯ãã¬ãã¼ãã¨å¼ã°ããåä½ã§ãã¼ã¿ã転éãã¾ããä¾ãã°ãã¦ã¹ã®å ´åãåãã¿ã³ãæ¼ããã¦ãããã©ãããæ°´å¹³æ¹åã®ç§»åéãåç´æ¹åã®ç§»åéããã¤ã¼ã«ã®ç§»åéã¨ãã£ãæ å ±ãã¾ã¨ããã¬ãã¼ããå®æçã«è»¢éãã¾ãã
ã¬ãã¼ãã®ä¸ã«ã©ã®ãããªæ å ±ãã©ã®ããã«ä¸¦ãã§ãããã¯ãã¬ãã¼ããã£ã¹ã¯ãªãã¿ã«ãã£ã¦å®ç¾©ããã¾ãã
HID (Human Interface Device) クラスについて | インターフェイス株式会社
ãã¼ã¿ã®æ§é æ
å ±ã¨dataãã®ãã®ãã¾ã¨ãã¦éããã.
Report - item(s) - “size”+“type”+“tag”+“data”
itemã®æ§é ã¯
* short items: 1byte"size" + 1byte"type" + 1byte"tag" + 0/½/4byte"data"
* long items: 1byte"size" + 1byte"type" + 1byte"tag" + 1byte"datasize" + 1byte"longitemtag" + Xbyte"data"
éããããã¼ã¿ã¯ãHostã®parserã«ãã£ã¦æ§é åãã¼ã¿ã«ãªã.
Report descriptors are composed of pieces of information. Each piece of information is called an Item.
All items have a one-byte prefix that contains the item tag, item type, and item size. http://www.usb.org/developers/hidpage/HID1_11.pdf
item typesã¯3種é¡
* Main
* Global
* Local
There are three item types: Main, Global, and Local.
There are five Main item tags currently defined:
Main typeã¯5種é¡ã®tagãæã¡ãã * Input * Output * Feature * Collection: A meaningful grouping of Input, Output, and Feature itemsâfor example, mouse, keyboard, joystick, and pointer. * End Collection
HOGPã§å®ç¾©ãããrole
HOGPãå©ç¨ããããã¤ã¹ã¯ã以ä¸ã®å½¹å²ãæ ã.
- HID Device: GATT server
- HID Host: GATT client
- Boot Host: HID parserãä¸è¦ãã¤ã¾ãReport Mapãè¦ããªã(äºåã«æ±ºããããå½¢å¼)
- Report Host: HID parserãå®è£ .
This profile defines three roles: HID Device, Boot Host, and Report Host.
ï· The HID Device shall be a GATT server.
ï· The Boot Host shall be a GATT client.
ï· The Report Host shall be a GATT client.
Use of the term HID Host refers to both host roles: Boot Host, and Report Host. A Report Host is required to support a HID Parser and be able to handle arbitrary formats for data transfers (known as Reports) whereas a Boot Host is not required to support a HID Parser as all data transfers (Reports) for Boot Protocol Mode are of predefined length and format.
https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141&_ga=1.20487995.2039220976.1491127446#page10
HID Deviceã¸ã®è¦æ±
ã»ã¼ãUSB HID ã«å¾ãã¨ã®ãã¨(ã¤ã¾ããUSB HIDè¦æ ¼ãç解ããã¨)
HID Hostã¸ã®è¦æ±
ãªãããã£ã¡ããã.
USB HIDã¨HOGPéã«ãããã©ã¼ãããã®å·®
USB HIDã¯Reportã«å
¨æ
å ±ãå
¥ã£ã¦ã.
HOGPã¯Serviceã«å
¨æ
å ±ãå
¥ã£ã¦ã. Reportã«ã¯dataã®ã¿ãå
¥ããReport Mapã«æ§é æ
å ±ãå¥ã§å
¥ã£ã¦ã.
By looking at a Report descriptor alone, an application knows how to handle incoming data, as well as what the data could be used for.
http://www.usb.org/developers/hidpage/HID1_11.pdfAll of the structure formats described in HID are used in HID-over-GATT.
The nomenclature is not ideal, though:
- Report Map: what the USB HID calls Report Descriptor.
- Report Reference Characteristic Descriptor is the BLE way of setting a report characteristic’s metadata. It contains the type (Input/Output/Feature) and ID of a report.
USB HIDã¨HOGPã®ãã¼ã¿æ§é
ãã¶ããã
USB HID
- Report (Descriptor)
- item
- size
- type
- tag
- data
- item
HOGP
- HID Service
- Report Characteristic
- data Value
(ã©ã£ãã®discriptor) type, ID of a report
- Report Characteristic
The HID Service defines the following characteristics:
- Protocol Mode: the default is Report mode, but you can change that to Boot mode.
- Report Map: the HID Report descriptor, defining the possible format for Input/Output/Feature reports.
- Report: a characteristic used as a vehicle for HID reports. Unlike USB, where the ID is sent as a prefix when there is more than one report per type, the ID is stored in a characteristic descriptor. This means that there will be one characteristic per report described in the Report Map.
- Boot Keyboard Input Report: when the device is a keyboard, it must define boot reports.
- Boot Keyboard Output Report.
- Boot Mouse Input Report.
- HID Information: HID version, localization and some capability flags.
- HID Control Point: inform the device that the host is entering or leaving suspend state.
Reportã«æä½æ
å ±
Report Mapã«Reportã®æ§é æ
å ±
Boot …ã¯BIOSã§ã使ããç¨ã®ãã®
Boot…ã«ã¤ãã¦
ãããããã¼ãã¼ãããã³ãã¦ã¹ã¯BIOSããµãã¼ãããããã¤ã¹(ãã¼ãããã¤ã¹)ã¨ãã¦ãã·ã³ãã«ãªå®è£ ãæ±ãããããããã§ããã¼ãããã¤ã¹ã¨ãã¦ç¨ããããUSB HID ã¯ã©ã¹ããã¤ã¹(ãã¼ãã¼ããããã¯ãã¦ã¹)ã¯ããã¼ããããã³ã«ã«å¯¾å¿ãããã¨ã示ãããã«ãµãã¯ã©ã¹ã使ç¨ãã
USB HID クラス ‐ 通信用語の基礎知識
Reportã®value
Report Mapã®value
HOGPã®Report Mapã¯USB HID specificationã§å®ç¾©ãããReport Descriptorãè¿ã.
ã¤ã¾ããUSB HID Report Discriptorã®å¤ããã®ã¾ã¾å
¥ããã°è¯ã.
4.7 ReportMapBehavior
The Report Map characteristic shall return the HID Report Descriptor when read. The HID Report Descriptor is defined in the USB HID specification [2].
https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141&_ga=1.20487995.2039220976.1491127446#page21