RN4870/71 Bluetooth
®
Low Energy Module User’s Guide
DS50002466A-page 42 2016 Microchip Technology Inc.
2.8.2 PS,<hex16/hex128>
Command PS sets the UUID of the public or the private service. This command must
be called before command PC.
The effect of command PS can be verified after a valid PC command and after power
cycle.
Command PS expects one parameter that is either a 16-bit UUID for public service or
a 128-bit UUID for private service.
2.8.3
PZ
Command PZ clears all settings of services and characteristics. A power cycle is
required afterwards to make the changes effective.
2.8.4
Defining Multiple Services
If multiple services are defined, perform the following steps:
1. Use command PZ to clear any previous defined services
2. Use command PS to set the UUID for the first service
3. Use one or more command PC to add one characteristic at a time to the first ser-
vice
4. Use command PS to set the UUID for the second service
5. Use one or more command PC to add one characteristic at a time to the second
service
6. Repeat step 4 and step 5 to define more services if necessary
Example: PS,010203040506070809000A0B0C0D0E0F
// Define a private service with UUID
// 0x010203040506070809000A0B0C0D0E0F
Response: AOK
ERR
// Success
// Syntax error, invalid parameter or not enough space
// to add another service
Example: PZ // Clear all private service and characteristics
// settings
Response: AOK // Success