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:
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.
Also in the case of a scan request a cursor will also appear in the power profiler of Smart Snippets.
Known Limitations
- There are No known limitations for this example. But you can check and refer to the following application note forknown hardware limitations.
- Dialog Software [Forum link](https://support.dialog-semiconductor.com/forums/dialog-smartbond-bluetoo...”Forum link”).
- you can Refer also for the Troubleshooting section in the DA1585x Getting Started with the Development Kit UM-B-049.