-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Nimble out of memory when trying to connect to multiple devices on ESP32 S3 #10007
Comments
It looks like you are allowing three connections to be established at once. Even after a connection is established you start advertising again. Is that your intention? See https://github.com/adafruit/Adafruit_CircuitPython_BLE/tree/main/examples for some examples of being a peripheral. |
Yes that is correct. this is for a bike computer that should connect to a watch and a zwift server strange thing is that sometimes i can connect 2 devices but most of the time its only 1 |
i have also tried something similar to the examples
same error will still occur |
Which board are you using? |
Hi, i have tested this on TTGO T-Display-S3 1.9 (16m8m) and the ESP32-S3-DevKitC-1-N8R2 the snippet above is an oversimplified version of what i am running for the total bike computer. With the interface and everything active it uses about 170kb (for TTGO) vs the 60kb (DevKitC) that this sketch is using. sometimes the device allows me to connect to and then crashing at a third connection and sometimes i can just connect one device i was using gc.mem_free() to check the memory usage is this applicable to nimble or does it have its own memory allocated? |
CircuitPython version
Code/REPL
Behavior
When the first device connects everything is ok as is reported by the print. once the device starts advertising again an error is given:
(<BLEConnection object at 0x3c198930>,)
Traceback (most recent call last):
File "", line 18, in
File "", line 15, in advertise_ble
File "adafruit_ble/init.py", line 219, in start_advertising
MemoryError: Nimble out of memory
Description
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: