A bedside-monitor gateway in embedded Rust
Firmware for a small node that sits beside each ICU device, speaks the device's own protocol and streams vitals and waveforms to a central dashboard, built for a public hospital's Smart-ICU pilot.
Goal
ICU devices export their data over vendor protocols on a direct Ethernet link, and the hospital wants all of it on one screen in real time. A node beside each device has to be that device's network, decode what it sends and stream it over Wi-Fi. A first version existed in C; I wrote the firmware in Rust to make it safer to change and easier to test, while behaving the same on the wire.
What I built
Three medical-device protocols
For a Philips IntelliVue monitor, the node acts as the DHCP server, associates with the monitor and polls it, and notices within ten seconds when the link drops. For HL7 v2 devices it runs an MLLP server and acknowledges every message. For a Prismaflex dialysis machine it is a TCP client that checks each frame's CRC.
Networking
A W5500 Ethernet controller over SPI on the device side, Wi-Fi to the hospital network, and a WebSocket stream of numerics every second and waveforms every quarter of a second.
Setting up and updating in the field
A BLE service configures each node at the bedside without a laptop and keeps its settings in flash. Firmware updates go to a second slot and are confirmed on the first boot.
Structure and testing
Each concern lives in its own crate, so the protocol parsers are tested on captured monitor traffic without any hardware, and recorded traffic is replayed to the board over a direct Ethernet link.
Result
One firmware image serves all three device types and is configured over BLE at the bedside. It was tested against real bedside equipment for the pilot.
What I learned
- Embedded Rust on ESP-IDF: safe concurrency across threads, calling C components, and splitting firmware into crates that can be tested on a laptop.
- Medical-device interoperability: the IntelliVue data-export protocol, HL7 v2 over MLLP and IEEE 11073 data types.
- TCP/IP on a microcontroller: SPI Ethernet bring-up, DHCP server and static modes, TCP servers and clients, and WebSocket.
- Designing for unattended recovery: link-loss detection, reconnects and safe firmware updates.