diff --git a/zh-cn/application-dev/reference/apis/js-apis-bluetooth-baseProfile.md b/zh-cn/application-dev/reference/apis/js-apis-bluetooth-baseProfile.md index 7c8c593a3f36b33d18921666fb3f811fdd03a04c..3035de8a699c537f713d47ef716980a172f82867 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bluetooth-baseProfile.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bluetooth-baseProfile.md @@ -358,7 +358,7 @@ try { off(type: 'connectionStateChange', callback?: Callback<[StateChangeParam](#StateChangeParam)>): void -取消订阅a2dp连接状态变化事件。 +取消订阅连接状态变化事件。 **需要权限**:ohos.permission.ACCESS_BLUETOOTH diff --git a/zh-cn/application-dev/reference/apis/js-apis-bluetooth-ble.md b/zh-cn/application-dev/reference/apis/js-apis-bluetooth-ble.md index d8e3fee736112202464cc18c2b4007f603c6a76d..a9875e133df4292bd4d7108ebc632e75f1151744 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bluetooth-ble.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bluetooth-ble.md @@ -1,6 +1,6 @@ # @ohos.bluetooth.ble (蓝牙ble模块) -ble模块提供了访问蓝牙个人区域网相关功能的方法。 +ble模块提供了对蓝牙操作和管理的方法。 > **说明:** > @@ -19,7 +19,7 @@ import ble from '@ohos.bluetooth.ble'; createGattServer(): GattServer -创建Gatt profile实例。 +创建GattServer实例。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。 @@ -27,7 +27,7 @@ createGattServer(): GattServer | 类型 | 说明 | | ----------------------------- | ---------- | -| GattServer | 返回一个JavaScript Gatt服务的实例。 | +| GattServer | 返回一个Gatt服务的实例。 | **示例:** @@ -2210,7 +2210,7 @@ try { off(type: 'BLEMtuChange', callback?: Callback<number>): void -订阅Mtu状态变化事件。 +取消订阅Mtu状态变化事件。 **需要权限**:ohos.permission.ACCESS_BLUETOOTH diff --git a/zh-cn/application-dev/reference/apis/js-apis-bluetooth-pan.md b/zh-cn/application-dev/reference/apis/js-apis-bluetooth-pan.md index 4147424f19186f84e1d3f6610c80ed7a721a63d7..6d9586058b46a8a0238c912130e78ef3be9a25e3 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bluetooth-pan.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bluetooth-pan.md @@ -1,4 +1,4 @@ -# @ohos.bluetooth.pan (蓝牙socket模块) +# @ohos.bluetooth.pan (蓝牙pan模块) pan模块提供了访问蓝牙个人区域网相关功能的方法。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-bluetooth.md b/zh-cn/application-dev/reference/apis/js-apis-bluetooth.md index bfe37ba4628f2cc6a74d066251539ebc71781e8a..083fa52fcdb9e85fd007497856702e1bc1f157c6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bluetooth.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bluetooth.md @@ -4,7 +4,7 @@ > **说明:** > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 -> 从API Version 9开始,该接口不再维护,推荐使用新接口[bluetoothManager](js-apis-bluetoothManager.md)。 +> 从API Version 9 开始,该接口不再维护,推荐使用[`@ohos.bluetooth.ble`](js-apis-bluetooth-ble.md)等相关profile接口。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md b/zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md index a594e5145f5d5cbdd8913e8ed58c30fd1f4b2d07..caa21c0ebe5057b4d301cf6cbf60e1db202f3129 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md @@ -5,6 +5,7 @@ > **说明:** > > 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 +> 从API Version 10 开始,该接口不再维护,推荐使用[`@ohos.bluetooth.ble`](js-apis-bluetooth-ble.md)等相关profile接口。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-bluetooth.md b/zh-cn/application-dev/reference/apis/js-apis-system-bluetooth.md index 3efeff8a95fd8528d3fdd5aed4836ebce8caa29c..2dbc883b097a77e04ec21083782b31cd2312e0bc 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-bluetooth.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-bluetooth.md @@ -3,7 +3,7 @@ > **说明:** > -> - 从API Version 7 开始,该接口不再维护,推荐使用新接口[`@ohos.bluetooth`](js-apis-bluetooth.md)。 +> - 从API Version 7 开始,该接口不再维护,推荐使用[`@ohos.bluetooth.ble`](js-apis-bluetooth-ble.md)等相关profile接口。 > > - 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-bluetooth.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-bluetooth.md index 08cdc620fc6a9462934e7d1a9bd1bb2f114dcf89..0d9eedc0320ff816c960744d86f18c6c1266082b 100644 --- a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-bluetooth.md +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.2/changelogs-bluetooth.md @@ -200,10 +200,23 @@ |@ohos.bluetooth.ble|[deviceName](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#scanresult)| |@ohos.bluetooth.ble|[includeDeviceName](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#advertisedata)| |@ohos.bluetooth.ble|[GattProperties](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#gattproperties)| +|@ohos.bluetooth.ble|[setCharacteristicChangeIndication(characteristic: BLECharacteristic, enable: boolean, callback: AsyncCallback<void>): void](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangeindication)| +|@ohos.bluetooth.ble|[setCharacteristicChangeIndication(characteristic: BLECharacteristic, enable: boolean): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangeindication-1)| +|@ohos.bluetooth.ble|[on(type: 'BLEMtuChange', callback: Callback<number>): void](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#onblemtuchange)| +|@ohos.bluetooth.ble|[off(type: 'BLEMtuChange', callback?: Callback<number>): void](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#offblemtuchange)| |@ohos.bluetooth.connection|[pinType](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#pintype)| |@ohos.bluetooth.connection|[BluetoothTransport](../../../application-dev/reference/apis/js-apis-bluetooth-connection.md#bluetoothtransport)| |@ohos.bluetooth.constant|[ProfileUuids](../../../application-dev/reference/apis/js-apis-bluetooth-constant.md#profileuuids)| +### 补充promise调用方式 + +| 模块名 |新增声明 | +| ------------- |-------------------------------------------------------- | +|@ohos.bluetooth.ble| [notifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#notifycharacteristicchanged-1) | +|@ohos.bluetooth.ble| [writeCharacteristicValue(characteristic: BLECharacteristic, writeType: GattWriteType): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#writecharacteristicvalue-1) | +|@ohos.bluetooth.ble| [writeDescriptorValue(descriptor: BLEDescriptor): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#writedescriptorvalue-1) | +|@ohos.bluetooth.ble| [setCharacteristicChangeNotification(characteristic: BLECharacteristic, enable: boolean): Promise<void>](../../../application-dev/reference/apis/js-apis-bluetooth-ble.md#setcharacteristicchangenotification-1) | + **适配指导** 注意根据不同profile模块选择import方式,部分接口需要import多个TS文件。