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

fix(memory) free classic BT memory to heap #7

Closed
wants to merge 1 commit into from

Conversation

skandragon
Copy link

This patch releases the classic (non-BLE) bluetooth memory, which seems to fix #6. With this change, I've had the scanner running for about 20 minutes so far without a single timeout, although I still see this message at the end of a scan cycle:

E (425710) BT_HCI: btu_hcif_hdl_command_complete opcode 0x200b status 0x12

@skandragon
Copy link
Author

I take it you're not sure if this is the proper fix? I admit I'm not sure either, but found this gem while seeking a fix, and so far my nodes have been up for just under a week without a single restart.

@rcaelers
Copy link
Owner

This call is already done in BLEScanner.cpp. I wanted to check whether it makes any difference to call it earlier. But haven't found time to do so.

You have added the call after "new Main". The Main class starts a new thread which initialises bluetooth. So the call you added may happen in parallel with the existing call. Which may cause issue during startup.

@skandragon
Copy link
Author

Hmm, I'll look into this. It should probably free resources before any bluetooth items are in use, since I suspect there won't be any locking internally.

I'll see about making a better patch.

@skandragon skandragon closed this Mar 6, 2021
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

Successfully merging this pull request may close these issues.

Issues with the coexistance of WIFI and BT
2 participants