RN4870/71 PICtail™/PICtail Plus Daughter Board User’s Guide
DS50002547A-page 24
2016 Microchip Technology Inc.
FIGURE 3-9:
CONNECTED STATUS MESSAGE
3.5
CREATING CUSTOM GATT SERVICES
The RN4870/71 module supports custom (or private) GATT services. Public GATT ser-
vices are defined by specifications published by the Bluetooth Special Interest Group
(SIG). Private GATT services are defined by the user to host information stored in the
GATT characteristics. For more information on GATT services, refer to
C. “Bluetooth Low Energy Primer”
.
To create a private GATT service, enter the configuration commands listed in Step 3.
The commands can be entered as shown in this user guide, or copied from configura-
tion files and pasted into the terminal emulator. The cut and paste method saves time
and minimizes keyboard entry errors. The configuration text files are included in the
RN4870 Sensor board Support package that can be downloaded from the product web
page at
.
1. Connect the RN4870 PICtail to the host PC USB port
a) Using Terminal Emulator, open the COM port to the RN4870/71 module
b) Type
$$$
to enter Command mode
c) Enter
+
to turn on ECHO
2. Set Factory Default values
a) Enter
SF,1
b) Verify that the module reboots after the command is entered
3. Create the private GATT service with three characteristics by entering the
following commands:
PS,4D6963726F636869702D524E34383730
PC,BF3FBD80063F11E59E690002A5D5C501,02,02
PC,BF3FBD80063F11E59E690002A5D5C502,02,02
PC,BF3FBD80063F11E59E690002A5D5C503,18,04
These commands can be entered manually by typing each line followed by the
<Enter> key from the file
3.4-GATT-service.txt
, or each line copied and
pasted one by one into the terminal emulator.
Command
PS
creates the GATT service, identified by the 16-byte value private
UUID:
4D6963726F636869702D524E34383730
. This command must be
called before command
PC
.
Command
PC
sets the private characteristics. Each characteristic is identified by
the following UUIDs:
BF3FBD80063F11E59E690002A5D5C501,
BF3FBD80063F11E59E690002A5D5C502,
BF3FBD80063F11E59E690002A5D5C503.