嗨,团队,
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:
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
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?
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
OK, thanks.
I will test both cases.