5.4.4.5 List Remote Services (LC[,<P,UUID>])
Format:
LC[,<P,hex16>]
Command LC
lists the available remote GATT server services and their
characteristics that are printed in multiple lines of text in an easy-to-read and
easy-to-parse format. The output ends with keyword END
. The services
and their characteristics are only available under three conditions:
- An active connection exists.
- Peer device supports server role services.
- RNBD451 module issues command
CI
before initiating client role service.
As an alternative, the command LC
takes one input parameter. If the
input parameter is letter P
, then only print out the UUID of all
services.
If the input parameter is the UUID of the service that is either a 16-bit UUID for public service or a 128-bit UUID for private service, the indicated service and all its characteristics are printed out.
If there is no input parameter, then print out all the services and their characteristics.
LC
has the following format:- The first line is the primary service UUID.
- The second line starts with two spaces followed by the characteristic UUID, handle, characteristic property, and for the characteristic configuration handle, current configuration settings.
- The property for the characteristic value follows the definition listed in Table 9-1. The property for the characteristic value must clear bit 4 and bit 5 (no notification or indication), whereas, the property for the characteristic configuration must have either bit 4 or bit 5 set.
- The following table provides details about the Battery Service (BAS) printout as an example. 0x180F in the first line is UUID for battery service.
- The second line illustrates that battery level UUID is 0x2A19, its handle 0x001A and property 0x02 (Readable, a value handle). For more information, see Table 9-1.
- The third line shows the battery level client characteristic configuration descriptor with UUID 0x2A19, its handle 0x001B, property 0x10 (notify, a configuration handle) and current configuration value 0 (notification is yet to start).
Example: | LC
|
// List all client services |
Response: |
|