1# Bluetooth Subsystem Changelog
2
3## cl.bluetooth.1 Split of Bluetooth APIs by Profile
4
51. Split ArkTS APIs in corresponding .d.ts files.
62. Changed the interface permission to **ohos.permission.ACCESS_BLUETOOTH**. [Some APIs](#apis-requiring-dual-permission-verification) also require the **ohos.permission.MANAGE_BLUETOOTH** permission.
7
8| Module| API Reference|
9| -------- | ---------------------------- |
10|@ohos.bluetooth.a2dp | [js-apis-bluetooth-a2dp.md](../../../application-dev/reference/apis/js-apis-bluetooth-a2dp.md)   |
11|@ohos.bluetooth.access | [js-apis-bluetooth-access.md](../../../application-dev/reference/apis/js-apis-bluetooth-access.md)   |
12|@ohos.bluetooth.baseProfile | [js-apis-bluetooth-baseProfile.md](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md)   |
13|@ohos.bluetooth.ble | [js-apis-bluetooth-ble.md](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md)   |
14|@ohos.bluetooth.connection | [js-apis-bluetooth-connection.md](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md)   |
15|@ohos.bluetooth.constant | [js-apis-bluetooth-constant.md](../../../application-dev/reference/apis/js-apis-bluetooth-constant.md)   |
16|@ohos.bluetooth.hfp | [js-apis-bluetooth-hfp.md](../../../application-dev/reference/apis/js-apis-bluetooth-hfp.md)   |
17|@ohos.bluetooth.hid | [js-apis-bluetooth-hid.md](../../../application-dev/reference/apis/js-apis-bluetooth-hid.md)   |
18|@ohos.bluetooth.pan | [js-apis-bluetooth-pan.md](../../../application-dev/reference/apis/js-apis-bluetooth-pan.md)   |
19|@ohos.bluetooth.socket | [js-apis-bluetooth-socket.md](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md)   |
20
21
22### APIs Requiring Dual-Permission Verification
23| Module| API Declaration|
24|------|---------|
25|@ohos.bluetooth.baseProfile|[setConnectionStrategy(deviceId: string, strategy: ConnectionStrategy, callback: AsyncCallback<void>): void](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilesetconnectionstrategy) |
26|@ohos.bluetooth.baseProfile| [setConnectionStrategy(deviceId: string, strategy: ConnectionStrategy): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilesetconnectionstrategy-1) |
27|@ohos.bluetooth.baseProfile| [getConnectionStrategy(deviceId: string, callback: AsyncCallback<ConnectionStrategy>): void](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilegetconnectionstrategy)|
28|@ohos.bluetooth.baseProfile| [getConnectionStrategy(deviceId: string): Promise<ConnectionStrategy>](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilegetconnectionstrategy-1) |
29|@ohos.bluetooth.connection| [pairCredibleDevice(deviceId: string, transport: BluetoothTransport, callback: AsyncCallback<void>): void](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionpaircredibledevice)    |
30|@ohos.bluetooth.connection| [pairCredibleDevice(deviceId: string, transport: BluetoothTransport): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionpaircredibledevice-1)    |
31|@ohos.bluetooth.connection| [setDevicePairingConfirmation(deviceId: string, accept: boolean): void](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionsetdevicepairingconfirmation)    |
32|connect(hid profile) | [connect(deviceId: string): void](../../../application-dev/reference/apis/js-apis-bluetooth-hid.md#connect)  |
33|disconnect(hid profile) | [disconnect(deviceId: string): void](../../../application-dev/reference/apis/js-apis-bluetooth-hid.md#disconnect)  |
34|setTethering | [setTethering(enable: boolean): void](../../../application-dev/reference/apis/js-apis-bluetooth-pan.md#settethering)  |
35
36**Change Impact**
37
381. The module to import is changed.
392. After the permission change, you only need to pay attention to the **ohos.permission.ACCESS_BLUETOOTH** and **ohos.permission.MANAGE_BLUETOOTH** permissions.
40
41**Key API/Component Changes**
42
43| Before Change| After Change|
44| -------- | ---------------------------- |
45|bluetoothManager.enableBluetooth | [access.enableBluetooth](../../../application-dev/reference/apis/js-apis-bluetooth-access.md#accessenablebluetooth)  |
46|bluetoothManager.disableBluetooth | [access.disableBluetooth](../../../application-dev/reference/apis/js-apis-bluetooth-access.md#accessdisablebluetooth)  |
47|bluetoothManager.getLocalName | [connection.getLocalName](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetlocalname)  |
48|bluetoothManager.getState | [access.getState](../../../application-dev/reference/apis/js-apis-bluetooth-access.md#accessgetstate)  |
49|bluetoothManager.getBtConnectionState | [connection.getProfileConnectionState](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetprofileconnectionstate)  |
50|bluetoothManager.setLocalName | [connection.setLocalName](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionsetlocalname)  |
51|bluetoothManager.pairDevice | [connection.pairDevice](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionpairdevice)  |
52|bluetoothManager.getProfileConnectionState | [connection.getProfileConnectionState](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetprofileconnectionstate)  |
53|bluetoothManager.cancelPairedDevice | [connection.cancelPairedDevice](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectioncancelpaireddevice)  |
54|bluetoothManager.getRemoteDeviceName | [connection.getRemoteDeviceName](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetremotedevicename)  |
55|bluetoothManager.getRemoteDeviceClass | [connection.getRemoteDeviceClass](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetremotedeviceclass)  |
56|bluetoothManager.getPairedDevices | [connection.getPairedDevices](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetpaireddevices)  |
57|bluetoothManager.setBluetoothScanMode | [connection.setBluetoothScanMode](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionsetbluetoothscanmode)  |
58|bluetoothManager.getBluetoothScanMode | [connection.getBluetoothScanMode](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetbluetoothscanmode)  |
59|bluetoothManager.startBluetoothDiscovery | [connection.startBluetoothDiscovery](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionstartbluetoothdiscovery)  |
60|bluetoothManager.stopBluetoothDiscovery | [connection.stopBluetoothDiscovery](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionstopbluetoothdiscovery)  |
61|bluetoothManager.setDevicePairingConfirmation | [connection.setDevicePairingConfirmation](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionsetdevicepairingconfirmation)  |
62|bluetoothManager.on('bluetoothDeviceFind') | [connection.on('bluetoothDeviceFind')](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiononbluetoothdevicefind)  |
63|bluetoothManager.off('bluetoothDeviceFind') | [connection.off('bluetoothDeviceFind')](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionoffbluetoothdevicefind)  |
64|bluetoothManager.on('pinRequired') | [connection.on('pinRequired')](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiononpinrequired)  |
65|bluetoothManager.off('pinRequired') | [connection.off('pinRequired')](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionoffpinrequired)  |
66|bluetoothManager.on('bondStateChange') | [connection.on('bondStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiononbondstatechange)  |
67|bluetoothManager.off('bondStateChange') | [connection.off('bondStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionoffbondstatechange)  |
68|bluetoothManager.on('stateChange') | [access.on('stateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-access.md#accessonstatechange)  |
69|bluetoothManager.off('stateChange') | [access.off('stateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-access.md#accessoffstatechange)  |
70|bluetoothManager.sppListen | [socket.sppListen](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md#socketspplisten)  |
71|bluetoothManager.sppAccept | [socket.sppAccept](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md#socketsppaccept)  |
72|bluetoothManager.sppConnect | [socket.sppConnect](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionoffbluetoothdevicefind)  |
73|bluetoothManager.sppCloseServerSocket | [socket.sppCloseServerSocket](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md#socketsppcloseserversocket)  |
74|bluetoothManager.sppCloseClientSocket | [socket.sppCloseClientSocket](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md#socketsppcloseclientsocket)  |
75|bluetoothManager.sppWrite | [socket.sppWrite](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md#socketsppwrite)  |
76|bluetoothManager.on('sppRead') | [socket.on('sppRead')](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md#socketonsppread)  |
77|bluetoothManager.off('sppRead') | [socket.off('sppRead')](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md#socketoffsppread)  |
78|bluetoothManager.getProfileInstance | Deprecated|
79|createGattServer | [ble.createGattServer](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#blecreategattserver)  |
80|createGattClientDevice | [ble.createGattClientDevice](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#blegetconnectedbledevices)  |
81|getConnectedBLEDevices | [ble.getConnectedBLEDevices](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#blegetconnectedbledevices)  |
82|startBLEScan | [ble.startBLEScan](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#blestartblescan)  |
83|stopBLEScan | [ble.stopBLEScan](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#blestopblescan)  |
84|on('BLEDeviceFind') | [ble.on('BLEDeviceFind')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#bleonbledevicefind)  |
85|off('BLEDeviceFind') | [ble.off('BLEDeviceFind')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#bleoffbledevicefind)  |
86|getConnectionDevices | [baseProfile.getConnectedDevices](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilegetconnecteddevices)  |
87|getDeviceState | [baseProfile.getConnectionState](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilegetconnectionstate)  |
88|A2dpSourceProfile | [A2dpSourceProfile](../../../application-dev/reference/apis/js-apis-bluetooth-a2dp.md#a2dpsourceprofile)  |
89|connect(a2dp profile) | [connect](../../../application-dev/reference/apis/js-apis-bluetooth-a2dp.md#connect)  |
90|disconnect(a2dp profile) | [disconnect](../../../application-dev/reference/apis/js-apis-bluetooth-a2dp.md#disconnect)  |
91|on('connectionStateChange') | [baseProfile.on('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofileonconnectionstatechange)  |
92|off('connectionStateChange') | [baseProfile.off('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofileoffconnectionstatechange)  |
93|getPlayingState | [getPlayingState](../../../application-dev/reference/apis/js-apis-bluetooth-a2dp.md#getplayingstate)  |
94|HandsFreeAudioGatewayProfile | [HandsFreeAudioGatewayProfile](../../../application-dev/reference/apis/js-apis-bluetooth-hfp.md#handsfreeaudiogatewayprofile)  |
95|connect(hfp profile) | [connect](../../../application-dev/reference/apis/js-apis-bluetooth-hfp.md#connect)  |
96|disconnect(hfp profile) | [disconnect](../../../application-dev/reference/apis/js-apis-bluetooth-hfp.md#disconnect)  |
97|on('connectionStateChange')(hfp profile) | [baseProfile.on('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofileonconnectionstatechange)  |
98|off('connectionStateChange')(hfp profile) | [baseProfile.off('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofileoffconnectionstatechange)  |
99|connect(hid profile) | [connect](../../../application-dev/reference/apis/js-apis-bluetooth-hid.md#connect)  |
100|disconnect(hid profile) | [disconnect](../../../application-dev/reference/apis/js-apis-bluetooth-hid.md#disconnect)  |
101|on('connectionStateChange')(hid profile) | [baseProfile.on('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofileonconnectionstatechange)  |
102|off('connectionStateChange')(hid profile) | [baseProfile.off('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofileoffconnectionstatechange)  |
103|disconnect(pan profile) | [disconnect](../../../application-dev/reference/apis/js-apis-bluetooth-pan.md#disconnect)  |
104|on('connectionStateChange')(pan profile) | [baseProfile.on('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofileonconnectionstatechange)  |
105|off('connectionStateChange')(pan profile) | [baseProfile.off('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofileoffconnectionstatechange)  |
106|setTethering | [setTethering](../../../application-dev/reference/apis/js-apis-bluetooth-pan.md#settethering)  |
107|isTetheringOn | [isTetheringOn](../../../application-dev/reference/apis/js-apis-bluetooth-pan.md#istetheringon)  |
108|startAdvertising | [ble.startAdvertising](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#blestartadvertising)  |
109|stopAdvertising | [ble.stopAdvertising](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#blestopadvertising)  |
110|addService | [addService](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#addservice)  |
111|removeService | [removeService](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#removeservice)  |
112|close | [close](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#close)  |
113|notifyCharacteristicChanged | [notifyCharacteristicChanged](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#notifycharacteristicchanged)  |
114|sendResponse | [sendResponse](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#sendresponse)  |
115|on('characteristicRead') | [on('characteristicRead')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#oncharacteristicread)  |
116|off('characteristicRead') | [off('characteristicRead')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offcharacteristicread)  |
117|on('characteristicWrite') | [on('characteristicWrite')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#oncharacteristicwrite)  |
118|off('characteristicWrite') | [off('characteristicWrite')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offcharacteristicwrite)  |
119|on('descriptorRead') | [on('descriptorRead')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#ondescriptorread)  |
120|off('descriptorRead') | [off('descriptorRead')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offdescriptorread)  |
121|on('descriptorWrite') | [on('descriptorWrite')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#ondescriptorwrite)  |
122|off('descriptorWrite') | [off('descriptorWrite')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offdescriptorwrite)  |
123|on('connectStateChange') | [on('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#onconnectionstatechange)  |
124|off('connectStateChange') | [off('connectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offconnectionstatechange)  |
125|connect | [connect](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#connect)  |
126|disconnect | [disconnect](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#disconnect)  |
127|close | [close](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#close)  |
128|getServices(callback) | [getServices](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#getservices)  |
129|getServices(promise) | [getServices](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#getservices-1)  |
130|readCharacteristicValue(callback) | [readCharacteristicValue](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#readcharacteristicvalue)  |
131|readCharacteristicValue(promise) | [readCharacteristicValue](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#readcharacteristicvalue-1)  |
132|readDescriptorValue(callback) | [readDescriptorValue](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#readdescriptorvalue)  |
133|readDescriptorValue(promise) | [readDescriptorValue](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#readdescriptorvalue-1)  |
134|writeCharacteristicValue(callback) | [writeCharacteristicValue](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#writecharacteristicvalue)  |
135|writeDescriptorValue(promise) | [writeCharacteristicValue](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#writecharacteristicvalue-1)  |
136|setBLEMtuSize | [setBLEMtuSize](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setblemtusize)  |
137|setNotifyCharacteristicChanged | [setCharacteristicChangeNotification](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangenotification)  |
138|on('BLECharacteristicChange') | [on('BLECharacteristicChange')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#onblecharacteristicchange)  |
139|off('BLECharacteristicChange') | [off('BLECharacteristicChange')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offblecharacteristicchange)  |
140|on('BLEConnectionStateChange') | [on('BLEConnectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#onbleconnectionstatechange)  |
141|off('BLEConnectionStateChange') | [off('BLEConnectionStateChange')](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offbleconnectionstatechange)  |
142|getDeviceName(callback) | [getDeviceName](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#getdevicename)  |
143|getDeviceName(promise) | [getDeviceName](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#getdevicename-1)  |
144|getRssiValue(callback) | [getRssiValue](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#getrssivalue)  |
145|getRssiValue(promise) | [getRssiValue](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#getrssivalue-1)  |
146|ScanMode | [ScanMode](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#scanmode)  |
147|BondState | [BondState](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#bondstate)  |
148|SppOption | [SppOptions](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md#sppoptions)  |
149|SppType | [SppType](../../../application-dev/reference/apis/js-apis-bluetooth-socket.md#spptype)  |
150|GattService | [GattService](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#gattservice)  |
151|BLECharacteristic | [BLECharacteristic](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#blecharacteristic)  |
152|BLEDescriptor | [BLEDescriptor](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#bledescriptor)  |
153|NotifyCharacteristic | [NotifyCharacteristic](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#notifycharacteristic)  |
154|CharacteristicReadRequest | [CharacteristicReadRequest](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#characteristicreadrequest)  |
155|CharacteristicWriteRequest | [CharacteristicWriteRequest](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#characteristicwriterequest)  |
156|DescriptorReadRequest | [DescriptorReadRequest](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#descriptorreadrequest)  |
157|DescriptorWriteRequest | [DescriptorWriteRequest](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#descriptorwriterequest)  |
158|ServerResponse | [ServerResponse](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#serverresponse)  |
159|BLEConnectChangedState | [BLEConnectionChangeState](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#bleconnectionchangestate)  |
160|ProfileConnectionState | [ProfileConnectionState](../../../application-dev/reference/apis/js-apis-bluetooth-constant.md#profileconnectionstate)  |
161|ScanFilter | [ScanFilter](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#scanfilter)  |
162|ScanOptions | [ScanOptions](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#scanoptions)  |
163|ScanDuty | [ScanDuty](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#scanduty)  |
164|MatchMode | [MatchMode](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#matchmode)  |
165|ScanResult | [ScanResult](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#scanresult)  |
166|BluetoothState | [BluetoothState](../../../application-dev/reference/apis/js-apis-bluetooth-access.md#bluetoothstate)  |
167|AdvertiseSetting | [AdvertiseSetting](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#advertisesetting)  |
168|AdvertiseData | [AdvertiseData](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#advertisedata)  |
169|ManufactureData | [ManufactureData](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#manufacturedata)  |
170|ServiceData | [ServiceData](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#servicedata)  |
171|PinRequiredParam | [PinRequiredParam](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#pinrequiredparam)  |
172|BondStateParam | [BondStateParam](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#bondstateparam)  |
173|StateChangeParam | [StateChangeParam](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#statechangeparam)  |
174|DeviceClass | [DeviceClass](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#deviceclass)  |
175|MajorClass | [MajorClass](../../../application-dev/reference/apis/js-apis-bluetooth-constant.md#majorclass)  |
176|MajorMinorClass | [MajorMinorClass](../../../application-dev/reference/apis/js-apis-bluetooth-constant.md#majorminorclass)  |
177|PlayingState | [PlayingState](../../../application-dev/reference/apis/js-apis-bluetooth-a2dp.md#playingstate)  |
178|ProfileId | [ProfileId](../../../application-dev/reference/apis/js-apis-bluetooth-constant.md#profileid)  |
179
180
181### Added APIs
182
183
184| Module        |API                                                |
185| ------------- |-------------------------------------------------------- |
186|@ohos.bluetooth.connection| [pairCredibleDevice(deviceId: string, transport: BluetoothTransport, callback: AsyncCallback<void>): void](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionpaircredibledevice)    |
187|@ohos.bluetooth.connection| [pairCredibleDevice(deviceId: string, transport: BluetoothTransport): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionpaircredibledevice-1)    |
188|@ohos.bluetooth.connection| [getRemoteProfileUuids(deviceId: string, callback: AsyncCallback<Array<ProfileUuids>>): void](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetremoteprofileuuids)    |
189|@ohos.bluetooth.connection| [getRemoteProfileUuids(deviceId: string): Promise<Array<ProfileUuids>>](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetremoteprofileuuids-1)    |
190|@ohos.bluetooth.connection| [getLocalProfileUuids(callback: AsyncCallback<Array<ProfileUuids>>): void](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetlocalprofileuuids)    |
191|@ohos.bluetooth.connection| [getLocalProfileUuids(): Promise<Array<ProfileUuids>>](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectiongetlocalprofileuuids-1)    |
192|@ohos.bluetooth.connection| [setDevicePinCode(deviceId: string, code: string, callback: AsyncCallback<void>): void](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionsetdevicepincode)    |
193|@ohos.bluetooth.connection| [setDevicePinCode(deviceId: string, code: string): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#connectionsetdevicepincode-1)    |
194|@ohos.bluetooth.baseProfile| [setConnectionStrategy(deviceId: string, strategy: ConnectionStrategy, callback: AsyncCallback<void>): void](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilesetconnectionstrategy)|
195|@ohos.bluetooth.baseProfile| [setConnectionStrategy(deviceId: string, strategy: ConnectionStrategy): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilesetconnectionstrategy-1) |
196|@ohos.bluetooth.baseProfile| [getConnectionStrategy(deviceId: string, callback: AsyncCallback<ConnectionStrategy>): void](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilegetconnectionstrategy)|
197|@ohos.bluetooth.baseProfile| [getConnectionStrategy(deviceId: string): Promise<ConnectionStrategy>](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#baseprofilegetconnectionstrategy-1) |
198|@ohos.bluetooth.baseprofile|[ConnectionStrategy](../../../application-dev/reference/apis/js-apis-bluetooth-baseProfile.md#connectionstrategy)|
199|@ohos.bluetooth.ble|[properties](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#blecharacteristic)|
200|@ohos.bluetooth.ble|[deviceName](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#scanresult)|
201|@ohos.bluetooth.ble|[includeDeviceName](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#advertisedata)|
202|@ohos.bluetooth.ble|[GattProperties](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#gattproperties)|
203|@ohos.bluetooth.ble|[setCharacteristicChangeIndication(characteristic: BLECharacteristic, enable: boolean, callback: AsyncCallback<void>): void](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangeindication)|
204|@ohos.bluetooth.ble|[setCharacteristicChangeIndication(characteristic: BLECharacteristic, enable: boolean): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangeindication-1)|
205|@ohos.bluetooth.ble|[on(type: 'BLEMtuChange', callback: Callback<number>): void](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#onblemtuchange)|
206|@ohos.bluetooth.ble|[off(type: 'BLEMtuChange', callback?: Callback<number>): void](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offblemtuchange)|
207|@ohos.bluetooth.connection|[pinType](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#pintype)|
208|@ohos.bluetooth.connection|[BluetoothTransport](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#bluetoothtransport)|
209|@ohos.bluetooth.constant|[ProfileUuids](../../../application-dev/reference/apis/js-apis-bluetooth-constant.md#profileuuids)|
210
211### APIs Added with Promise
212
213| Module        |API                                                |
214| ------------- |-------------------------------------------------------- |
215|@ohos.bluetooth.ble| [notifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#notifycharacteristicchanged-1)    |
216|@ohos.bluetooth.ble| [writeCharacteristicValue(characteristic: BLECharacteristic, writeType: GattWriteType): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#writecharacteristicvalue-1)    |
217|@ohos.bluetooth.ble| [writeDescriptorValue(descriptor: BLEDescriptor): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#writedescriptorvalue-1)    |
218|@ohos.bluetooth.ble| [setCharacteristicChangeNotification(characteristic: BLECharacteristic, enable: boolean): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangenotification-1)    |
219
220**Adaptation Guide**
221
222Determine the module to import based on the profile module. For some interfaces, multiple TS files need to be imported.
223
224```js
225//For example, getConnectionState() in @ohos.bluetooth.baseProfile.
226import a2dp from '@ohos.bluetooth.a2dp';
227try {
228    let a2dpSrc = a2dp.createA2dpSrcProfile();
229    let ret = a2dpSrc.getConnectionState('XX:XX:XX:XX:XX:XX');
230} catch (err) {
231    console.error('errCode: ' + err.code + ', errMessage: ' + err.message);
232}
233
234```
235