5.4.3.5 List Customized Service (LS[,<P,UUID>])
Format:
LS[,<P,UUID>]
Command LS
lists the locally-defined server services and their
characteristics in multiple lines of text in an easy-to-read and easy-to-parse format.
All list commands end their output with the keyword END
.
As an alternative, the command LS
takes one input parameter. If the input
parameter is letter P, then only the UUIDs of all the services are printed out.
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 all the customized services and their characteristics are printed out.
The output format of command LS
is very similar to that of command
LC
:
- 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 characteristics configuration handle, current configuration settings.
- The property for 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 characteristics configuration must set to either bit 4 or bit 5.
- The characteristic configuration shows the
notification/indication status. Value ‘
0
’ means notification/indication has not started yet. Value ‘1
’ means the start of the notification started and value2
means the start of the indication.
Example: | LS
|
// Display all server services |
Listing Services and its Characteristics on GATT Server:
180F
2A19, 001A, 02
2A19, 001B, 10, 0