Rn-42 flow control, Rn-42 connection status, Rn-42 flow control rn-42 connection status – ThingMagic Mercury xPRESS Platform v1.7 User Manual
Page 45
![background image](/manuals/640734/45/background.png)
Bluetooth Module
A D I V I S I O N O F T R I M B L E
Using the Optional Modules
45
Wait for "Reboot!\r\n%REBOOT"
RN-42 Flow Control
If data is sent faster than the channel can keep up, the RN-42 has hardware flow control
to prevent buffer overflow.
According to the RN-41/RN-42 datasheet,
UART_RTS, goes high to disable host transmitter
So the application should monitor the state of the RN-42’s UART_RTS pin and hold off
when it goes high.
Conversely, the RN-42 listens on UART_CTS. If you set it high, the RN-42 will refrain
from transmitting further.
RN-42 Connection Status
The RN-42 sets Pin GPIO2 high when it is connected to another Bluetooth device. This is
important because it means you should not try to send commands to its UART. If
connected, any text you send will pass straight through to the Bluetooth device on the
other side.
If GPIO2 is not connected to the system, you can try sending the command mode escape
sequence ("$$$" embedded in 1 second of silence.) If the module responds "CMD\r\n",
you have successfully entered command mode (therefore the module is not connected to
another Bluetooth device.) If you don’t get the expected response, the module is
connected, and we have sent a spurious "$$$", but that’s still better than sending an
entire sequence of commands.