Is there currently a way to send and receive data between a Nerves device (Raspberry Pi) and few ESP devices using ESP-NOW ?
My goal is to create a network of sensor nodes (using ESP32/ ESP8266) controlled by a Raspberry on which I can retrieve stats and trigger actions.
I want my sensors to consume as little energy as possible, hence the fact that I want to use ESP-NOW for communication rather than Wi-Fi, for example.
I’d like to know if anyone else has tried a similar project.
Thanks in advance.
2 Likes
I’m not familiar with ESP-NOW, but if there’s a Linux driver for it, there should be a way to use with Nerves with some work.
If there’s not a Linux ESP-NOW driver (I couldn’t find one on quick search), I’d make a wired connection between the RPi and one ESP32/ESP8266 and use that local ESP for communication with the sensor node ESPs. Bridging over the UART pins might not be bad if you don’t mind coming up with a communications protocol for your app.
1 Like
Thanks for you answer.
The only Linux implementation I know for ESP-NOW is this one: GitHub - thomasfla/Linux-ESPNOW: An attempt at implementing a direct link between a linux station and an ESP module using ESPNOW protocol for real time robot control
If there wasn’t an existing solution, I thought I’d make an NIF using the code from this project.
One other solution which I am playing with is to use a CANBUS enabled carrier board with a RPI4 compute module that can talk to your ESP module. You can output CAN frames from your ESP (at least ESP32 Classic+) to communicate with your carrier board (which exposes CAN as network interface in linux). Might save you reinventing the wheel with a communication protocol and lean on something that is industry ready instead.
If you could get Linux running on ESP32 though, wouldn’t that mean you could potentially get Elixir/Nerves running on the ESP32 (with some effort?)… that would be cool and drop the cost of hardware for nerves implementations right down…
1 Like