1. Example Description

The example demonstrates the capabilities of the DA14531/585/586 as a Central and a peripheral i.e. scan and advertise role.

Note: This example applies for DA14585/586 as well. The DA14531 is capabable of handling upto 3 connections and the DA14585/586 can handle upto 8 connections.

The project works as a Central connecting to 2 peripherals, and once connected, it advertises so another central can connect to it.

Note: This project assumes that the 2 peripherals will stay connected to the DA14531 central.

The example can be downloaded from Here

2. HW setup

  • 3 DA14531 Pro-DK kit with Module/Daugherboard connected to host computer via USB and an android or iPhone.

  • For Central, extra jumpers are required for the UART to see the communication logs. Check the setup shown below for DA14531 and DA14585/586.

DA14531 daughterboard

da14531.jpg

DA14531 module

module.jpg

DA14585 daughterboard

da14585.jpg

The user manuals for the development kits can be found here for the DA145xxDEVKT-P PRO-Motherboard.

3. SW setup

  • SDK 6.0.14.1114

  • SmartSnippets Toolbox 5.0.14.3038

  • a terminal for UART logs (teraterm, termite, etc..)

4. How to run the example

  1. Download Prox_reporter binaries with different BD addresses and default device name “DLG-PROXR” to 2 DA14531 devices (as explained here). You can refer to this document to program the flash with the prox_reporter binaries. Press reset (SW1) on the motherboard and verify with an Android device that they have all started advertising

Note: To configure your device with different BD addresses, follow here

  1. Use the python script (in the Multirole project folder) to link the SDK path to the example. More information here

  2. Using Keil IDE, open the multirole project and compile the project to build the indexes. You will see errors but ignore it for this step, error will go away after the compilation in step 7.

  3. To be able to overide the default functions of the SDK the __ EXCLUDE_ROM_APP_TASK __ should be defined in the C/C++ tab in the “options for target” in keil, like so,

    exclude_rom_tasks.jpg

  4. On the project explorer, navigate to “app.h” and modify it to support 3 connections, like so,

    maxconn.jpg

  5. Open File explorer on your computer, navigate to the project, like so,

    C:\......\6.0.14.1114\sdk\common_project_files\misc

    in the misc folder, open da14531_symbols.txt in a text editor, and comment out the EXCLUDE_ROM_APP_TASK parts. Use a semi-colon (“;”) to comment out.

    da14531_symbols.jpg

  6. Build and compile the project.

  7. Download the binary to another DA14531 device (Use flash programmer tool as mentioned in step 1).

Note: Use any android/iPhone BLE scanner to connect/disconnect to/from the DA14531.

Note: For the DA14585, using more than 4 active connections, the default value of the #define CFG_RET_DATA_SIZE 2048, needs to changed to 4096, in the user_config.h file.

5. Supported use-case for the example

Below mentioned is the use-case that is supported with this example. In future releases, more use-cases will be added especially with regards to the disconnections.

For the ease of understanding, following notations are used.

  • C0/P0 -> DA14531 central/peripheral

  • P1,P2 -> DA14531 peripheral

  • C1 -> Phone central

Use case: The flow of this use-case is mentioned below. Basically the peripherals starts to advertise first and then the Central starts scan process, and it finds and connects to 2 peripherals.

Connection

  • P1 is advertising

  • P2 is advertising

  • C0 starts to scan, finds P1 and P2 and connects

  • P0 advertises

  • C1 connects to P0

Disconnection

  • C1 disconnects

  • P0 advertises

  • C1 connects to P0 again

This can be verified in the UART logs.

Note: While using iPhone, if you wish to disconnect C1 from DA14531 device, please check the iPhone bluetooth settings as the phone might have to be disconnected from there. Once it disconnects, you will see P0 advertising again while being connected to P1 and P2. For Android, you can use any BLE scanner app to connect and disconnect.

Note: UART terminal: 921600, no flow control

logs.jpg

6. Limitations

  • The current example doesn’t handle the disconnecion of P1, P2 from their cenral C0. This will be handled in future release.

7. Troubleshooting

  • Try a different USB1 cable.

  • Try different jumper wires, if used.

  • Verify using any BLE scanner that the 2 peripherals are advertising before attempting connection.

  • If none of the above helps, please check with the customer support team who would be glad to provide you the solution.

8. License


Copyright (c) 2021 Dialog Semiconductor. All rights reserved.

This software (“Software”) is owned by Dialog Semiconductor. By using this Software you agree that Dialog Semiconductor retains all intellectual property and proprietary rights in and to this Software and any use, reproduction, disclosure or distribution of the Software without express written permission or a license agreement from Dialog Semiconductor is strictly prohibited. This Software is solely for use on or in conjunction with Dialog Semiconductor products.

EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES OR AS REQUIRED BY LAW, THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES OR BY LAW, IN NO EVENT SHALL DIALOG SEMICONDUCTOR BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE SOFTWARE.