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

ESP32-C2: Doesn't receive disconnect event after several connect / disconnect cycles #114

Closed
bjoernQ opened this issue Feb 1, 2023 · 2 comments · Fixed by #195
Closed
Labels
bug Something isn't working

Comments

@bjoernQ
Copy link
Contributor

bjoernQ commented Feb 1, 2023

I was hoping this could be fixed by having a timeout and disconnect from the peripheral side but that doesn't work since starting the advertising will return an error.

Maybe it's running out of some memory buffers but it seems unlikely since it reports lots of available buffers in that situation.
It's somewhat related to the amount of commands processed during a session (so it might be related to memory buffers?)

@MabezDev
Copy link
Member

MabezDev commented Feb 1, 2023

One thing maybe to check is the stack size variable in the linker scripts. Whilst debugging the S2 issue I found at some points in the program the stack depth exceeded the value set in the linker script. Bumping the number didn't fix the s2 issue sadly but we should probably increase them anyways as most are very small (s2 stack is 8K), with heavy inlining this can cause issues.

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Jun 1, 2023

There is definitely something quite wrong here. e.g. it used to depend on the opt-level if BLE worked or not and now that we changed the task-switching frequency even that doesn't work anymore - that definitely shows there is something wrong

This should get resolved before trying to support ESP32-C6 and later

@bjoernQ bjoernQ added the bug Something isn't working label Jun 1, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants