User's Manual

Default: N/A
Example: WW // Enter script input mode
3.3.7 Remote Command
3.3.7.1 Introduce RN4020 Remote Command Feature
RN4020 has the capability of execution AT-Command remotely from connected
devices. Remote command feature is built on top of MLDP, so it is prerequisite to
support MLDP before using remote command feature.
Remote command feature enable user to execute command on connected peer
device. The command is sent to the connected remote device, executed at the
remote device and the result is sent to local device. Since the UART output rate
usually is far higher than BLE transmission rate, if the output data (such as
command “H” or “LS” etc.) exceeds the buffer size (128 octets), local device may only
receive whatever stored in the buffer.
Remote command capability provides another way to enable stand-alone
implementation without host MCU for the remote device. A local device could use
remote command to get access to the remote device, access and control all its
analogue or digital I/O ports. All application logic could be performed locally
without remote device’s interferences. By this way, we could make the remote
device extremely easy and low cost.
3.3.7.2 !,<0,1>
Command “!” enables remote command feature. It is only effective under three
conditions:
Local and remote devices both support MLDP feature.
Enable Remote Command bit of the remote device is set by command “SR”.
Two devices have already connected.
Command “!” expects one parameter, either 1 or 0.
If the input parameter is 1, then remote command mode is enabled and device
enters remote command mode automatically and message “RMT_CMD” is sent from
the remote device to indicate start of remote command session.
To exit remote command mode, local device needs to get back to command mode by
setting pin GPIO4 to low, and then issue command “!,0”. Remote device then will exit
remote command mode and get back to local command mode.