You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
just looked how the bluetooth feature might fit into the memory and I prepared a first draft how it might work: grch87@af71640
As Wifi and Bluetooth can't coexist, because of memory issues, there has to be two modes. When wifi is active, bluetooth is off and vice versa. To save additional memory, the audio task can be as well deactivated, as the bluetooth lib is serving the i2s interface.
In my commit, I moved all wifi related functions from the main loop() into a task, so I can deactivate it when required.
What is important is that in wifi mode the bluetooth memory needs to be released!!! (Even when there is no bluetooth object created...)
As a switch I have at the moment the wifiEnabled flag and I do a manual reboot after the flag is toggled. A more elegant way to switch between the modes is required for sure ;)
With the tests I performed it is more or less stable. When in wifi mode you can play audio and do an ftp transfer in parallel. But for that I had to adapt a bit the stack sizes of the tasks.
The test where performed on a d32 pro, but with psram deactivated.
So with this proof of concept I would say: Bluetooth on the esp32 tonuino is definetly possible, even without psram.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
just looked how the bluetooth feature might fit into the memory and I prepared a first draft how it might work:
grch87@af71640
As Wifi and Bluetooth can't coexist, because of memory issues, there has to be two modes. When wifi is active, bluetooth is off and vice versa. To save additional memory, the audio task can be as well deactivated, as the bluetooth lib is serving the i2s interface.
In my commit, I moved all wifi related functions from the main loop() into a task, so I can deactivate it when required.
What is important is that in wifi mode the bluetooth memory needs to be released!!! (Even when there is no bluetooth object created...)
As a switch I have at the moment the wifiEnabled flag and I do a manual reboot after the flag is toggled. A more elegant way to switch between the modes is required for sure ;)
With the tests I performed it is more or less stable. When in wifi mode you can play audio and do an ftp transfer in parallel. But for that I had to adapt a bit the stack sizes of the tasks.
The test where performed on a d32 pro, but with psram deactivated.
So with this proof of concept I would say: Bluetooth on the esp32 tonuino is definetly possible, even without psram.
Beta Was this translation helpful? Give feedback.
All reactions