观察者模式下工作吗?

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Kimjihyung
Offline
Last seen:3 years 4 months ago
加入:2017-04-26 09:10
观察者模式下工作吗?

Hi,

I want DA14580 to work observer role.
But i don't get point from sdk examples.
(I put 'S' at Proximity monitor for windows but Scan result is nothing.)
How can i capture advertising packet.

Thank you.

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi Klmjihyung,

Hi Klmjihyung,

The device should be configured to GAP_OBSERVER_SCA role in order to operate as a client and scan for other devices, there are no example in the SDK but the closest example that you can get is the DSPS example and check the sps_host project. At that project the device is configured as a central, in order to change that you will have to go in the user_config.h file and at the user_gapm_conf structure, change the .role member from GAP_CENTRAL_MST to GAP_OBSERVER_SCA. The device after configuring the role eventually will start scanning via the user_scan_start() function, located in the user_sps_host.c file via sending a message to the stack (GAPM_START_SCAN_CMD). The command before send is populated with some configurations regarding the scanning procedure. You will be able to find more details about the configuation in the RW-BLE-GAP-IS.pdf document which you can find on the support site, in the Documents tab in the Profiles & API Documents section. Since you have started the scanning then the advertising indications should come to .app_on_adv_report_ind callback.

Thanks MT_dialog