Page 1 of 1

Using WiFi/BT module without ESP-IDF

Posted: Mon Jul 16, 2018 6:11 am
by schorcht
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?

Re: Using WiFi/BT module without ESP-IDF

Posted: Tue Jul 17, 2018 1:33 am
by ESP_Sprite
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.

Re: Using WiFi/BT module without ESP-IDF

Posted: Tue Jul 17, 2018 12:41 pm
by chegewara
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

Re: Using WiFi/BT module without ESP-IDF

Posted: Sat Jul 28, 2018 4:09 pm
by schorcht
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.

Re: Using WiFi/BT module without ESP-IDF

Posted: Sun Jul 29, 2018 1:31 am
by ESP_Sprite
Glad you got it to work! Just wondering: will you put your efforts online somewhere?