Project lvgl + wifi softAP +ble client server
Posted: Sun Sep 29, 2024 7:32 pm
Hi,
I'm developping a project that requires to connect with ble on two sensors, manage a display, and when needed, start a softAp for file transfert on microSD.
Ble client and server coexist fine.
My display too.
I'm at the step tonintegrate the softAp example code into my project and i meet issue to properly alternate between ble and wifi soft ap as both can not coexist properly according to documentation
I have two free rtos tasks:
-Gui (lvgl for the display) running on core 1
-Ble running on core 0, and wifi soft ap into the same tasks.
Program start with running ble client and server.
When I need to upload files on sd card, i connect my smartphone via ble, write a string into a characteristic. A variable is set and this variable is checked into the while() loop of the ble task.
If true, ble is switch off by calling 4 functions to deinit /disable the bluedroid stack and ble stack as required out of the ble callback . Then, wifi soft ap is init and file server is started.
It works, but lwip seems to not start and any ipv4 is printed in the console like i have when i run the light files serving example.
When i don't init the ble gatts gattc I can properly connect to my wifi file serving.
It seems i'm a little bit limit on ram too (overflowed iram 112 percent).
Do you think that my code is properly organised ? Should i use two separate tasks for ble and wifi soft ap and start wifi soft ap task via ble task and stop ble in the wifi task for example ?
Thanks for your help !
I'm developping a project that requires to connect with ble on two sensors, manage a display, and when needed, start a softAp for file transfert on microSD.
Ble client and server coexist fine.
My display too.
I'm at the step tonintegrate the softAp example code into my project and i meet issue to properly alternate between ble and wifi soft ap as both can not coexist properly according to documentation
I have two free rtos tasks:
-Gui (lvgl for the display) running on core 1
-Ble running on core 0, and wifi soft ap into the same tasks.
Program start with running ble client and server.
When I need to upload files on sd card, i connect my smartphone via ble, write a string into a characteristic. A variable is set and this variable is checked into the while() loop of the ble task.
If true, ble is switch off by calling 4 functions to deinit /disable the bluedroid stack and ble stack as required out of the ble callback . Then, wifi soft ap is init and file server is started.
It works, but lwip seems to not start and any ipv4 is printed in the console like i have when i run the light files serving example.
When i don't init the ble gatts gattc I can properly connect to my wifi file serving.
It seems i'm a little bit limit on ram too (overflowed iram 112 percent).
Do you think that my code is properly organised ? Should i use two separate tasks for ble and wifi soft ap and start wifi soft ap task via ble task and stop ble in the wifi task for example ?
Thanks for your help !