3.1.11 RNBD Example1: Running Basic Data Exchange Example Application
Basic Data Exchange:
This example shows how an MCU can be programmed to transmit data
to a smart phone over BLE. Here the MCU device will send Periodic
Transmission of a single character when STREAM_OPEN is
processed through the Message Handler. This indicates to the MCU
& RNBD Module that the application is in a DATA STREAMING mode
of operation; and can expect to hear data over the BLE
connection. #define DEMO_PERIODIC_TRANSMIT_COUNT (10000) #define DEMO_PERIODIC_CHARACTER (‘1’) Are used in the example can be found #defined at the top of rnbd_example.c. |
- Download and Install Phone
Application for demonstration:
- Microchip Bluetooth Data by Microchip from the App Store or from Google Play Store.
- Launch the Phone
ApplicationClick on the 'BLE Smart' Sub Apps as shown below:
- The Application scans the area
for Bluetooth devices within a range. Look for "RNBD" devices under the scanned list.
- On selecting the "RNBD" device
from the list will be ready to connect with RNBD Module once you click on
CONNECT Button
- Once connected, the Microchip Bluetooth App discovers all the services and characteristics supported by the RNBD451 device as shown in the following figure.
- Click the Microchip Data Service Option and Select the Microchip Data Characteristic and Write Notify Indication to receive the data in Mobile App.
- Select Listen for
notifications on the application.
-
It may be required to "enable notification" access to the app on the phone.
Data will begin to Send at a Periodic Rate to the device.
Data will become visible beneath the Notify/Listen Toggle Option.
- Before
Enabling the Notify/Indicate Toggle Button:After Enabling the Notify/Indicate Toggle Button Mobile App can read the data 31(Hex Value) which was sent from RNBD Module.
- Before
Enabling the Notify/Indicate Toggle Button:
-
This is the END of the Basic Data Exchange Example