提交 90cfe8ed 编写于 作者: T tangjia

fix the bluetooth md doc

Signed-off-by: Ntangjia <tangjia.jackis@qq.com>
上级 0ea71d88
...@@ -1280,10 +1280,6 @@ getConnectionDevices(): Array&lt;string&gt; ...@@ -1280,10 +1280,6 @@ getConnectionDevices(): Array&lt;string&gt;
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
**参数:**
**返回值:** **返回值:**
| 类型 | 说明 | | 类型 | 说明 |
...@@ -2695,8 +2691,6 @@ client端获取蓝牙低功耗设备的所有服务,即服务发现。 ...@@ -2695,8 +2691,6 @@ client端获取蓝牙低功耗设备的所有服务,即服务发现。
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
**参数:**
**返回值:** **返回值:**
| 类型 | 说明 | | 类型 | 说明 |
...@@ -2830,7 +2824,7 @@ client端读取蓝牙低功耗设备特定的特征包含的描述符。 ...@@ -2830,7 +2824,7 @@ client端读取蓝牙低功耗设备特定的特征包含的描述符。
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| ---------- | ---------------------------------------- | ---- | ----------------------- | | ---------- | ---------------------------------------- | ---- | ----------------------- |
| descriptor | [BLEDescriptor](#bledescriptor) | 是 | 待读取的描述符。 | | descriptor | [BLEDescriptor](#bledescriptor) | 是 | 待读取的描述符。 |
| callback | AsyncCallback&lt;[BLECharacteristic](#blecharacteristic)&gt; | 是 | client读取描述符,通过注册回调函数获取。 | | callback | AsyncCallback&lt;[BLEDescriptor](#bledescriptor)&gt; | 是 | client读取描述符,通过注册回调函数获取。 |
**返回值:** **返回值:**
...@@ -3309,7 +3303,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3309,7 +3303,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| ---------------------------------------- | ---- | --------------- | | ---------------------------------------- | ---- | --------------- |
| SCAN_MODE_NONE | 0 | 没有扫描模式。 | | SCAN_MODE_NONE | 0 | 没有扫描模式。 |
| SCAN_MODE_CONNECTABLE | 1 | 可连接扫描模式。 | | SCAN_MODE_CONNECTABLE | 1 | 可连接扫描模式。 |
...@@ -3324,7 +3318,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3324,7 +3318,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| ------------------ | ---- | ------ | | ------------------ | ---- | ------ |
| BOND_STATE_INVALID | 0 | 无效的配对。 | | BOND_STATE_INVALID | 0 | 无效的配对。 |
| BOND_STATE_BONDING | 1 | 正在配对。 | | BOND_STATE_BONDING | 1 | 正在配对。 |
...@@ -3337,7 +3331,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3337,7 +3331,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------ | ------------------- | ---- | ---- | ----------- | | ------ | ------------------- | ---- | ---- | ----------- |
| uuid | string | 是 | 是 | spp单据的uuid。 | | uuid | string | 是 | 是 | spp单据的uuid。 |
| secure | boolean | 是 | 是 | 是否是安全通道。 | | secure | boolean | 是 | 是 | 是否是安全通道。 |
...@@ -3350,7 +3344,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3350,7 +3344,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| ---------- | ---- | ------------- | | ---------- | ---- | ------------- |
| SPP_RFCOMM | 0 | 表示rfcomm链路类型。 | | SPP_RFCOMM | 0 | 表示rfcomm链路类型。 |
...@@ -3361,7 +3355,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3361,7 +3355,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ---------------------------------------- | ---- | ---- | ---------------------------------------- | | --------------- | ---------------------------------------- | ---- | ---- | ---------------------------------------- |
| serviceUuid | string | 是 | 是 | 特定服务(service)的UUID,例如:00001888-0000-1000-8000-00805f9b34fb。 | | serviceUuid | string | 是 | 是 | 特定服务(service)的UUID,例如:00001888-0000-1000-8000-00805f9b34fb。 |
| isPrimary | boolean | 是 | 是 | 如果是主服务设置为true,否则设置为false。 | | isPrimary | boolean | 是 | 是 | 如果是主服务设置为true,否则设置为false。 |
...@@ -3375,7 +3369,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3375,7 +3369,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------- | ---------------------------------------- | ---- | ---- | ---------------------------------------- | | ------------------- | ---------------------------------------- | ---- | ---- | ---------------------------------------- |
| serviceUuid | string | 是 | 是 | 特定服务(service)的UUID,例如:00001888-0000-1000-8000-00805f9b34fb。 | | serviceUuid | string | 是 | 是 | 特定服务(service)的UUID,例如:00001888-0000-1000-8000-00805f9b34fb。 |
| characteristicUuid | string | 是 | 是 | 特定特征(characteristic)的UUID,例如:00002a11-0000-1000-8000-00805f9b34fb。 | | characteristicUuid | string | 是 | 是 | 特定特征(characteristic)的UUID,例如:00002a11-0000-1000-8000-00805f9b34fb。 |
...@@ -3389,7 +3383,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3389,7 +3383,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------ | ----------- | ---- | ---- | ---------------------------------------- | | ------------------ | ----------- | ---- | ---- | ---------------------------------------- |
| serviceUuid | string | 是 | 是 | 特定服务(service)的UUID,例如:00001888-0000-1000-8000-00805f9b34fb。 | | serviceUuid | string | 是 | 是 | 特定服务(service)的UUID,例如:00001888-0000-1000-8000-00805f9b34fb。 |
| characteristicUuid | string | 是 | 是 | 特定特征(characteristic)的UUID,例如:00002a11-0000-1000-8000-00805f9b34fb。 | | characteristicUuid | string | 是 | 是 | 特定特征(characteristic)的UUID,例如:00002a11-0000-1000-8000-00805f9b34fb。 |
...@@ -3403,7 +3397,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3403,7 +3397,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------- | ----------- | ---- | ---- | ---------------------------------------- | | ------------------- | ----------- | ---- | ---- | ---------------------------------------- |
| serviceUuid | string | 是 | 是 | 特定服务(service)的UUID,例如:00001888-0000-1000-8000-00805f9b34fb。 | | serviceUuid | string | 是 | 是 | 特定服务(service)的UUID,例如:00001888-0000-1000-8000-00805f9b34fb。 |
| characteristicUuid | string | 是 | 是 | 特定特征(characteristic)的UUID,例如:00002a11-0000-1000-8000-00805f9b34fb。 | | characteristicUuid | string | 是 | 是 | 特定特征(characteristic)的UUID,例如:00002a11-0000-1000-8000-00805f9b34fb。 |
...@@ -3417,7 +3411,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3417,7 +3411,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------ | ------ | ---- | ---- | ---------------------------------------- | | ------------------ | ------ | ---- | ---- | ---------------------------------------- |
| deviceId | string | 是 | 否 | 表示发送特征值读请求的远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 | | deviceId | string | 是 | 否 | 表示发送特征值读请求的远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 |
| transId | number | 是 | 否 | 表示读请求的传输ID,server端回复响应时需填写相同的传输ID。 | | transId | number | 是 | 否 | 表示读请求的传输ID,server端回复响应时需填写相同的传输ID。 |
...@@ -3432,7 +3426,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3432,7 +3426,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------ | ------ | ---- | ---- | ---------------------------------------- | | ------------------ | ------ | ---- | ---- | ---------------------------------------- |
| deviceId | string | 是 | 否 | 表示发送特征值写请求的远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 | | deviceId | string | 是 | 否 | 表示发送特征值写请求的远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 |
| transId | number | 是 | 否 | 表示写请求的传输ID,server端回复响应时需填写相同的传输ID。 | | transId | number | 是 | 否 | 表示写请求的传输ID,server端回复响应时需填写相同的传输ID。 |
...@@ -3448,7 +3442,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3448,7 +3442,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------ | ------ | ---- | ---- | ---------------------------------------- | | ------------------ | ------ | ---- | ---- | ---------------------------------------- |
| deviceId | string | 是 | 否 | 表示发送描述符读请求的远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 | | deviceId | string | 是 | 否 | 表示发送描述符读请求的远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 |
| transId | number | 是 | 否 | 表示读请求的传输ID,server端回复响应时需填写相同的传输ID。 | | transId | number | 是 | 否 | 表示读请求的传输ID,server端回复响应时需填写相同的传输ID。 |
...@@ -3464,7 +3458,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3464,7 +3458,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------ | ----------- | ---- | ---- | ---------------------------------------- | | ------------------ | ----------- | ---- | ---- | ---------------------------------------- |
| deviceId | string | 是 | 否 | 表示发送描述符写请求的远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 | | deviceId | string | 是 | 否 | 表示发送描述符写请求的远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 |
| transId | number | 是 | 否 | 表示写请求的传输ID,server端回复响应时需填写相同的传输ID。 | | transId | number | 是 | 否 | 表示写请求的传输ID,server端回复响应时需填写相同的传输ID。 |
...@@ -3483,7 +3477,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3483,7 +3477,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | ----------- | ---- | ---- | -------------------------------------- | | -------- | ----------- | ---- | ---- | -------------------------------------- |
| deviceId | string | 是 | 否 | 表示远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 | | deviceId | string | 是 | 否 | 表示远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 |
| transId | number | 是 | 否 | 表示请求的传输ID,与订阅的读/写请求事件携带的ID保持一致。 | | transId | number | 是 | 否 | 表示请求的传输ID,与订阅的读/写请求事件携带的ID保持一致。 |
...@@ -3498,7 +3492,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3498,7 +3492,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | ------------------------------------------------- | ---- | ---- | --------------------------------------------- | | -------- | ------------------------------------------------- | ---- | ---- | --------------------------------------------- |
| deviceId | string | 是 | 否 | 表示远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 | | deviceId | string | 是 | 否 | 表示远端设备地址,例如:"XX:XX:XX:XX:XX:XX"。 |
| state | [ProfileConnectionState](#profileconnectionstate) | 是 | 是 | 表示BLE连接状态的枚举。 | | state | [ProfileConnectionState](#profileconnectionstate) | 是 | 是 | 表示BLE连接状态的枚举。 |
...@@ -3510,7 +3504,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3510,7 +3504,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| ------------------- | ---- | -------------- | | ------------------- | ---- | -------------- |
| STATE_DISCONNECTED | 0 | 表示profile已断连。 | | STATE_DISCONNECTED | 0 | 表示profile已断连。 |
| STATE_CONNECTING | 1 | 表示profile正在连接。 | | STATE_CONNECTING | 1 | 表示profile正在连接。 |
...@@ -3524,7 +3518,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3524,7 +3518,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ---------------------------------------- | ----------- | ---- | ---- | ------------------------------------------------------------ | | ---------------------------------------- | ----------- | ---- | ---- | ------------------------------------------------------------ |
| deviceId | string | 是 | 是 | 表示过滤的BLE设备地址,例如:"XX:XX:XX:XX:XX:XX"。 | | deviceId | string | 是 | 是 | 表示过滤的BLE设备地址,例如:"XX:XX:XX:XX:XX:XX"。 |
| name | string | 是 | 是 | 表示过滤的BLE设备名。 | | name | string | 是 | 是 | 表示过滤的BLE设备名。 |
...@@ -3545,7 +3539,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3545,7 +3539,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| --------- | ----------------------- | ---- | ---- | -------------------------------------- | | --------- | ----------------------- | ---- | ---- | -------------------------------------- |
| interval | number | 是 | 是 | 表示扫描结果上报延迟时间,默认值为0。 | | interval | number | 是 | 是 | 表示扫描结果上报延迟时间,默认值为0。 |
| dutyMode | [ScanDuty](#scanduty) | 是 | 是 | 表示扫描模式,默认值为SCAN_MODE_LOW_POWER。 | | dutyMode | [ScanDuty](#scanduty) | 是 | 是 | 表示扫描模式,默认值为SCAN_MODE_LOW_POWER。 |
...@@ -3558,7 +3552,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3558,7 +3552,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| --------------------- | ---- | ------------ | | --------------------- | ---- | ------------ |
| SCAN_MODE_LOW_POWER | 0 | 表示低功耗模式,默认值。 | | SCAN_MODE_LOW_POWER | 0 | 表示低功耗模式,默认值。 |
| SCAN_MODE_BALANCED | 1 | 表示均衡模式。 | | SCAN_MODE_BALANCED | 1 | 表示均衡模式。 |
...@@ -3571,7 +3565,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3571,7 +3565,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| --------------------- | ---- | ---------------------------------------- | | --------------------- | ---- | ---------------------------------------- |
| MATCH_MODE_AGGRESSIVE | 1 | 表示硬件上报扫描结果门限较低,比如扫描到的功率较低或者一段时间扫描到的次数较少也触发上报,默认值。 | | MATCH_MODE_AGGRESSIVE | 1 | 表示硬件上报扫描结果门限较低,比如扫描到的功率较低或者一段时间扫描到的次数较少也触发上报,默认值。 |
| MATCH_MODE_STICKY | 2 | 表示硬件上报扫描结果门限较高,更高的功率门限以及扫描到多次才会上报。 | | MATCH_MODE_STICKY | 2 | 表示硬件上报扫描结果门限较高,更高的功率门限以及扫描到多次才会上报。 |
...@@ -3583,7 +3577,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3583,7 +3577,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | ----------- | ---- | ---- | ---------------------------------- | | -------- | ----------- | ---- | ---- | ---------------------------------- |
| deviceId | string | 是 | 否 | 表示扫描到的设备地址,例如:"XX:XX:XX:XX:XX:XX"。 | | deviceId | string | 是 | 否 | 表示扫描到的设备地址,例如:"XX:XX:XX:XX:XX:XX"。 |
| rssi | number | 是 | 否 | 表示扫描到的设备的rssi值。 | | rssi | number | 是 | 否 | 表示扫描到的设备的rssi值。 |
...@@ -3596,7 +3590,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3596,7 +3590,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| --------------------- | ---- | ------------------ | | --------------------- | ---- | ------------------ |
| STATE_OFF | 0 | 表示蓝牙已关闭。 | | STATE_OFF | 0 | 表示蓝牙已关闭。 |
| STATE_TURNING_ON | 1 | 表示蓝牙正在打开。 | | STATE_TURNING_ON | 1 | 表示蓝牙正在打开。 |
...@@ -3613,7 +3607,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3613,7 +3607,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ----------- | ------- | ---- | ---- | ---------------------------------------- | | ----------- | ------- | ---- | ---- | ---------------------------------------- |
| interval | number | 是 | 是 | 表示广播间隔,最小值设置32个slot表示20ms,最大值设置16384个slot,默认值设置为1600个slot表示1s。 | | interval | number | 是 | 是 | 表示广播间隔,最小值设置32个slot表示20ms,最大值设置16384个slot,默认值设置为1600个slot表示1s。 |
| txPower | number | 是 | 是 | 表示发送功率,最小值设置-127,最大值设置1,默认值设置-7,单位dbm。 | | txPower | number | 是 | 是 | 表示发送功率,最小值设置-127,最大值设置1,默认值设置-7,单位dbm。 |
...@@ -3626,7 +3620,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3626,7 +3620,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ---------------------------------------- | ---- | ---- | --------------------------- | | --------------- | ---------------------------------------- | ---- | ---- | --------------------------- |
| serviceUuids | Array&lt;string&gt; | 是 | 是 | 表示要广播的服务&nbsp;UUID&nbsp;列表。 | | serviceUuids | Array&lt;string&gt; | 是 | 是 | 表示要广播的服务&nbsp;UUID&nbsp;列表。 |
| manufactureData | Array&lt;[ManufactureData](#manufacturedata)&gt; | 是 | 是 | 表示要广播的广播的制造商信息列表。 | | manufactureData | Array&lt;[ManufactureData](#manufacturedata)&gt; | 是 | 是 | 表示要广播的广播的制造商信息列表。 |
...@@ -3639,7 +3633,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3639,7 +3633,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ---------------- | ------------------- | ---- | ---- | ------------------ | | ---------------- | ------------------- | ---- | ---- | ------------------ |
| manufactureId | Array&lt;string&gt; | 是 | 是 | 表示制造商的ID,由蓝牙SIG分配。 | | manufactureId | Array&lt;string&gt; | 是 | 是 | 表示制造商的ID,由蓝牙SIG分配。 |
| manufactureValue | ArrayBuffer | 是 | 是 | 表示制造商发送的制造商数据。 | | manufactureValue | ArrayBuffer | 是 | 是 | 表示制造商发送的制造商数据。 |
...@@ -3651,7 +3645,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3651,7 +3645,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------ | ----------- | ---- | ---- | ---------- | | ------------ | ----------- | ---- | ---- | ---------- |
| serviceUuid | string | 是 | 是 | 表示服务的UUID。 | | serviceUuid | string | 是 | 是 | 表示服务的UUID。 |
| serviceValue | ArrayBuffer | 是 | 是 | 表示服务数据。 | | serviceValue | ArrayBuffer | 是 | 是 | 表示服务数据。 |
...@@ -3663,7 +3657,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3663,7 +3657,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | ------ | ---- | ---- | ----------- | | -------- | ------ | ---- | ---- | ----------- |
| deviceId | string | 是 | 否 | 表示要配对的设备ID。 | | deviceId | string | 是 | 否 | 表示要配对的设备ID。 |
| pinCode | string | 是 | 否 | 表示要配对的密钥。 | | pinCode | string | 是 | 否 | 表示要配对的密钥。 |
...@@ -3675,7 +3669,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3675,7 +3669,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | ------ | ---- | ---- | ----------- | | -------- | ------ | ---- | ---- | ----------- |
| deviceId | string | 是 | 否 | 表示要配对的设备ID。 | | deviceId | string | 是 | 否 | 表示要配对的设备ID。 |
| state | BondState | 是 | 否 | 表示配对设备的状态。 | | state | BondState | 是 | 否 | 表示配对设备的状态。 |
...@@ -3687,7 +3681,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3687,7 +3681,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | ------------------------------------------------- | ---- | ---- | ------------------------------- | | -------- | ------------------------------------------------- | ---- | ---- | ------------------------------- |
| deviceId | string | 是 | 否 | 表示蓝牙设备地址。 | | deviceId | string | 是 | 否 | 表示蓝牙设备地址。 |
| state | [ProfileConnectionState](#profileconnectionstate) | 是 | 否 | 表示蓝牙设备的profile连接状态。 | | state | [ProfileConnectionState](#profileconnectionstate) | 是 | 否 | 表示蓝牙设备的profile连接状态。 |
...@@ -3699,7 +3693,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3699,7 +3693,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ----------------------------------- | ---- | ---- | ---------------- | | --------------- | ----------------------------------- | ---- | ---- | ---------------- |
| majorClass | [MajorClass](#majorclass) | 是 | 否 | 表示蓝牙设备主要类别的枚举。 | | majorClass | [MajorClass](#majorclass) | 是 | 否 | 表示蓝牙设备主要类别的枚举。 |
| majorMinorClass | [MajorMinorClass](#majorminorclass) | 是 | 否 | 表示主要次要蓝牙设备类别的枚举。 | | majorMinorClass | [MajorMinorClass](#majorminorclass) | 是 | 否 | 表示主要次要蓝牙设备类别的枚举。 |
...@@ -3713,7 +3707,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3713,7 +3707,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| ------------------- | ------ | ---------- | | ------------------- | ------ | ---------- |
| MAJOR_MISC | 0x0000 | 表示杂项设备。 | | MAJOR_MISC | 0x0000 | 表示杂项设备。 |
| MAJOR_COMPUTER | 0x0100 | 表示计算机设备。 | | MAJOR_COMPUTER | 0x0100 | 表示计算机设备。 |
...@@ -3734,7 +3728,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3734,7 +3728,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| ---------------------------------------- | ------ | --------------- | | ---------------------------------------- | ------ | --------------- |
| COMPUTER_UNCATEGORIZED | 0x0100 | 表示未分类计算机设备。 | | COMPUTER_UNCATEGORIZED | 0x0100 | 表示未分类计算机设备。 |
| COMPUTER_DESKTOP | 0x0104 | 表示台式计算机设备。 | | COMPUTER_DESKTOP | 0x0104 | 表示台式计算机设备。 |
...@@ -3830,7 +3824,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3830,7 +3824,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| ----------------- | ------ | ------- | | ----------------- | ------ | ------- |
| STATE_NOT_PLAYING | 0x0000 | 表示未播放。 | | STATE_NOT_PLAYING | 0x0000 | 表示未播放。 |
| STATE_PLAYING | 0x0001 | 表示正在播放。 | | STATE_PLAYING | 0x0001 | 表示正在播放。 |
...@@ -3842,7 +3836,7 @@ let rssi = gattClient.getRssiValue().then((data) => { ...@@ -3842,7 +3836,7 @@ let rssi = gattClient.getRssiValue().then((data) => {
**系统能力**:SystemCapability.Communication.Bluetooth.Core。 **系统能力**:SystemCapability.Communication.Bluetooth.Core。
| 名称 | 默认值 | 说明 | | 名称 | 值 | 说明 |
| -------------------------------- | ------ | --------------- | | -------------------------------- | ------ | --------------- |
| PROFILE_A2DP_SOURCE | 0x0001 | 表示A2DP profile。 | | PROFILE_A2DP_SOURCE | 0x0001 | 表示A2DP profile。 |
| PROFILE_HANDS_FREE_AUDIO_GATEWAY | 0x0004 | 表示HFP profile。 | | PROFILE_HANDS_FREE_AUDIO_GATEWAY | 0x0004 | 表示HFP profile。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册