蓝牙Human Interface Device(GATT)

SYD8801是一款低功耗高性能蓝牙低功耗SOC,集成了高性能2.4GHz射频收发机、32位ARM Cortex-M0处理器、128kB Flash存储器、以及丰富的数字接口。SYD8801片上集成了Balun无需阻抗匹配网络、高效率DCDC降压转换器,适合用于可穿戴、物联网设备等。具体可咨询:http://www.syd-tek.com/


Human Interface Device(GATT)

摘录于:https://blog.csdn.net/jeaklcucter/article/details/49513699


Name: Human Interface Device

Type: org.bluetooth.service.human_interface_device 

Assigned Number: 0x1812


Abstract:

This service exposes the HID reports and other HID data intended for HID Hosts and HID Devices.

Summary:

The HID Service exposes characteristics required for a HID Device to transfer HID report descriptors and reports to a HID Host. This also exposes the characteristics for a HID Host to write to a Device. The Human Interface Device Service is instantiated as a Primary Service.

Service Dependencies

This service has no dependencies on other GATT-based services.

GATT Requirements

Sub-Procedure Server Requirement
Read Long Characteristic Value Mandatory
Write Without Response Mandatory
Write Characteristic Value Mandatory
Notifications Mandatory
Read Characteristic Descriptors Mandatory
Write Characteristic Descriptors Mandatory

Transport Dependencies

Transport Supported
Classic false
Low Energy true
High Speed  

Error Codes

This service does not define any application error codes that are used in Attribute Protocol.

Service Characteristics

Overview Properties Descriptors
Name:
Protocol Mode
Description:
The Protocol Mode characteristic is used to expose the current protocol mode of the HID Service with which it is associated, or to set the desired protocol mode of the HID Service

Only a single instance of this characteristic shall exist as part of the HID Service.

C4: Mandatory for HID Devices supporting Boot Protocol Mode, otherwise optional.

Type:
org.bluetooth.characteristic.protocol_mode
Requirement:
C4
Property Requirement
Read Mandatory
Write Excluded
WriteWithoutResponse Mandatory
SignedWrite Excluded
Notify Excluded
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
Enumerations
Key Value
0 Boot Protocol Mode
1 Report Protocol Mode
2 - 255 Reserved for future use

Name:
Report
Description:

The Report characteristic is used to exchange data between a HID Device and a HID Host.

Note: Mandatory to support at least one Report Type (Input Report, Output Report, or Feature Report) if the Report characteristic is supported.

Type:
org.bluetooth.characteristic.report
Requirement:
Optional
Conditional Description:
For Input Reports:
Property Requirement
Read Mandatory
Write Optional
WriteWithoutResponse Excluded
SignedWrite Excluded
Notify Mandatory
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
Conditional Description:
For Output Reports:
Property Requirement
Read Mandatory
Write Mandatory
WriteWithoutResponse Mandatory
SignedWrite Excluded
Notify Excluded
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
Conditional Description:
For Feature Reports:
Property Requirement
Read Mandatory
Write Mandatory
WriteWithoutResponse Excluded
SignedWrite Excluded
Notify Excluded
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
Overview Permissions
Name:
Client Characteristic Configuration
Type:
org.bluetooth.descriptor.gatt.client_characteristic_configuration
Requirement:
if_notify_or_indicate_supported
Permission Requirement
Read Mandatory
Write Mandatory
Name:
Report Reference
Type:
org.bluetooth.descriptor.report_reference
Description:
The Report Reference characteristic descriptor is used to provide the Report ID and Report Type for the Report characteristic value.
Requirement:
if_characteristic_supported
Names Field Requirement Format Minimum Value Maximum Value Additional Information
Report ID
Mandatory uint8 0 255 None
Report Type
Mandatory uint8 1 3
Enumerations
Key Value
1 Input Report
2 Output report
3 Feature Report
4 - 255 Reserved for future use
0 Reserved for future use
Permission Requirement
Read Mandatory
Write Excluded
Name:
Report Map
Description:
The Report Map characteristic value contains formatting and other information for Input Report, Output Report and Feature Report data transferred between a HID Device and HID Host.
Type:
org.bluetooth.characteristic.report_map
Requirement:
Mandatory
Property Requirement
Read Mandatory
Write Excluded
WriteWithoutResponse Excluded
SignedWrite Excluded
Notify Excluded
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
Overview Permissions
Name:
External Report Reference
Type:
org.bluetooth.descriptor.external_report_reference
Requirement:
Optional
Permission Requirement
Read Mandatory
Write Excluded
Name:
Boot Keyboard Input Report
Description:

The Boot Report Reference characteristic is used to provide HID Hosts operating in Boot Protocol Mode with a simplified method of discovering certain HID Service characteristics. Only a single instance of this characteristic exists as part of the HID Service.

C2: Mandatory for HID Devices operating as keyboards, else excluded.

Type:
org.bluetooth.characteristic.boot_keyboard_input_report
Requirement:
C2
Property Requirement
Read Mandatory
Write Optional
WriteWithoutResponse Excluded
SignedWrite Excluded
Notify Mandatory
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
Overview Permissions
Name:
Client Characteristic Configuration
Type:
org.bluetooth.descriptor.gatt.client_characteristic_configuration
Requirement:
Mandatory
Permission Requirement
Read Mandatory
Write Mandatory
Name:
Boot Keyboard Output Report
Description:

The Boot Report Reference characteristic is used to provide HID Hosts operating in Boot Protocol Mode with a simplified method of discovering certain HID Service characteristics. Only a single instance of this characteristic exists as part of the HID Service.

C2: Mandatory for HID Devices operating as keyboards, else excluded.

Type:
org.bluetooth.characteristic.boot_keyboard_output_report
Requirement:
C2
Property Requirement
Read Mandatory
Write Mandatory
WriteWithoutResponse Mandatory
SignedWrite Excluded
Notify Excluded
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
None
Name:
Boot Mouse Input Report
Description:

The Boot Report Reference characteristic is used to provide HID Hosts operating in Boot Protocol Mode with a simplified method of discovering certain HID Service characteristics. Only a single instance of this characteristic exists as part of the HID Service.

C3:Mandatory for HID Devices operating as mice, else excluded.

Type:
org.bluetooth.characteristic.boot_mouse_input_report
Requirement:
C3
Property Requirement
Read Mandatory
Write Optional
WriteWithoutResponse Excluded
SignedWrite Excluded
Notify Mandatory
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
Overview Permissions
Name:
Client Characteristic Configuration
Type:
org.bluetooth.descriptor.gatt.client_characteristic_configuration
Requirement:
Mandatory
Permission Requirement
Read Mandatory
Write Mandatory
Name:
HID Information
Description:
The HID Information characteristic is used to hold a set of values known as the HID Device’s HID Attributes
Type:
org.bluetooth.characteristic.hid_information
Requirement:
Mandatory
Property Requirement
Read Mandatory
Write Excluded
WriteWithoutResponse Excluded
SignedWrite Excluded
Notify Excluded
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
None
Name:
HID Control Point
Description:
The HID Control Point characteristic is a control-point attribute that defines the following HID Commands when written:

• Suspend ( Refer to Section 7.4.2, Bluetooth HID Profile Specification 1.0)

• Exit Suspend (Refer to Section 7.4.2, Bluetooth HID Profile Specification 1.0)

There are no response codes defined for the Suspend and Exit Suspend commands.
Type:
org.bluetooth.characteristic.hid_control_point
Requirement:
Mandatory
Property Requirement
Read Excluded
Write Excluded
WriteWithoutResponse Mandatory
SignedWrite Excluded
Notify Excluded
Indicate Excluded
WritableAuxiliaries Excluded
Broadcast Excluded
ExtendedProperties  
None


Name: Protocol Mode

Type: org.bluetooth.characteristic.protocol_mode 

Assigned Number: 0x2A4E

Summary:

The Protocol Mode characteristic is used to expose the current protocol mode of the HID Service with which it is associated, or to set the desired protocol mode of the HID Service.

Value Fields

Names Field Requirement Format Minimum Value Maximum Value Additional Information
Protocol Mode Value
Mandatory uint8 N/A N/A
Enumerations
Key Value
0 Boot Protocol Mode
1 Report Protocol Mode
2 - 255 Reserved for future use

Name: Report

Type: org.bluetooth.characteristic.report 

Assigned Number: 0x2A4D

Abstract:

The Report characteristic is used to exchange data between a HID Device and a HID Host.

Summary:

The Report characteristic value contains Input Report, Output Report or Feature Report data to be transferred between the HID Device and HID Host.

Value Fields

Names Field Requirement Format Minimum Value Maximum Value Additional Information
Report Value
Mandatory uint8 N/A N/A This field may be repeated.

Name: Report Map

Type: org.bluetooth.characteristic.report_map 

Assigned Number: 0x2A4B

Summary:

The Report Map characteristic is used to define formatting information for Input Report, Output Report, and Feature Report data transferred between a HID Device and HID Host, information on how this data can be used, and other information regarding physical aspects of the device (i.e. that the device functions as a keyboard, for example, or has multiple functions such as a keyboard and volume controls).

Only a single instance of this characteristic exists as part of a HID Service.

Value Fields

Names Field Requirement Format Minimum Value Maximum Value Additional Information
Report Map Value
Mandatory uint8 N/A N/A This field may be repeated.

Name: Boot Keyboard Input Report

Type: org.bluetooth.characteristic.boot_keyboard_input_report 

Assigned Number: 0x2A22

Summary:

The Boot Keyboard Input Report characteristic is used to transfer fixed format and length Input Report data between a HID Host operating in Boot Protocol Mode and a HID Service corresponding to a boot keyboard.

Value Fields

Names Field Requirement Format Minimum Value Maximum Value Additional Information
Boot Keyboard Input Report Value
Mandatory uint8 N/A N/A This field may be repeated.

Name: Boot Keyboard Output Report

Type: org.bluetooth.characteristic.boot_keyboard_output_report 

Assigned Number: 0x2A32

Summary:

The Boot Keyboard Output Report characteristic is used to transfer fixed format and length Output Report data between a HID Host operating in Boot Protocol Mode and a HID Service corresponding to a boot keyboard.

Value Fields

Names Field Requirement Format Minimum Value Maximum Value Additional Information
Boot Keyboard Output Report Value
Mandatory uint8 N/A N/A This field may be repeated.

Name: Boot Mouse Input Report

Type: org.bluetooth.characteristic.boot_mouse_input_report 

Assigned Number: 0x2A33

Summary:

The Boot Mouse Input Report characteristic is used to transfer fixed format and length Input Report data between a HID Host operating in Boot Protocol Mode and a HID Service corresponding to a boot mouse.

Value Fields

Names Field Requirement Format Minimum Value Maximum Value Additional Information
Boot Mouse Input Report Value
Mandatory uint8 N/A N/A This field may be repeated.

Name: HID Information

Type: org.bluetooth.characteristic.hid_information 

Assigned Number: 0x2A4A

Abstract:

The HID Information Characteristic returns the HID attributes when read.

Summary:

The HID Information Characteristic contains the HID attributes. The value of this Characteristic is static and can be cached for the lifetime of the bond between the HID device and the HID host.

Value Fields

Names Field Requirement Format Minimum Value Maximum Value Additional Information
bcdHID
Information:
16-bit unsigned integer representing version number of base USB HID Specification implemented by HID Device
Mandatory uint16 N/A N/A None
bCountryCode
Information:
Identifies which country the hardware is localized for. Most hardware is not localized and thus this value would be zero (0).
Mandatory 8bit N/A N/A None
Flags
Mandatory 8bit N/A N/A
Bit Field
Bit Size Name
Definition
Key Value
0 1 RemoteWake
0 The device is not designed to be capable of providing wake-up signal to a HID host
1 The device is designed to be capable of providing wake-up signal to a HID host
1 1 NormallyConnectable
0 The device is not normally connectable
1 The device is normally connectable
2 6 Reserved for future use

Note:

The fields in the above table are in the order of LSO to MSO. Where LSO = Least Significant Octet and MSO = Most Significant Octet.

Name: HID Control Point

Type: org.bluetooth.characteristic.hid_control_point 

Assigned Number: 0x2A4C

Summary:

The HID Control Point characteristic is a control-point attribute that defines the following HID Commands when written:

• Suspend ( Refer to Section 7.4.2, Bluetooth HID Profile Specification 1.0

• Exit Suspend (Refer to Section 7.4.2, Bluetooth HID Profile Specification 1.0

Value Fields

Names Field Requirement Format Minimum Value Maximum Value Additional Information
HID Control Point Command
Information:
There are no response codes defined for the Suspend and Exit Suspend commands.
Mandatory uint8 N/A N/A
Enumerations
Key Value
0 Suspend
1 Exit Suspend
2 - 255 Reserved for future use



Name: HID OVER GATT

Type: org.bluetooth.profile.hid_over_gattDownload / View

Abstract:

This profile defines how a device with Bluetooth low energy wireless communications can support HID services over the Bluetooth low energy protocol stack using the Generic Attribute Profile.

Summary:

The HID over GATT profile defines the procedures and features to be used by Bluetooth low energy HID Devices using GATT and Bluetooth HID Hosts using GATT.

Role: HID Device

Service Declaration Requirement Additional Information
org.bluetooth.service.human_interface_device Primary Mandatory
     
None
org.bluetooth.service.device_information PrimarySingleInstance Mandatory None
org.bluetooth.service.scan_parameters PrimarySingleInstance Optional None

Role: Boot Host

Service Requirement
org.bluetooth.service.human_interface_device Mandatory
org.bluetooth.service.device_information Mandatory
org.bluetooth.service.scan_parameters Optional
org.bluetooth.service.battery_service Mandatory

Role: Report Host

Service Requirement
org.bluetooth.service.human_interface_device Mandatory
org.bluetooth.service.device_information Mandatory
org.bluetooth.service.scan_parameters Optional
org.bluetooth.service.battery_service Mandatory



猜你喜欢

转载自blog.csdn.net/chengdong1314/article/details/80090975
今日推荐