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 Scan Window Ignored, BLESCANPARAM #857

Open
4 tasks done
Peter-B4321 opened this issue Jul 22, 2024 · 5 comments
Open
4 tasks done

BLE Scan Window Ignored, BLESCANPARAM #857

Peter-B4321 opened this issue Jul 22, 2024 · 5 comments

Comments

@Peter-B4321
Copy link

Peter-B4321 commented Jul 22, 2024

Answers checklist

  • I have read the documentation ESP-AT Programming Guide and the issue is not addressed there.
  • I have compiled the hello_world example Get Started with ESP-IDF and the issue is not addressed there.
  • I have updated my ESP-AT branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

ESP-AT version

3.4.0.0

Operating System used

Linux

If you are using Windows, please specify command line type.

None

What is the expected behavior?

Scan for the window and wait the interval.
For example, AT+BLESCANPARAM=1,0,0,16000,1600
The command should scan for 1s and then wait 9s.

What is the actual behavior?

Scanning is constant without breaks.

Steps to reproduce

AT+BLEINIT=1
AT+BLESCANPARAM=1,0,0,16000,1600
AT+BLESCAN=1,0
Then, look at the scan results.

Build or installation Logs

This issue is new to ESP-AT v3.4.0.0
In v3.2.0.0, the ESP would scan for 1 second and wait 9, then repeat.
The behavior seems like the window is equal to the interval (AT+BLESCANPARAM=1,0,0,1600,1600)

More Information

Happens on multiple devices.

@Peter-B4321
Copy link
Author

Peter-B4321 commented Jul 22, 2024

AT+GMR response:

AT version:3.4.0.0(s-c31b833 - ESP32 - Jun  7 2024 03:48:17)
SDK version:v5.0.6-dirty
compile time(70ff5889):Jun  7 2024 04:46:00
Bin version:v3.4.0.0(WROOM-32)
OK

@JHedgesBartec
Copy link

I have also seen this issue on v3.2.0.0 with the ESP-WROOM-32

It is clear that both the scan interval and scan window are only applied when the BLE module is de-initialised (AT+BLEINIT=0) then initialised as a client again (AT+BLEINIT=1) or the module is rebooted (AT+RST) and then BLE re-initialised.

@Peter-B4321
Copy link
Author

On v3.4.0.0, applying the scan parameters while BLE is de-initialized returns an ERROR

TX: AT+BLEINIT=0
RX: OK
TX: AT+BLESCANPARAM=1,0,0,16000,1760
RX: ERROR
TX: AT+BLEINIT=1
RX: OK
TX: AT+BLESCANPARAM=1,0,0,16000,1760
RX: OK

@JHedgesBartec
Copy link

@Peter-B4321 to work around this issue you will need to apply the new parameters, then de-initialise BLE before initialising it again.

@Luxin812
Copy link
Contributor

Luxin812 commented Sep 4, 2024

We have successfully reproduced the issue locally. We will need some time to analyze it and will get back to you with the results shortly. Thank you very much for reporting this issue.

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