3.3.4 RNBD Example1: Running Basic Data Exchange Example Application

Basic Data Exchange:
Table 3-10. 
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.

  1. Download and Install Phone Application for demonstration:
    1. Microchip Bluetooth Data by Microchip from the App Store or from Google Play Store.
  2. Launch the Phone Application

    Click on the 'BLE Smart' Sub Apps as shown below:
  3. The Application scans the area for Bluetooth devices within a range. Look for "RNBD" devices under the scanned list.
  4. On selecting the "RNBD" device from the list will be ready to connect with RNBD Module once you click on CONNECT Button
  5. Once connected, the Microchip Bluetooth App discovers all the services and characteristics supported by the RNBD451 device as shown in the following figure.
  6. Click the Microchip Data Service Option and Select the Microchip Data Characteristic and Write Notify Indication to receive the data in Mobile App.
  7. 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.

This is the END of the Basic Data Exchange Example