> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# my.readBLECharacteristicValue

> Read the value of a BLE device characteristic.

Reads the current value of a characteristic on a connected BLE device. The result is delivered via `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 |

## Success Callback Parameters

| Property       | Type   | Description                              |
| -------------- | ------ | ---------------------------------------- |
| characteristic | Object | Information of the device characteristic |

### Characteristic Object

| Property         | Type       | Description                        |
| ---------------- | ---------- | ---------------------------------- |
| characteristicId | String     | Characteristic UUID                |
| serviceId        | String     | Service UUID                       |
| value            | Hex String | The Bluetooth characteristic value |

## Code Example

```javascript theme={null}
// Register listener first
my.onBLECharacteristicValueChange((res) => {
  console.log('Value changed:', res.characteristicId, res.value);
});

// Then trigger a read
my.readBLECharacteristicValue({
  deviceId: 'XX:XX:XX:XX:XX:XX',
  serviceId: '0000FFF0-0000-1000-8000-00805F9B34FB',
  characteristicId: '0000FFF1-0000-1000-8000-00805F9B34FB',
  success: (res) => {
    console.log('Read request sent, characteristic:', res.characteristic);
  },
  fail: (err) => {
    console.error('Read failed:', err);
  }
});
```

<Info>
  Although the success callback includes a `characteristic` object, the authoritative value should be obtained by listening for `my.onBLECharacteristicValueChange`.
</Info>

## Related APIs

<CardGroup cols={2}>
  <Card title="my.writeBLECharacteristicValue" icon="arrow-up" href="/jsapi/device/bluetooth/my.writeBLECharacteristicValue">
    Write a characteristic value
  </Card>

  <Card title="my.onBLECharacteristicValueChange" icon="bell" href="/jsapi/device/bluetooth/my.onBLECharacteristicValueChange">
    Listen for value changes
  </Card>
</CardGroup>
