-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Hey everyone,
I am planning to work on this project: Add support to ESP Hosted on NuttX. Most boards don’t have built-in WiFi or BLE, so every time someone wants to connect to a network, they have to handle low-level stuff on the ESP32 themselves. It works, but it’s kind of a pain and slows things down.
What I’m thinking is to make a POSIX-style driver for the ESP32 on NuttX so apps can just open a device and use it. Something like:
-
Auto-initialize the ESP32 and network stack when the device opens (probably over SPI for speed)
-
Set WiFi credentials easily (SSID, password, security)
-
Send/receive network data with write()/read()
-
Optionally scan nearby networks
-
BLE support similar to WiFi
-
Handle ESP32 power modes automatically
-
Include a few example apps under /apps/
Here’s roughly how it might look in code:
int fd = open("/dev/esp_hosted0", O_RDWR); // start ESP32 over SPI
struct wifi_config cfg = { "SSID_NAME", "PASSWORD", WPA2 };
ioctl(fd, ESP_IOCTL_SET_WIFI, &cfg); // connect WiFi
write(fd, data, len); // send something
read(fd, buffer, sizeof(buffer)); // read response
close(fd); // close itEverything else—the SPI communication, network management, BLE—would happen inside the driver, so apps don’t have to worry about it.
I thought about some alternatives too:
Doing all ESP32 handling in each app – too messy
One big ioctl for everything – could mix data and control and get confusing
Separate device files for BLE/optional scans – seems cleaner
A few extra points:
Difficulty: pretty big project (~350 hours)
Mentors: Alan Carvalho de Assis and other devs
Resources:
Some questions I have:
Has anyone tried an ESP-Hosted driver on NuttX before?
Should we support UART later, or just SPI for now?
Separate devices or merge optional features into one ioctl?
Which boards are best for testing WiFi and BLE?
About me
I’m Aditya Yadav, a previous GSoC student (2025) with Apache. I’ve worked on multiple Apache open-source projects and am especially dedicated to contributing to the Apache ecosystem.
Verification
- I have verified before submitting the report.