my.onBLECharacteristicValueChange.
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| deviceId | String | Yes | Device identifier |
| serviceId | String | Yes | Service UUID |
| characteristicId | String | Yes | Characteristic UUID |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
Code Example
The characteristic value is not returned directly in the success callback. Listen for
my.onBLECharacteristicValueChange to receive the result.Related APIs
my.writeBLECharacteristicValue
Write a characteristic value
my.onBLECharacteristicValueChange
Listen for value changes