2 Command Mode and Data Mode

The RNBD451 module mainly operates in two modes:
  • Data mode (default)
  • Command mode
By default, the RNBD451 module operates in Data mode. In Data mode, the device advertises its presence to the nearby central devices. When the RNBD451 module establishes a connection with another Bluetooth Low Energy device, the devices stay in Data mode and act as a data pipe. Any serial data sent into the RNBD451 UART is transferred to the connected remote peer device over the air via transparent UART Bluetooth service. The received data from the remote peer device over the air via transparent UART connection is displayed via UART.

For configuration or control operation or both, set the RNBD451 module to Command mode. In Command mode, all UART data is treated as ASCII commands sent to the module’s UART interface.

The following figure illustrates the Command mode and Transparent UART Data mode. The RNBD451 module can enter and exit Command and Data mode using ASCII commands over UART or over UART mode switch pin (PB2).

To enter Command mode from Data mode, type the $$$ character sequence. The UART receives a CMD> prompt to notify the external host about the start of the Command mode. The Data mode escape character can change from $ to another character using S$ command.

To return to Data mode, enter command --- at the command prompt. The END message display indicates the end of the command console session.

In addition to using the ASCII Command mode escape character and the command --- to enter/exit Command mode, it is possible to use the UART mode switch I/O pin to do the same. This method is more suitable for applications where there is a need for the host MCU to enter and exit the Command mode.
Figure 2-1. Command Mode and Transparent UART (Data) Mode