Boot from wired Ethernet to RAM?
Posted: Wed Apr 30, 2025 1:18 pm
Hello, first post here, I'm fairly new to ESP32 though already experienced with other MCUs, Linux and C programming (did some hacking on avr-gcc about 25 years ago).
I'm working on an application, a PoE powered remote sensor that will be difficult to access physically in the final location. The device sends data over wired Ethernet LAN to a server that processes it, it's all on a local carefully controlled network (not on the Internet) so it doesn't have to be secure. My prototype is based on the Olimex ESP32-POE board, which I reprogram over USB using the Arduino IDE. The device has no buttons or any other user interface, when installed in the final location it will only have wired Ethernet with PoE that can be remotely power-cycled. Since it depends on a server to process the data from the sensor anyway, I'd like to be able to do kind of "diskless boot" - like back in the old days a boot ROM in a network card could boot DOS on a diskless PC, for those old enough to remember.
Bootloader in flash (rarely if ever updated) does DHCP to configure the network (and any other settings with DHCP options), then loads the real application from TFTP server to RAM and runs it from there. No OTA, no flash writes, no way to brick the device, if the application is buggy then simply update it on the server and power-cycle the device to load it again. Has something like this been done before?
I'm currently using the WROOM version of the board, but can change to WROVER if the added PSRAM would help. Physical replacement of the device (high on a mast, to monitor vibration and wind speed) would be more expensive than the device itself, that's why I'd like to make it as difficult to brick as possible. For those curious - the device contains a small EVAL-ADXL355Z board with SPI accelerometer and the Olimex ESP32-POE board, all nicely fit into the case of the "Seav" anemometer (3 cups, rotating magnet, reed contact, about 1 Hz per 4 km/h of wind) and will be powered from a MikroTik CRS318-16P-2S+OUT switch.
I'm working on an application, a PoE powered remote sensor that will be difficult to access physically in the final location. The device sends data over wired Ethernet LAN to a server that processes it, it's all on a local carefully controlled network (not on the Internet) so it doesn't have to be secure. My prototype is based on the Olimex ESP32-POE board, which I reprogram over USB using the Arduino IDE. The device has no buttons or any other user interface, when installed in the final location it will only have wired Ethernet with PoE that can be remotely power-cycled. Since it depends on a server to process the data from the sensor anyway, I'd like to be able to do kind of "diskless boot" - like back in the old days a boot ROM in a network card could boot DOS on a diskless PC, for those old enough to remember.
Bootloader in flash (rarely if ever updated) does DHCP to configure the network (and any other settings with DHCP options), then loads the real application from TFTP server to RAM and runs it from there. No OTA, no flash writes, no way to brick the device, if the application is buggy then simply update it on the server and power-cycle the device to load it again. Has something like this been done before?
I'm currently using the WROOM version of the board, but can change to WROVER if the added PSRAM would help. Physical replacement of the device (high on a mast, to monitor vibration and wind speed) would be more expensive than the device itself, that's why I'd like to make it as difficult to brick as possible. For those curious - the device contains a small EVAL-ADXL355Z board with SPI accelerometer and the Olimex ESP32-POE board, all nicely fit into the case of the "Seav" anemometer (3 cups, rotating magnet, reed contact, about 1 Hz per 4 km/h of wind) and will be powered from a MikroTik CRS318-16P-2S+OUT switch.