Parameters
Success Callback Parameters
Characteristic Object
Code Example
Related APIs
my.getBLEDeviceServices
Get device services
my.readBLECharacteristicValue
Read a characteristic value
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get the characteristic list of a BLE device service.
| Property | Type | Required | Description |
|---|---|---|---|
| deviceId | String | Yes | Device identifier |
| serviceId | String | Yes | Service UUID |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
| Property | Type | Description |
|---|---|---|
| characteristics | Array | List of characteristic objects |
| Property | Type | Description |
|---|---|---|
| characteristicId | String | Characteristic UUID |
| serviceId | String | Parent service UUID |
| value | Hex String | Hexadecimal value of the characteristic |
| properties | Object | Supported operations: read, write, notify, indicate |
my.getBLEDeviceCharacteristics({
deviceId: 'XX:XX:XX:XX:XX:XX',
serviceId: '0000FFF0-0000-1000-8000-00805F9B34FB',
success: (res) => {
res.characteristics.forEach((char) => {
console.log('Characteristic:', char.characteristicId);
console.log('Can read:', char.properties.read);
console.log('Can notify:', char.properties.notify);
});
},
fail: (err) => {
console.error('Failed:', err);
}
});