2016 Microchip Technology Inc.
DS50002547A-page 29
RN4870/71 PICtail™/PICtail PLUS
DAUGHTER BOARD USER’S GUIDE
Chapter 4. RN4870 Sensor Board
4.1
OVERVIEW
The RN4870 must be configured to enable the Sensor Board peripherals, and to
enable the BLESensor App to communicate with the RN4870. The following is the con-
figuration procedure:
1. Configure Peripheral IO port to sensors using command
SW.
2. Define a GATT service (Sensor board) to hold the values from peripherals for a
read access from a (GATT) client.
3. Similarly, when a GATT client writes a value to a GATT characteristic in a periph-
eral, there must be a method for the peripheral to write the value destined for
characteristic into the peripheral port.
4. A GATT client on a Central (GAP) device is used to access the GATT character-
istics in the peripheral which is an RN4870 with Sensor board. The GATT client
for the Sensor board is an smartphone app named BLESensorApp. It is possible
to use another RN4870 as the GATT client to access the RN4870 Sensor Board
peripherals.
The critical function of associating GATT characteristic with a peripheral is performed
by the RN4870 scripting capability.
The RN4870 can be configured manually by following the instructions in
through
Section 4.5
. Alternatively, the RN4870 can also be configured by using the PC
Utility (
RN4870_SensorBoard_Cfg_Cmd.exe
) as described in
Section 4.6 “Provision Utility”
4.2
CONFIGURING THE RN4870 MODULE SETTINGS
The Sensor board can be configured by entering the following commands manually.
Alternatively, the configuration commands are located in
. Each command can be copied to the clipboard via
<CTRL+C> and sent to the RN4870 via TeraTerm using the <ALT+R> (Paste)
command.
1. Connect the RN4870 PICtail to the host PC USB port
a) Using Terminal Emulator, open the COM port to the RN4870 module
b) Type
$$$
to enter Command mode
c) Enter
+
to turn on local echo
d) Enter
WP
to stop any running script
e) Enter
WC
to clear any previous script
f)
Enter
PZ
to clear any previous user defined GATT service
g) Enter
SF,1
to set the module into factory default and verify that the module
reboots after the command is entered.
h) Type
$$$
to re-enter Command mode
i)
Enter
+
to turn on local echo