SW Example: DA14585/DA14586 Scan Tracking peripheral

DA14585/DA14586 Scan Tracking peripheral


Example description

This SDK6 DA14585 example shows how a peripheral device can track if it is scanned and which central device performs the scanning procedure. The scan device needs to scan in active mode since the peripheral device will track if it is scanned using the scan request that the central will issue to get the scan response data from the peripheral. The example Requires a minor change in the SDK code, the scan request is tracked in every BLE end event, the user will have to attach a hook in the BLE end event ISR.

HW and SW configuration

  • Hardware configuration

    • This example runs on The DA14585/DA14586 Bluetooth Smart SoC devices.
    • The Basic / Pro Development kit is needed for this example.
    • Connect the USB Development kit to the host computer.
    • UART TX jumper on P0_4
  • Software configuration

    • This example requires:
    • Smartsnippets Studio 1.6.3.
    • SDK6.0.10
    • SEGGER’s J-Linktools should be downloaded and installed.
    • A simple serial terminalshould be installed on the PC

How to run the example

For initial setup of the example please refer tothis section of the dialog support portal.

Initial Setup

  • Start Keil

  • Open file rwble.c

  • Search for the dlg_event_isr() function.

  • Above dlg_event_isr() function implementation, add the declaration of the hook function “__weak void user_end_event_isr_hook(void) {}”

  • In the dlg_event_isr() function invoke the user_end_event_isr_hook() function before any other SDK function is invoked.

  • After completing the modification the code in dlg_event_isr should look like the below screenshot:

    dlg_event_isr

  • Compile and launch the example

  • Open the development kit serial port with the following parameters

    -baudrate:115200-数据:8bits-stop:1bit-parity:None-flowcontrol:none
  • 如果设备是activelly扫描然后fw will print the bd addresses that are scanning the device.

    scan_requests_print

  • Also in the case of a scan request a cursor will also appear in the power profiler of Smart Snippets.

    scan_request_cursor

Known Limitations

Version date:
21/12/2018
Version number:
1.0

Please log in

To access this information please log in