diff --git a/zh-cn/application-dev/connectivity/bluetooth/gatt-development-guide.md b/zh-cn/application-dev/connectivity/bluetooth/gatt-development-guide.md index 7c21b8e5a20e0c8c22020a1461769abd51872d92..ecfe27231d5bff500f9a55d93ab7f56313f82a00 100644 --- a/zh-cn/application-dev/connectivity/bluetooth/gatt-development-guide.md +++ b/zh-cn/application-dev/connectivity/bluetooth/gatt-development-guide.md @@ -236,7 +236,7 @@ try { // enable入参: true表示启用,false表示禁用 gattClient.setCharacteristicChangeNotification(characteristic, true, (err: BusinessError) => { if (err) { - console.info('setCharacteristicChangeNotification callback failed'); + console.error('setCharacteristicChangeNotification callback failed'); } else { console.info('setCharacteristicChangeNotification callback successful'); } @@ -250,7 +250,7 @@ try { // enable入参: true表示启用,false表示禁用 gattClient.setCharacteristicChangeIndication(characteristic, true, (err: BusinessError) => { if (err) { - console.info('setCharacteristicChangeIndication callback failed'); + console.error('setCharacteristicChangeIndication callback failed'); } else { console.info('setCharacteristicChangeIndication callback successful'); } @@ -511,7 +511,7 @@ try { // 发送变更通知或指示 gattServer.notifyCharacteristicChanged(device, notifyCharacter, (err: BusinessError) => { if (err) { - console.info('notifyCharacteristicChanged callback failed'); + console.error('notifyCharacteristicChanged callback failed'); } else { console.info('notifyCharacteristicChanged callback successful'); } @@ -694,7 +694,7 @@ export class GattClientManager { // 3. client端连接成功后,需要进行服务发现 public async discoverServices() { if (!this.gattClient) { - console.info(TAG, 'gattClient does not exist'); + console.error(TAG, 'gattClient does not exist'); return; } console.info(TAG, 'discoverServices'); @@ -846,7 +846,7 @@ export class GattClientManager { // 设置特征值变化通知能力,enable: true表示启用,false表示禁用 this.gattClient.setCharacteristicChangeNotification(this.myCharacteristic, enable, (err: BusinessError) => { if (err) { - console.info('setCharacteristicChangeNotification callback failed'); + console.error('setCharacteristicChangeNotification callback failed'); } else { console.info('setCharacteristicChangeNotification callback successful'); } @@ -875,7 +875,7 @@ export class GattClientManager { // 设置特征值变化指示能力,enable: true表示启用,false表示禁用 this.gattClient.setCharacteristicChangeIndication(this.myCharacteristic, enable, (err: BusinessError) => { if (err) { - console.info('setCharacteristicChangeIndication callback failed'); + console.error('setCharacteristicChangeIndication callback failed'); } else { console.info('setCharacteristicChangeIndication callback successful'); } @@ -1152,7 +1152,7 @@ export class GattServerManager { console.info(TAG, 'sendCharacterChange notification'); this.gattServer?.notifyCharacteristicChanged(this.device, notifyCharacter, (err: BusinessError) => { if (err) { - console.info(TAG, 'notifyCharacteristicChanged notification callback failed'); + console.error(TAG, 'notifyCharacteristicChanged notification callback failed'); } else { console.info(TAG, 'notifyCharacteristicChanged notification callback successful'); } @@ -1167,7 +1167,7 @@ export class GattServerManager { console.info(TAG, 'sendCharacterChange indication'); this.gattServer?.notifyCharacteristicChanged(this.device, notifyCharacter, (err: BusinessError) => { if (err) { - console.info(TAG, 'notifyCharacteristicChanged indication callback failed'); + console.error(TAG, 'notifyCharacteristicChanged indication callback failed'); } else { console.info(TAG, 'notifyCharacteristicChanged indication callback successful'); } diff --git a/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-ble.md b/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-ble.md index 2401a44e87905ce3c00d052e35d4aa83066577f3..9607566a229896991a01cb3a1e448a68d25f995b 100644 --- a/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-ble.md +++ b/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-ble.md @@ -1586,7 +1586,7 @@ try { let gattServer: ble.GattServer = ble.createGattServer(); gattServer.notifyCharacteristicChanged('XX:XX:XX:XX:XX:XX', notifyCharacter, (err: BusinessError) => { if (err) { - console.info('notifyCharacteristicChanged callback failed'); + console.error('notifyCharacteristicChanged callback failed'); } else { console.info('notifyCharacteristicChanged callback successful'); } @@ -3072,7 +3072,7 @@ try { let device: ble.GattClientDevice = ble.createGattClientDevice('XX:XX:XX:XX:XX:XX'); device.writeDescriptorValue(descriptor, (err: BusinessError) => { if (err) { - console.info('notifyCharacteristicChanged callback failed'); + console.error('notifyCharacteristicChanged callback failed'); } else { console.info('notifyCharacteristicChanged callback successful'); } @@ -3346,7 +3346,7 @@ try { let device: ble.GattClientDevice = ble.createGattClientDevice('XX:XX:XX:XX:XX:XX'); device.setCharacteristicChangeNotification(characteristic, false, (err: BusinessError) => { if (err) { - console.info('notifyCharacteristicChanged callback failed'); + console.error('notifyCharacteristicChanged callback failed'); } else { console.info('notifyCharacteristicChanged callback successful'); } @@ -3487,7 +3487,7 @@ try { let device: ble.GattClientDevice = ble.createGattClientDevice('XX:XX:XX:XX:XX:XX'); device.setCharacteristicChangeIndication(characteristic, false, (err: BusinessError) => { if (err) { - console.info('notifyCharacteristicChanged callback failed'); + console.error('notifyCharacteristicChanged callback failed'); } else { console.info('notifyCharacteristicChanged callback successful'); } diff --git a/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-connection-sys.md b/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-connection-sys.md index da67ce955591e40f8677683e4a9c3a22837d45ce..94f6ff12aab2c792ae7b1b9715b4068dcfb1a32d 100644 --- a/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-connection-sys.md +++ b/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-connection-sys.md @@ -218,7 +218,7 @@ try { connection.cancelPairedDevice('11:22:33:44:55:66').then(() => { console.info('cancelPairedDevice'); }, (error: BusinessError) => { - console.info('cancelPairedDevice: errCode:' + error.code + ',errMessage' + error.message); + console.error('cancelPairedDevice: errCode:' + error.code + ',errMessage' + error.message); }) } catch (err) { diff --git a/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-connection.md b/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-connection.md index ab93cdc1a1d91476f9b1f8ba9b40cbf7c3dfcb0b..f835ff6540be03b72eb48c7468b91a5e514b9d17 100644 --- a/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-connection.md +++ b/zh-cn/application-dev/reference/apis-connectivity-kit/js-apis-bluetooth-connection.md @@ -176,7 +176,7 @@ try { connection.pairDevice('11:22:33:44:55:66').then(() => { console.info('pairDevice'); }, (error: BusinessError) => { - console.info('pairDevice: errCode:' + error.code + ',errMessage' + error.message); + console.error('pairDevice: errCode:' + error.code + ',errMessage' + error.message); }) } catch (err) { @@ -745,7 +745,7 @@ try { connection.setDevicePinCode('11:22:33:44:55:66', '12345').then(() => { console.info('setDevicePinCode'); }, (error: BusinessError) => { - console.info('setDevicePinCode: errCode:' + error.code + ',errMessage' + error.message); + console.error('setDevicePinCode: errCode:' + error.code + ',errMessage' + error.message); }) } catch (err) {