2016 Microchip Technology Inc. DS50002466A-page 21
2.4.16 SGA,<0-5>/SGC,<0-5>
Command SGA and SGC adjust the output power of RN4870/71 under advertisement
and connected state, respectively. These commands expect a single digit as input
parameter which can range from 0 to 5, where 0 represents highest power output and
5 lowest power output.
2.4.17
SM,<1-3>,<hex16>
This command starts one of the application timers. Timers are used by the embedded
scripting features. For more details on scripting, refer to Chapter 3. “Embedded
Scripting Feature”.
The first parameter is the timer identifier, specifying one of the three available timers.
The second parameter is expiration time. If the second parameter is zero, then the timer
specified in the first parameter is canceled. Unit value for timer 1 is 640 ms, while for
timers 2 and 3 are 10 ms. This is the only Set command that does not save parameter
in NVM and becomes effective immediately.
2.4.18
SN,<text>
This command sets the device name, where <text> is up to 20 alphanumeric
characters.
2.4.19 SO,<0,1>
Command SO enables or disables low-power operation of RN4870/71. It expects one
single digit as input parameter.
If the input parameter is 0, then RN4870/71 runs 16 MHz clock all the time, therefore,
can operate UART all the time. On the other hand, if the input parameter is 1, then
RN4870 enables Low-Power mode by running 32 kHz clock with much lower power
consumption. When RN4870 runs on 32 kHz clock, UART is not operational.
RN4870/71 restarts 16 MHz clock by pulling UART_RX_IND pin low. When UART_RX-
_IND pin is high, RN4870/71 runs 32 kHz clock. When RN4870/71 runs on 32 kHz
clock, a BLE connection can still be maintained, but UART cannot receive data. If the
user sends input data to the UART, UART_RX_IND pin must be pulled low to start 16
MHz clock, then wait for 5 ms before UART can be operated.
Default: 0
Example: SGA,5 // Set advertisement RF output power to lowest
Response: AOK
ERR
// Success
// Syntax error or invalid parameter
Example: SM,1,000E // Start the timer 1 to expire in about 9 seconds
SM,1,0000 // Stop timer 1 immediately
SM,3,0100 // start timer 3 to expire in about 2.5 seconds
Response: AOK
ERR
// Success
// Syntax error or invalid parameter
Example: SN,MyDevice // Set the device name to “MyDevice”
Response: AOK
ERR
// Success
// Syntax error or invalid parameter
Default: 0
Example: SO,1 // Set RN4870/71 to be able to operate under deep sleep
Response: AOK
ERR
// Success
// Syntax error or invalid parameter