Running Multilink-Multirole Demo

This section provides the detailed procedure to run the Multilink-Multirole demo with one GAP-Peripheral and one GAP-Central device. In this demo, the Multilink-Multirole device plays both GAP-Central and GAP-Peripheral roles. First, the device plays a GAP-Central role, and it scans and connects with the remote GAP-Peripheral device. Once connected, the Multilink-Multirole device plays a GAP-Peripheral role and starts advertising and further accepts connection from the remote GAP-Central device.
  1. 1.Connect the device with the GAP-Peripheral configuration flashed into the BM70/71 device. For more details, refer to Base Configuration. For serial console configuration, refer to Serial Console Setup.
  2. 2.Ensure that POWER LED (green) on SAML21 Xplained Pro board is solid ON.
  3. 3.Press the Reset button on the SAML21 Xplained Pro board and verify that LD4 (blue) on BM70/71-Xplained Pro is blinking at a regular interval.
  4. 4.Ensure that the Multilink-Multirole device is scanning. Check the Tera Term window for a Scan started message as illustrated in the following figure.
    Figure 1. Multilink Device Scanning
  5. 5.Prepare the GAP-Peripheral device to connect with the Multilink-Multirole device. For more details, refer to Running the GAP-Peripheral Demo with Microchip Bluetooth Data App.
  6. 6.Ensure that the GAP-Peripheral device is advertising. Check the Tera Term window for an Adv started message as illustrated in the following image.
    Figure 2. GAP-Peripheral Device Advertising
  7. 7.The Multilink-Multirole device that is currently scanning initiates a connection with the GAP-Peripheral device if it discovers a GAP-Peripheral device and if the advertising parameter matches its requirement as illustrated in the following figure.
    Figure 3. Multilink-Multirole and GAP-Peripheral Device Connection
  8. 8.Once connected, the Multilink-Multirole device initiates service discovery and looks for the device orientation service. On discovering the device orientation service and its characteristics, the Multilink-Multirole device enables notifications on the accelerometer and gyroscope sensor characteristics as illustrated in the following figure.
    Figure 4. Notifications Status of Accelerometer and Gyroscope Sensor
  9. 9.At this stage, the Multilink-Multirole device starts advertising and the remote GAP-Central device connects with the Multilink-Multirole device. Once the accelerometer and gyroscope sensor characteristics notifications are enabled, the GAP-Peripheral device starts sending accelerometer and gyroscope sensor data.
    Figure 5. Accelerometer and Gyroscope Sensor Data
  10. 10.Upon receiving sensor data notifications, the Multilink-Multirole device prints them on the serial console.
    Figure 6. Sensor Data Notifications – On Serial Console
  11. 11.Connect the GAP-Central device and configure the serial console. For more details, refer to the Serial Console Setup.
  12. 12.Ensure that POWER LED (green) on the SAML21 Xplained Pro board is solid ON.
  13. 13.Press the Reset button on the SAML21 Xplained Pro board and verify that LD4 (blue) on BM70/71-Xplained Pro is blinking at a regular interval.
  14. 14.Ensure that the GAP-Central device is scanning. Check the Tera Term window for a Scan started message as illustrated in the following figure.
    Figure 7. GAP-Central Device Scanning
  15. 15.The GAP-Central device, which is currently scanning, initiates a connection with the Multilink-Multirole device if it discovers a Multilink-Multirole device and if the advertising parameter matches its requirement as illustrated in the following figure.
    Figure 8. GAP-Central Device and Multilink-Multirole Device Connection
  16. 16.Once connected, the GAP-Central device initiates service discovery and looks for the device orientation service. On discovering the device orientation service and its characteristics of the Multilink-Multirole device, the GAP-Central device enables notifications from the accelerometer and gyroscope sensor characteristics as illustrated in the following figure.
    Figure 9. Notifications Status of Accelerometer and Gyroscope Sensor
  17. 17.Once the accelerometer and gyroscope notifications are enabled, the Multilink-Multirole device starts sending accelerometer and gyroscope sensor data as illustrated in the following figure.
    Figure 10. Multilink Multirole Device Sending Accelerometer and Gyroscope Sensor Data
  18. 18.Upon receiving sensor data notifications, the GAP-Central device prints them on the serial console.
    Figure 11. GAP-Central Device Printing Received Sensor Data
    Note: In this demo, the GAP-Central device can be replaced by the Microchip Bluetooth Data App.