This tutorial takes you through the steps needed to establish a Transparent UART connection using the Bluetooth Smart Data (SmartData) App.
Make sure the following connections on the RN4870 PICtail are enabled.
Enable Transparent Service
Enter the following commands into your CoolTerm window:
$ // Enter Command Mode + // Turn Local Echo on SS,C0 // Support Device Info and UART Transparent services R,1 // Reboot device for configuration to take effect
Launch the Smart Data App
After you open the Smart Data app on your smartphone, it will immediately scan for Bluetooth devices nearby. The default name for the RN4870 module (RN_BLE) should show up. Tap on it to connect to your RN4870 module.
On the CoolTerm window you will see the status message, %CONNECT,1,<MAC>%, returned by the RN4870 UART, indicating a connection has been established. The <MAC> address is the address of the remote device that initiated the connection. Next to it, you will also see the %STREAM_OPEN% indicating that the UART Transparent data pipe has been established. Once connected to another device, the RN4870/71 automatically enters Data Mode if the UART Transparent feature is enabled.
Another message you might see is the %CONN_PARAM,<Interval>,<Latency>,<Timeout>% status message. This shows the connection interval, slave latency and supervision timeout parameters for the existing connection.
You can now start exchanging data. Once you have typed your message on the app (Hello World!), press the Send button to transfer data from SmartData App to the RN4870 module which is received and printed on the serial terminal of the RN4870 UART (CoolTerm window).
Type another message into the serial terminal of the RN4870 (How are you?) and you will see it is received and printed on the receive view of the SmartData app.
In this lab you:
- Added the Transparent UART Service to your RN4870 module
- Sent and received data using Microchip's Transparent UART Service