Separate scan in Mesh application

⚠️
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.
5 posts / 0 new
Last post
火鸟
Offline
Last seen:1 month 2 days ago
加入:2019-07-12 09:48
Separate scan in Mesh application

嗨,团队,

I am using Mesh SDK 1.6 for DA14683, and trying to combine separate scanning function to the app.

During Mesh application is working, how can I start separate device scanning including non-mesh devices, without impacting mesh function.

Should I execute ble_gap_scan_start() in the certain place, or better way to get scan result?

Device:
PM_Dialog
Offline
Last seen:5 hours 18 min ago
Staff
加入:2018-02-08 11:03
Hi firebird,

Hi firebird,

Yes, the appropriate API to start a scanning procedure is the ble_gap_scan_start(). However, you should configure the device as a Central. Be aware that in General-discoverable and Limited-discoverable modes, the scan will stop after 10s of activity. In Observer mode, the scan operation will continue until it is stopped using ble_gap_scan_stop().

Thanks, PM_Dialog

火鸟
Offline
Last seen:1 month 2 days ago
加入:2019-07-12 09:48
Thanks for your advice.

Thanks for your advice.

I am trying to use only scanning function, not connecting. So, dg_configBLE_OBSERVER option is enough, but in mesh application, it seems to be enable dg_configBLE_CENTRAL to work properly.

My new question is, what is the best method to scan devices in mesh application not to impact mesh functionality.

After mesh device is provisioned and configured,

1. Just starting a new task, and do ble_gap_scan_start(). Do some specific work when some specific device found. This will be continued during power is on. Is this method is OK? All the mesh functions will be working properly in this condition?

2.启动一个新任务and start/stop scan manually. The same work as above. Is this better than above?

3. Any other suggestion?

PW_Dialog
Offline
Last seen:1 month 3 weeks ago
Staff
加入:2019-04-03 02:54
Hi firebird,

Hi firebird,

That depends on your use case, if power consumption is not important and the device need to monitor any new broadcasting devices in any time, you can do something like the 1).

Br,

PW_Dialog

火鸟
Offline
Last seen:1 month 2 days ago
加入:2019-07-12 09:48
OK, thanks.

OK, thanks.

I will test both cases.