Bluetooth Demonstrations > BM64 and BM71 Driver Demonstrations > ble_comm > Running the Demonstration
MPLAB Harmony Bluetooth Help
Running the Demonstration
 
Important! 
Prior to using this demonstration, it is recommended to review the MPLAB Harmony 3 Release Notes for
any known issues. 

 

 

Projects using a Pushbutton LED User interface and BM64:

Do the following to run the demonstration:

  1. If you have not already done so, use the BM64_bootloader application to give the BM64 module a unique device name.

  1. Compile, download, and run the program on the target device. While compiling, select the appropriate MPLAB X IDE project. Refer to Building the Application for details.
  2. After the program starts, the (first) user LED will start blinking slowly (advertising).
  3. The mobile application, BLE Scanner, by Bluepixel Technologies LLP, is used in this demonstration. This application is available as a free download from iTunes. Locate and download this application to your smartphone.

 
Note: 
If you are unable find this application for your smartphone, there are several other BLE scanner applications available for the iPhone, which can be used with this MPLAB Harmony application. The functionality will be the same, but the screens may appear somewhat different from those shown here. 
  1. Start the BLE Scanner app. Once opened, it will begin scanning for BLE devices. If there are so many in the list that it is difficult to find your device, click on the icon in the top left corner (three horizontal lines) and then click on Filter to set up a filter. You will need to exit the app and restart it for the filter to take effect.

  1. Select the device name that you set up for your BM64 in Step 1 (running the BM64_bootloader program) and tap Connect. LED1 on the SAM E70 Xplained Ultra board should go off.
  2. A list of services is displayed.

  1. Select the service named CUSTOM SERVICE, with the UUID starting with 4953 and ending in E455. This service matches the Transparent Service UUID set up in the BLE section of the UI tool.

  1. A list of characteristics are displayed.

  1. If necessary, scroll down and tap the characteristic labeled Notify. Tap the Updating ? icon to the right, which will display the following screen (ensure that the slider switch to the right of Notify is enabled (set to the right position). Tap the white less than (<) symbol in the upper left corner of the screen to return to the previous screen).

  1. On the development board, press the push button SW1 (SW0 on some boards).
  2. The text string 'Button pressed' should appear on your smartphone:

  1. To send a text string from your smartphone back to the BM64, tap Write in the BLE Scanner screen:

  1. On the next screen, tap Write Value:

  1. When the popup appears, tap Text.

  1. Enter the text 'LED On', and then tap Write.
  2. LED1 on the SAM E70 Xplained Ultra board should go on.
  3. Likewise, if you type 'LED Off", LED1 on the SAM E70 Xplained Ultra board should go off.

 

Projects using a Pushbutton LED User interface and BM71:

Do the following to run the demonstration:

  1. Compile, download, and run the program on the target device. While compiling, select the appropriate MPLAB X IDE project. Refer to Building the Application for details.
  2. After the program starts, the user LED1 (or LED0) will start blinking slowly (advertising).
  3. The mobile application, SmartData, Version 1.1 by Microchip Technology Inc, is used in this demonstration. This application is available as a free download from iTunes. Locate and download this application to your smartphone.

  1. Start the SmartData app. Once opened, it will begin scanning for BLE devices.

  1. Double-click on the device name TransparentUARTDemo. User LED1 (or LED0) on the development board should go off.
  2. The following screen is displayed:

  1. On the development board, press the user push button SW1 (or SW0).
  2. The text string 'Button pressed' should appear on your smartphone:

  1. To send a text string from your smartphone back to the BM71, Enter the text 'LED On', and then tap Send.

  1. User LED1 (or LED0) on the development board should go on.
  2. Likewise, if you write 'LED Off" and tap Send, LED1 (or LED0) on the development board should go off.

 

Project using a Graphical User Interface:

Do the following to run the demonstration:

  1. If you have not already done so, use the BM64_bootloader application to give the BM64 module a unique device name.

  1. Compile the program using MPLAB X, and program the target device using the EDBG interface. While compiling, select the appropriate MPLAB X IDE project. Refer to Building the Application for details.
  2. Program the target device, and run the application. Initially, a white connection icon will be displayed in the upper right-hand corner of the screen, indicating the program is waiting for a connection:

  1. The mobile application, BLE Scanner, by Bluepixel Technologies LLP, is used in this demonstration. This application is available as a free download from iTunes. Locate and download this application to your smartphone.

 
Note: 
If you are unable find this application for your smartphone, there are several other BLE scanner applications available for the iPhone, which can be used with this MPLAB Harmony application. The functionality will be the same, but the screens may appear somewhat different from those shown here. 
  1. Start the BLE Scanner app. Once opened, it will begin scanning for BLE devices.

  1. Select the device name that you set up for your BM64 in Step 1 (running the BM64_bootloader program) and tap Connect.The connection icon on the display will change from white to blue, and a Send Message button will appear on the screen:

  1. A list of services is displayed.

  1. Select the service named CUSTOM SERVICE, with the UUID starting with 4953 and ending in E455. This service matches the Transparent Service UUID set up in the BLE section of the UI tool.

  1. A list of characteristics are displayed.

  1. If necessary, scroll down and tap the characteristic labeled Notify. Tap the Updating ? icon to the right, which will display the following screen (ensure that the slider switch to the right of Notify is enabled (set to the right position). Tap the white less than (<) symbol in the upper left corner of the screen to return to the previous screen).

  1. On the display, press on the button marked Send Message..
  2. The text string 'Button pressed' should appear on your smartphone:

  1. To send a text string from your smartphone back to the BM64, tap Write in the BLE Scanner screen:

  1. On the next screen, tap Write Value:

  1. When the popup appears, tap Text.

  1. Enter some text, e.g. "Sending from iPhone", and then tap Write.
  2. The text you entered should be displaed on the screen:

Additional messages will cause the previous ones to be scrolled.