I’m porting an app from another Bluetooth stack (Broadcom/Cypress Wiced) to the standard SDK.
I need to be able to start and stop advertising during operation.
I’m calling le_adv_start() and le_adv_stop(), but I’m often getting the return code 2 (GAP_CAUSE_INVALID_STATE)
Can anyone provide some assistance as to what I’m doing wrong to cause this error code?
I also need to run passive scans whilst advertising is enabled. I’m calling le_scan_start() and le_scan_stop() but I can’t get it to work. Sometimes these functions also return code 2.
The BT application doc doesn’t seem to cover the case of advertising and scanning in the same app. Is it possible?