SWRU580 April   2021 CC2564C , CC2564MODA , CC2564MODN

 

  1.   Trademarks
  2. Introduction
  3. A2DP (AUD) Demo Guide
    1. 2.1 Demo Overview
    2. 2.2 Demo Application
    3. 2.3 Application Commands
  4. A3DP Sink Demo Guide
    1. 3.1 Demo Overview
    2. 3.2 Demo Application
    3. 3.3 Sink Reference Board Demo Application
    4. 3.4 Multiple Source Demo
    5. 3.5 Application Commands
  5. A3DP Source Demo Guide
    1. 4.1 Demo Overview
    2. 4.2 Demo Application
    3. 4.3 Application Commands
  6. HFP Demo Guide
    1. 5.1 Demo Overview
    2. 5.2 Demo Application
    3. 5.3 Application Commands
  7. HFP Audio Gateway Demo Guide
    1. 6.1 Demo Overview
    2. 6.2 Demo Application
    3. 6.3 Application Commands
  8. HID Demo Guide
    1. 7.1 Demo Overview
    2. 7.2 Demo Application
    3. 7.3 Application Commands
  9. HSP Demo Guide
    1. 8.1 Demo Overview
    2. 8.2 Demo Application
    3. 8.3 Application Command
  10. Map Demo Guide
    1. 9.1 Demo Overview
    2. 9.2 Demo Application
    3. 9.3 Application Command
  11. 10PBAP Demo Guide
    1. 10.1 Demo Overview
    2. 10.2 Demo Application
    3. 10.3 Application Commands
  12. 11SPP Demo Guide
    1. 11.1 Demo Overview
    2. 11.2 Demo Application
    3. 11.3 Application Commands
  13. 12SPPLE Demo Guide
    1. 12.1 Demo Overview
    2. 12.2 Demo Application
    3. 12.3 Demonstrating SPP LE on an iOS Device with the LightBlue App
    4. 12.4 Demonstrating SPP LE on an iOS Device with the SPPLE Transfer App - LEGACY
    5. 12.5 SPP Demo
    6. 12.6 Application Commands
  14. 13SPPDMMulti Demo Guide
    1. 13.1 Demo Overview
    2. 13.2 Demo Application
    3. 13.3 Application Commands
  15. 14ANP Demo Guide
    1. 14.1 Demo Overview
    2. 14.2 Demo Application
    3. 14.3 Application Commands
  16. 15HFP Demo Guide
    1. 15.1 Demo Overview
    2. 15.2 Demo Application
    3. 15.3 Application Commands
  17. 16HTP Demo Guide
    1. 16.1 Demo Overview
    2. 16.2 Demo Application
    3. 16.3 Application Commands
  18. 17PASP Demo Guide
    1. 17.1 Demo Overview
    2. 17.2 Demo Application
    3. 17.3 Application Commands
  19. 18HOGP Demo Guide
    1. 18.1 Demo Overview
    2. 18.2 Demo Application
    3. 18.3 Application Commands
  20. 19PXP Demo Guide
    1. 19.1 Demo Overview
    2. 19.2 Demo Application
    3. 19.3 Applications Commands
  21. 20FMP Demo Guide
    1. 20.1 Demo Overview
    2. 20.2 Demo Application
    3. 20.3 Application Commands
  22. 21CSCP Demo Guide
    1. 21.1 Demo Overview
    2. 21.2 Demo Application
    3. 21.3 Application Commands
  23. 22Revision History

Demo Application

The demo application provides a description on how to use the demo application to connect two configured boards and communicate over BluetoothLE. The included application registers a custom service on a board when the stack is initialized.

Device 1 (Server) setup on the demo application
  1. To start, one of the devices has to have the Alert Notification Service running on it. It can be started by running Register ANS.
  2. Next, the device acting as a Server needs to advertise to other devices. This can be done by running AdvertiseLE 1.
    GUID-20210311-CA0I-SMJT-RB7S-LRHXJXH0TVXF-low.png Figure 14-2 ANP Demo ANS Terminal 2
Device 2 (Client) setup on the demo application
Note: Steps c and d are optional if you already know the Bluetooth address of the device that you want to connect to.
  1. The Client LE device can try to find which LE devices are in the vicinity using the command: StartScanning.
  2. Once you have found the device, you can stop scanning by using the command: StopScanning.
    GUID-20210311-CA0I-GH4V-LMJK-KPVHC5SLNMBW-low.png Figure 14-3 ANP Demo ANS Terminal 3
Initiating connection from device 2
  1. Once the application on the Client side knows the Bluetooth address of the device that is advertising, it can connect to that device using the command: ConnectLE <Bluetooth Address>
    GUID-20210311-CA0I-DK7S-N49D-HGM3L8HFC738-low.png Figure 14-4 ANP Demo ANS Terminal 4
Identify supported services
  1. After initialization, the Client needs to find out whether ANS services are supported and what ANS features are available. For this, DiscoverANS is run on the Client. After the service discovery operation is complete, the ANS Service Discovery Summary is shown and list of supported features is shown.
    GUID-20210311-CA0I-BLW4-QG0P-5WMLRXMMDKRV-low.png Figure 14-5 ANP Demo ANS Terminal 5
  2. After getting the list of supported features, the next step is to configure the ANS on the Client. We can have support for either New Alerts, Unread Alerts or both.
    GUID-20210311-CA0I-WBB0-9RQ4-KHJV8MHNPRDQ-low.png Figure 14-6 ANP Demo ANS Terminal 6
  3. In our case, we configure it with both New and Unread Alerts enabled.
    GUID-20210311-CA0I-NBRC-MNJZ-CJX6DPMTVSK0-low.png Figure 14-7 ANP Demo ANS Terminal 7
Alert Notification between Client and Server
  1. After configuration, the Alert Notification system is active. To send alerts, first the New and Unread alerts need to be enabled on the Client. For this, EnableNewAlertNotifications and EnableUnreadAlertNotifications is used.
  2. For the EnableNewAlertNotifications command, the following are the list of options. We can enable either one or all of the options.
    GUID-20210311-CA0I-BKR2-KCSP-5BLMDKKGPR1F-low.png Figure 14-8 ANP Demo ANS Terminal 8
  3. In our case, we enable all of them at the same time.
    GUID-20210311-CA0I-NHZT-PXJM-SB1JGV6MXK7M-low.png Figure 14-9 ANP Demp ANS Terminal 9
  4. Similarly, one can enable either one or all of the options for EnableUnreadAlertNotifications. In our case we enable all of them.
    GUID-20210311-CA0I-W2SM-SRHD-DM6JMSFKTCNR-low.png Figure 14-10 ANP Demo ANS Terminal 10
  5. After enabling the Alert notifications on the Client side, we can use NotifyNewAlerts to notify the Client from the Server side. NotifyNewAlerts has options similar to the previous menu but the accompanying parameter is a bit field and not a numerical option. For example, to send a Simple Alert we would send NotifyNewAlerts 1. To send an Email Alert, we would send NotifyNewAlerts 2 and to send a New Alert, we would send NotifyNewAlerts 4. If we wanted to send both an Email and a Simple Alert we would send NotifyNewAlerts 3.
    GUID-20210311-CA0I-TWLX-VL7S-FSS71Q9VCKS0-low.png Figure 14-11 ANP Demo ANS Terminal 11
  6. In our case we send a simple alert for email. Once it's complete, it shows Success.
    GUID-20210311-CA0I-GF8G-8RVX-QX95XR34GNL3-low.png Figure 14-12 ANP Demo ANS Terminal 12
  7. On the Client side, it recieves the alert from the sender and it shows New Alert Status with the category of Alert (Simple in our case) and the number of alerts (New Simple Alerts which is zero in our case).
    GUID-20210311-CA0I-FQBN-CZQS-LLVLS2JPZ42G-low.png Figure 14-13 ANP Demo ANS Terminal 13
  8. NotifyUnreadAlerts like NotifyNewAlerts has the accompanying parameter as a bit field.
    GUID-20210311-CA0I-NZZW-DFXG-5Q15BVZNL3FB-low.png Figure 14-14 ANP Demo ANS Terminal 14
  9. In this example case, we send an unread email alert. Once, its transmitted it shows success on the Server side.
    GUID-20210311-CA0I-JQSJ-KMTV-MT3FSWZMQCFJ-low.png Figure 14-15 ANP Demo ANS Terminal 15
  10. Figure 242: ANP Demo ANS Terminal 15 r) And on the Client side, it receives the alert from the sender and it shows Unread Alert Status with the category of Alert (email in our case) and the number of alerts (Unread Emails, which is zero in our case).
    GUID-20210311-CA0I-DJSF-F3H9-LF6PBHXF3X1B-low.png Figure 14-16 ANP Demo ANS Terminal 16

We can also get and set the New and Unread Alerts for the different categories, get and set the Supported categories for New and Unread Alerts, Enable and Disable New and Unread Alert notifications and Notify Immediately New and Unread Alerts.