User's Manual

so they will stay low if not pull high). Then try to disable notification on Battery
Level by either of following commands:
CHW,001B,0000
CUWC,2A19,0
On Module A, status change should be notified to the host. However, Module A
currently is in MLDP mode, only output MLDP data to the UART. Instead, GPIO 6 will
be set high (Red LED lights up on RN4020 EVB board) to indicate status message
pending to output. Once GPIO 4 is put to be low to enter command mode, the status
message will be output to the UART. Maximum status message that could be hold is
256 octets.
4.4 Demonstration of RN4020 Scripting Capability
In this section, a step-by-step guide is provided to demo the capability of scripting
on RN4020.
4.4.1 Setting up Private Service and Characteristics
Scripting function is best to work with private service and characteristics. The main
input/output peripherals in scripting are analogue or digital ports. Public services
and characteristics pre-defined data format that may not always work with the
reading or outputting of RN4020 ports. Private service and characteristics, on the
other hand, could define data format freely, therefore, peer device of the BLE
connection is able to take over data interpolation functionality without evolvement
of device that runs scripts.
Following AT commands over UART set up the private service and characteristics
+ // Echo on
SF,1 // Factory Reset
SS,00000001 // Enable private service
SR,4000 // Enable buffer read
PZ // Clean private Service
PS,123456789012345678901234567890FF // Set private service uuid
PC,12345678901234567890123456789011,12,02 // Set private characteristic to
be readable, notifiable and 2 octets in length
PC,12345678901234567890123456789022,02,02 // Set private characteristic to
be readable and 2 octets in length
R,1 // Reboot
After rebooting, we could use command “LS” to check the server characteristics: