Using WiFi/BT module without ESP-IDF

schorcht
Posts: 2
Joined: Mon Jul 16, 2018 5:44 am

Using WiFi/BT module without ESP-IDF

Postby schorcht » Mon Jul 16, 2018 6:11 am

Hi,

Can anyone tell if there is a real chance to get the ESP32 RF Subsystem (WiFi / BT) working without the ESP-IDF?

Background: I ported RIOT-OS to ESP32. It's a bare metal implementation that does not use the ESP IDF. RIOT-OS is a complete embedded operating system with its own task management and scheduling. It is not compatible with FreeRTOS. Therefore, it is not possible to use RIOT OS core features with the FreeRTOS. However, the ESP32 binary WiFi stack libraries (https://github.com/espressif/esp32-wifi-lib) use the FreeRTOS features extensively. On the other hand, the RF subsystem is not described at all in the Technical Reference, so the implementation of its own libraries seems impossible.

So the question is, is there any way to run the ESP32 RF Subsystem without ESP-IDF and if so, how?

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Using WiFi/BT module without ESP-IDF

Postby ESP_Sprite » Tue Jul 17, 2018 1:33 am

Yes, there is. Exactly to make porting easier, there's no hard dependency on FreeRTOS per se as the multithreading handler; the WiFi and BT layers have a 'shim' that should make them able to adapt to any OS that provides the relevant APIs; see e.g. components/esp32/include/esp_wifi_os_adapter.h ; if I recall correctly there's something similar for BT.

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

Re: Using WiFi/BT module without ESP-IDF

Postby chegewara » Tue Jul 17, 2018 12:41 pm

Im not bluetooth expert, but as far as i know esp bluetooth library is based on broadcom bluedroid stack (if this can help you somehow):
https://github.com/espressif/esp-idf/bl ... /btm_ble.c

schorcht
Posts: 2
Joined: Mon Jul 16, 2018 5:44 am

Re: Using WiFi/BT module without ESP-IDF

Postby schorcht » Sat Jul 28, 2018 4:09 pm

My problem was, that I was trying to use release/v3.0 of the ESP32 binary WiFi stack libraries which were directly linked against FreeRTOS symbols.

In release/v3.1 the libraries define a more abstract interface by the wifi_osi_funcs_t data structure so that they are not linked against FreeRTOS symbols anymore. Even though the interface function directly correpond to FreeRTOS functions, I was able to realize the required functions by RIOT functions and to get the WiFi module working :)

Thank you.

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Using WiFi/BT module without ESP-IDF

Postby ESP_Sprite » Sun Jul 29, 2018 1:31 am

Glad you got it to work! Just wondering: will you put your efforts online somewhere?

Who is online

Users browsing this forum: Bing [Bot] and 84 guests