Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ble_cmd_gap_end_procedure fails to stop when in scanning mode #13

Open
cookieman459 opened this issue Apr 29, 2014 · 2 comments
Open

ble_cmd_gap_end_procedure fails to stop when in scanning mode #13

cookieman459 opened this issue Apr 29, 2014 · 2 comments

Comments

@cookieman459
Copy link

Great lib btw. I ran into one major issue so far though. I can get everything working except terminating a scan in BGLib_scanner.ino (your included demo). It scans fine, etc. but pressing 2 a second time just seems to die (the call seems to go out, but no return) The scan keeps going, but there seems to be no way to stop it.

The only mod I made was changing the BLE_WAKEUP_PIN to match my wiring, and setting Serial to 38400 (I'm running on a 8mhz chip)

I was able to get the peripheral setup 100% working, paired to another BLE device, etc.

@jamesfowkes
Copy link

I've found the same behaviour using the Python API.

It appears that the end procedure is sent to the BLE module, but it doesn't get round to processing it until several seconds later. I presume this is due to scan response packets continuing to come in, and that they're processed with a higher priority than API commands.

I've had to change the API such that it waits for the ble_rsp_gap_end_procedure response after sending the command. It means the timeout doesn't work though (so the scan period is variable).

@sridharrajagopal
Copy link

I think I've run into a similar issue. I terminate the scan automatically if there is no response for a while. The terminate seems to be fine ( I get an end_procedure response), but cannot reinitiate a scan (set_scan_parameters & gap_discover) - I don't get back responses from those calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants