RN4870/71 PICtail™/PICtail Plus Daughter Board User’s Guide
DS50002547A-page 32
2016 Microchip Technology Inc.
4.4
TRANSFERRING SENSOR DATA INTO GATT SERVICE USING SCRIPTING
For more information about the Sensor Board GATT service, refer to
Section 4.3 “Sensor Board GATT Service”
. To populate the characteristics with data
from the Sensor Board peripherals, and conversely transfer values received from the
GAP client into peripheral IO channels, the RN4870/71 scripting feature is used. For
more details on the scripting capabilities, refer to the
“ Bluetooth
®
Low Energy Module
User’s Guide”
(DS50002466).
The script that drives the peripheral values to and from the GATT service is written into
the Non-Volatile Memory (NVM) of the RN4870/71 via the UART.
First, put the module into Script Entry mode. The script is a series of text commands
separated by carriage returns. The actual script is displayed in
. It can be copied to the clipboard and pasted in UART using TeraTerm.
Similarly, the PC Utility can load it into RN4870.
To load the Sensor board script manually, perform the following steps:
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 ECHO.
2. Enter Script Entry mode
a) Enter command
WW
to put the RN4870 module into Script Entry mode. This
command does
not
return an
AOK
response.
b) Copy the script text from
Section D.1.3 “Sensor Board Script”
into the clip-
board using <Ctrl+C>.
c) Paste the script from TeraTerm using the <Alt+R> (Paste) command. A dia-
log window showing the script text from the clipboard is displayed as shown
in
FIGURE 4-3:
SENSOR BOARD SCRIPT DISPLAYED FROM CLIPBOARD
d) Press
OK
to load the script into the RN4870.
e) After the script is pasted into the RN4870, exit Script Entry mode by pressing
the <ESC> key. An
AOK
response is sent to the terminal. The script entry is
shown in
.