MIT License Copyright (c) 2025 SmartElectroni
RODOS-5NS Daemon - A lightweight Linux daemon for interfacing with RODOS-5NS temperature/humidity sensors via USB.
This C daemon provides continuous access to sensor data through a simple file interface at /dev/rodos5ns. It handles USB communication using libusb and outputs real-time sensor readings in a human-readable format, eliminating the need for direct USB access in user applications.
RODOS-5NS (Temperature and Humidity sensor) Compatible with sensors using the same USB HID protocol (VID: 0x0483, PID: 0x5750) Supports both REX-5NS (temperature/humidity) and DS18B20 (temperature-only) sensor types
Automatic USB detection - Continuously monitors and connects to the sensor Simple file-based interface - Read data directly from /dev/rodos5ns Real-time updates - Data refreshes every 100ms with configurable intervals Human-readable format - Output in temperature=XX.X,humidity=XX.X,status=X,type=X,valid=X format Background operation - Runs as a daemon with system service integration Error resilience - Automatic reconnection on USB errors Resource efficient - Lightweight implementation with minimal overhead
libusb-1.0 development package: libusb-1.0-0-dev C compiler: gcc or clang Linux (tested on Ubuntu/Debian, Fedora, Arch) Root/sudo access: Required for USB device access and creating /dev/rodos5ns
Open and get data from link /dev/rodos5NS in your project:
fd = open("/dev/rodos5ns", O_RDONLY);
int bytes = read(fd, buffer, sizeof(buffer) - 1);
//see examples for more informationYou need run make in your device and setting daemon for auto start after loaded system.
make # Build daemon
make run # Run daemon (requires sudo)
make clean # Clean build files
make help # Show all commands
make # Build client example
make run # Run example
make test # Check device and run
make clean # Clean client build
Note: This daemon is specifically designed for RODOS-5NS temperature/humidity sensors with USB HID interface. Compatibility with other sensors depends on protocol similarity.
# Clone the repository
git clone https://github.com/SmartElectroni/rodosDev.gitcd rodosDev
make
make test