1# @ohos.bluetooth.constant (Bluetooth constant Module)
2
3The **constant** module provides definitions of the constants used in Bluetooth.
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9
10
11## Modules to Import
12
13```js
14import { constant } from '@kit.ConnectivityKit';
15```
16
17## ProfileId
18
19Enumerates profiles.
20
21**System capability**: SystemCapability.Communication.Bluetooth.Core
22
23| Name                              | Value   | Description             |
24| -------------------------------- | ------ | --------------- |
25| PROFILE_A2DP_SOURCE              | 1 | Advanced Audio Distribution Profile (A2DP).|
26| PROFILE_HANDSFREE_AUDIO_GATEWAY | 4 | Hands-Free Profile (HFP). |
27| PROFILE_HID_HOST | 6 | Human Interface Device (HID) profile. |
28| PROFILE_PAN_NETWORK | 7 | Bluetooth personal area network (PAN) profile. |
29
30
31## ProfileConnectionState
32
33Enumerates the profile connection states.
34
35**Atomic service API**: This API can be used in atomic services since API version 12.
36
37**System capability**: SystemCapability.Communication.Bluetooth.Core
38
39| Name                 | Value | Description            |
40| ------------------- | ---- | -------------- |
41| STATE_DISCONNECTED  | 0    | Disconnected. |
42| STATE_CONNECTING    | 1    | Connecting.|
43| STATE_CONNECTED     | 2    | Connected. |
44| STATE_DISCONNECTING | 3    | Disconnecting.|
45
46
47## MajorClass
48
49Enumerates the major classes of Bluetooth devices.
50
51**System capability**: SystemCapability.Communication.Bluetooth.Core
52
53| Name                 | Value   | Description        |
54| ------------------- | ------ | ---------- |
55| MAJOR_MISC          | 0x0000 | Miscellaneous device.   |
56| MAJOR_COMPUTER      | 0x0100 | Computer.  |
57| MAJOR_PHONE         | 0x0200 | Mobile phone.   |
58| MAJOR_NETWORKING    | 0x0300 | Network device.   |
59| MAJOR_AUDIO_VIDEO   | 0x0400 | Audio or video device.|
60| MAJOR_PERIPHERAL    | 0x0500 | Peripheral device.   |
61| MAJOR_IMAGING       | 0x0600 | Imaging device.   |
62| MAJOR_WEARABLE      | 0x0700 | Wearable device.  |
63| MAJOR_TOY           | 0x0800 | Toy.   |
64| MAJOR_HEALTH        | 0x0900 | Health device.   |
65| MAJOR_UNCATEGORIZED | 0x1F00 | Unclassified device.  |
66
67
68## MajorMinorClass
69
70Enumerates the major and minor classes of Bluetooth devices.
71
72**System capability**: SystemCapability.Communication.Bluetooth.Core
73
74| Name                                      | Value   | Description             |
75| ---------------------------------------- | ------ | --------------- |
76| COMPUTER_UNCATEGORIZED                   | 0x0100 | Unclassified computer.    |
77| COMPUTER_DESKTOP                         | 0x0104 | Desktop computer.     |
78| COMPUTER_SERVER                          | 0x0108 | Server.       |
79| COMPUTER_LAPTOP                          | 0x010C | Laptop.    |
80| COMPUTER_HANDHELD_PC_PDA                 | 0x0110 | Hand-held computer.    |
81| COMPUTER_PALM_SIZE_PC_PDA                | 0x0114 | Palmtop computer.      |
82| COMPUTER_WEARABLE                        | 0x0118 | Wearable computer.    |
83| COMPUTER_TABLET                          | 0x011C | Tablet.      |
84| PHONE_UNCATEGORIZED                      | 0x0200 | Unclassified mobile phone.     |
85| PHONE_CELLULAR                           | 0x0204 | Portable phone.     |
86| PHONE_CORDLESS                           | 0x0208 | Cordless phone.      |
87| PHONE_SMART                              | 0x020C | Smartphone.      |
88| PHONE_MODEM_OR_GATEWAY                   | 0x0210 | Modem or gateway phone.|
89| PHONE_ISDN                               | 0x0214 | ISDN phone.    |
90| NETWORK_FULLY_AVAILABLE                  | 0x0300 | Device with network fully available.    |
91| NETWORK_1_TO_17_UTILIZED                 | 0x0320 | Device used on network 1 to 17.  |
92| NETWORK_17_TO_33_UTILIZED                | 0x0340 | Device used on network 17 to 33. |
93| NETWORK_33_TO_50_UTILIZED                | 0x0360 | Device used on network 33 to 50. |
94| NETWORK_60_TO_67_UTILIZED                | 0x0380 | Device used on network 60 to 67. |
95| NETWORK_67_TO_83_UTILIZED                | 0x03A0 | Device used on network 67 to 83. |
96| NETWORK_83_TO_99_UTILIZED                | 0x03C0 | Device used on network 83 to 99. |
97| NETWORK_NO_SERVICE                       | 0x03E0 | Device without network service     |
98| AUDIO_VIDEO_UNCATEGORIZED                | 0x0400 | Unclassified audio or video device.   |
99| AUDIO_VIDEO_WEARABLE_HEADSET             | 0x0404 | Wearable audio or video headset.  |
100| AUDIO_VIDEO_HANDSFREE                    | 0x0408 | Hands-free audio or video device.    |
101| AUDIO_VIDEO_MICROPHONE                   | 0x0410 | Audio or video microphone.   |
102| AUDIO_VIDEO_LOUDSPEAKER                  | 0x0414 | Audio or video loudspeaker.   |
103| AUDIO_VIDEO_HEADPHONES                   | 0x0418 | Audio or video headphones.   |
104| AUDIO_VIDEO_PORTABLE_AUDIO               | 0x041C | Portable audio or video device.   |
105| AUDIO_VIDEO_CAR_AUDIO                    | 0x0420 | In-vehicle audio or video device.    |
106| AUDIO_VIDEO_SET_TOP_BOX                  | 0x0424 | Audio or video STB device.   |
107| AUDIO_VIDEO_HIFI_AUDIO                   | 0x0428 | High-fidelity speaker device.     |
108| AUDIO_VIDEO_VCR                          | 0x042C | Video cassette recording (VCR) device.   |
109| AUDIO_VIDEO_VIDEO_CAMERA                 | 0x0430 | Camera.   |
110| AUDIO_VIDEO_CAMCORDER                    | 0x0434 | Camcorder   |
111| AUDIO_VIDEO_VIDEO_MONITOR                | 0x0438 | Audio or video monitor.   |
112| AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER | 0x043C | Video display or loudspeaker. |
113| AUDIO_VIDEO_VIDEO_CONFERENCING           | 0x0440 | Video conferencing device.    |
114| AUDIO_VIDEO_VIDEO_GAMING_TOY             | 0x0448 | Audio or video gaming toy.  |
115| PERIPHERAL_NON_KEYBOARD_NON_POINTING     | 0x0500 | Non-keyboard or non-pointing peripheral device.  |
116| PERIPHERAL_KEYBOARD                      | 0x0540 | Keyboard device.      |
117| PERIPHERAL_POINTING_DEVICE               | 0x0580 | Pointing peripheral device.    |
118| PERIPHERAL_KEYBOARD_POINTING             | 0x05C0 | Keyboard pointing device.    |
119| PERIPHERAL_UNCATEGORIZED                 | 0x0500 | Unclassified peripheral device.     |
120| PERIPHERAL_JOYSTICK                      | 0x0504 | Peripheral joystick.     |
121| PERIPHERAL_GAMEPAD                       | 0x0508 | Peripheral game pad     |
122| PERIPHERAL_REMOTE_CONTROL                | 0x05C0 | Peripheral remote control device    |
123| PERIPHERAL_SENSING_DEVICE                | 0x0510 | Peripheral sensing device.    |
124| PERIPHERAL_DIGITIZER_TABLET              | 0x0514 | Peripheral digitizer tablet.|
125| PERIPHERAL_CARD_READER                   | 0x0518 | Peripheral card reader.     |
126| PERIPHERAL_DIGITAL_PEN                   | 0x051C | Peripheral digital pen.     |
127| PERIPHERAL_SCANNER_RFID                  | 0x0520 | Peripheral RFID scanner. |
128| PERIPHERAL_GESTURAL_INPUT                | 0x0522 | Gesture input device.    |
129| IMAGING_UNCATEGORIZED                    | 0x0600 | Unclassified imaging device.    |
130| IMAGING_DISPLAY                          | 0x0610 | Imaging display device.      |
131| IMAGING_CAMERA                           | 0x0620 | Imaging camera device.     |
132| IMAGING_SCANNER                          | 0x0640 | Imaging scanner.     |
133| IMAGING_PRINTER                          | 0x0680 | Imaging printer.     |
134| WEARABLE_UNCATEGORIZED                   | 0x0700 | Unclassified wearable device.   |
135| WEARABLE_WRIST_WATCH                     | 0x0704 | Smart watch.     |
136| WEARABLE_PAGER                           | 0x0708 | Wearable pager.    |
137| WEARABLE_JACKET                          | 0x070C | Smart jacket.     |
138| WEARABLE_HELMET                          | 0x0710 | Wearable helmet.     |
139| WEARABLE_GLASSES                         | 0x0714 | Wearable glasses.     |
140| TOY_UNCATEGORIZED                        | 0x0800 | Unclassified toy.    |
141| TOY_ROBOT                                | 0x0804 | Toy robot.     |
142| TOY_VEHICLE                              | 0x0808 | Toy vehicle.       |
143| TOY_DOLL_ACTION_FIGURE                   | 0x080C | Humanoid toy doll.    |
144| TOY_CONTROLLER                           | 0x0810 | Toy controller.     |
145| TOY_GAME                                 | 0x0814 | Toy gaming device.      |
146| HEALTH_UNCATEGORIZED                     | 0x0900 | Unclassified health devices.     |
147| HEALTH_BLOOD_PRESSURE                    | 0x0904 | Blood pressure device.      |
148| HEALTH_THERMOMETER                       | 0x0908 | Thermometer     |
149| HEALTH_WEIGHING                          | 0x090C | Body scale.      |
150| HEALTH_GLUCOSE                           | 0x0910 | Blood glucose monitor.     |
151| HEALTH_PULSE_OXIMETER                    | 0x0914 | Pulse oximeter.   |
152| HEALTH_PULSE_RATE                        | 0x0918 | Heart rate monitor.     |
153| HEALTH_DATA_DISPLAY                      | 0x091C | Health data display.    |
154| HEALTH_STEP_COUNTER                      | 0x0920 | Step counter.   |
155| HEALTH_BODY_COMPOSITION_ANALYZER         | 0x0924 | Body composition analyzer. |
156| HEALTH_PEAK_FLOW_MONITOR                  | 0x0928 | Hygrometer.     |
157| HEALTH_MEDICATION_MONITOR                | 0x092C | Medication monitor.   |
158| HEALTH_KNEE_PROSTHESIS                   | 0x0930 | Prosthetic knee.    |
159| HEALTH_ANKLE_PROSTHESIS                  | 0x0934 | Prosthetic ankle.    |
160| HEALTH_GENERIC_HEALTH_MANAGER            | 0x0938 | Generic health management device.    |
161| HEALTH_PERSONAL_MOBILITY_DEVICE          | 0x093C | Personal mobility device.    |
162
163
164## ProfileUuids<sup>12+</sup>
165
166Enumerates the profile UUIDs.
167
168**System capability**: SystemCapability.Communication.Bluetooth.Core
169
170| Name                                  | Value   | Description             |
171| ------------------------------------| ------ | --------------- |
172| PROFILE_UUID_HFP_AG      | '0000111F-0000-1000-8000-00805F9B34FB' | UUID of the HFPAG profile.|
173| PROFILE_UUID_HFP_HF      | '0000111E-0000-1000-8000-00805F9B34FB' | UUID of the HFPHF profile. |
174| PROFILE_UUID_HSP_AG      | '00001112-0000-1000-8000-00805F9B34FB' | UUID of the HSPAG profile. |
175| PROFILE_UUID_HSP_HS      | '00001108-0000-1000-8000-00805F9B34FB' | UUID of the HSPHS profile. |
176| PROFILE_UUID_A2DP_SRC    | '0000110A-0000-1000-8000-00805F9B34FB' | UUID of the A2DPSRC profile. |
177| PROFILE_UUID_A2DP_SINK   | '0000110B-0000-1000-8000-00805F9B34FB' | UUID of the A2DPSINK profile. |
178| PROFILE_UUID_AVRCP_CT    | '0000110E-0000-1000-8000-00805F9B34FB' | UUID of the AVRCPCT profile. |
179| PROFILE_UUID_AVRCP_TG    | '0000110C-0000-1000-8000-00805F9B34FB' | UUID of the AVRCPTG profile. |
180| PROFILE_UUID_HID         | '00001124-0000-1000-8000-00805F9B34FB' | UUID of the HID profile. |
181| PROFILE_UUID_HOGP        | '00001812-0000-1000-8000-00805F9B34FB' | UUID of the HOGP profile. |
182