RN4870/71 Bluetooth
®
Low Energy Module User’s Guide
DS50002466A-page 16 2016 Microchip Technology Inc.
Most Set commands have a corresponding Get command to retrieve and output the
current configurations via the UART. Get commands have the same command
identifiers as Set commands but without parameters.
2.4 SET COMMANDS
2.4.1 S-,<string>
This command sets a serialized Bluetooth name for the device, where <string> is up to
15 alphanumeric characters. This command automatically appends the last two bytes
of the Bluetooth MAC address to the name which is useful for generating a custom
name with unique numbering.This command does not have corresponding get com-
mand.
2.4.2
S$,<char>
This command sets the Command mode character, where <char> is a single character
in the three character pattern. This setting enables the user to change the default char-
acter to enter Command mode ($$$) to another character string. Restoring the factory
defaults returns the device to use $$$.
2.4.3
S%,<pre>,<post>
This command sets the pre and post delimiter of the status string from RN4870/71 to
the host controller. The pre and post delimiter are up to four printable ASCII characters.
If no parameter is given to the post delimiter, then the post delimiter is cleared; if no
parameter is given to the pre-delimiter, then both pre and post delimiters are cleared.
TABLE 2-1: SET AND GET COMMANDS SYNTAX FORMAT
Command
Type
Command ID Delimiter Parameter(s)
End of
Command
Example
S Command Identifier , Input Parameter <CR> SN,DeviceName // Set device name
G Command Identifier <CR> GN // Get device name
Default: N/A
Example: S-,MyDevice // Set device name to “MyDevice_XXXX”
Response: AOK
ERR
// Success
// Syntax error or invalid parameter
Default: $
Example: S$,# // Set ### as string to enter Command mode
Response: AOK
ERR
// Success
// Syntax error or invalid parameter
Default: %
Example: S%,<$,#> // Set pre delimiter to <$ and post delimiter to #>
// When the output status string is Reboot instead
// of %REBOOT%, the output is <$REBOOT#>
Response: AOK
ERR
// Success
// Syntax error or invalid parameter