ble gatt - GATT-level BLE Tests
Perform GATT-level BLE interactions with the DUT.
Usage:
- command: ble gatt connect addr:<address> [<timeout> [<minRSSI>]]
[retry: <retryCount>]
- command: ble gatt connect name:<name> [<timeout> [<minRSSI>]]
[retry: <retryCount>]
- command: ble gatt disconnect
[retry: <retryCount>]
- command: ble gatt discover
[retry: <retryCount>]
- command: ble gatt match char:<charUUID> <matchHex>
[retry: <retryCount>]
- command: ble gatt read char:<charUUID> <matchHex>
[retry: <retryCount>]
- command: ble gatt sub char:<charUUID>
[retry: <retryCount>]
- command: ble gatt write char:<charUUID> <valueHex>
[retry: <retryCount>]
Argument |
Description |
|---|---|
name |
GAP name advertised by the DUT, given as |
address |
DUT’s BLE MAC address ( |
timeout |
Connect timeout, in seconds (default: 5s). |
minRSSI |
Minimum RSSI, in dBm, required to accept an advertisement during connect (optional; default: no filtering). |
|
Connect to the GATT peripheral, by address or by advertised name. |
|
Disconnect from the GATT peripheral. Succeeds (result |
|
Discover GATT services and characteristics on the connected peripheral. Fails if no services are found. |
|
Poll a characteristic, waiting up to matchTimeout for its value to equal
matchHex. Does not require a prior |
|
Read a GATT characteristic’s current value. |
|
Subscribe to notifications from a GATT characteristic. |
|
Write to a GATT characteristic. |
charUUID |
Characteristic UUID (16-bit short form or full 128-bit UUID), given as |
matchHex |
For |
matchTimeout |
Timeout, in seconds, for |
valueHex |
Hex-encoded bytes to write to the characteristic. |
retryCount |
Number of times to retry the test step (optional) |
match accepts an optional timeout as a third argument
(ble gatt match char:<charUUID> <matchHex> [<matchTimeout>]); connect accepts optional timeout
and minRSSI as shown above.
Examples
Note
Using the ble gatt command on a PLT-300A requires a supported
BLE test dongle.
Note
Use ble gatt to exercise the DUT’s application-level BLE stack (GATT services and
characteristics). This is a way to perform a functional test of a product’s BLE
features. Use ble test for RF-only, link-layer transmitter/receiver tests (no GATT
involved), and bledis for a simple presence/discovery check without reading or
writing any characteristic.