Project lvgl + wifi softAP +ble client server

Olfox59
Posts: 12
Joined: Tue May 02, 2017 12:36 pm

Project lvgl + wifi softAP +ble client server

Postby Olfox59 » 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 !

chegewara
Posts: 2311
Joined: Wed Jun 14, 2017 9:00 pm

Re: Project lvgl + wifi softAP +ble client server

Postby chegewara » Sun Sep 29, 2024 8:16 pm

Im not sure what documentation you are referring to, but you can use ble and wifi at the same time.

Just in case you have problems with memory shortage, not iram related you mentioned, you should consider to use nimble stack.

Who is online

Users browsing this forum: No registered users and 73 guests