DA14580Firmware : .. \DA14580_581_583_SDK_3.0.10.1\dk_apps\keil_projects\proximity\prox_monitor_ext_usb\Keil_5
PCTool : ..\DA14580_581_583_SDK_3.0.10.1\host_apps\windows\proximity\monitor\host_proxm_sdk
In the PC project ,there is a function :
void app_inq(void) // it send a command:GAPM_START_SCAN_CMD
{ .... }
but after about 7 seconds or 8 seconds ,receive a message :
gapm_cmp_evt_handler (ke_msg_id_t是否,
struct gapm_cmp_evt *param,
ke_task_id_t dest_id,
ke_task_id_t src_id)
param->operation = GAPM_SCAN_ACTIVE
param->status = 0x45(69),
why the param->status is not equal to CO_ERROR_NO_ERROR ??
what does the 0x45 means ?
Device:
Hi Stone_wang,
The scanning procedure completes after approximatey 10 seconds automatically and triggers the completetion of the operation. The status code of the operation (0x45 GAP_ERR_TIMEOUT) declares that the Scanning operation was ended due to timeout (since the operation lasts only for 10 seconds). You can find the GAP error codes in the RW-BLE-GAP-IS.pdf.
Thanks MT_dialog
Hi,MT_dialog
Yes,The scanning procedure completes after approximatey 10 seconds automatically and triggers the completetion of the operation. but why I send GAPM_START_SCAN_CMD command ,it always lasts only for 7-8 seconds ?
when I use sdk 5.0.4 it is the same error ,I don't know why .Thanks.
Hi Stone_wang,
This is not an error, this is by design of the stack (actually the 10 seconds aren't exactly 10 but 7-8 seconds), if you have a central and you start the scanning in GAP_GEN_DISCOVERY this is the amount the device will contiunsly scan, then the operation will finish and the callback will occur with "timeout" status. From the callback you can restart the scanning procedure. For scanning contiously you can use the GAP_OBSERVER_MODE that doesn't timeout and you can only stop it using the GAPM_CANCEL_CMD (the later option will scan for any advertising report data).
Thanks MT_dialog
ok,I understand ,Thank a lot。