uBridge¶
uBridge is a lightweight, free Open Source, modular C++ service that detects and manages uThing devices, streams their measurements over NNG PUB/SUB, and exposes control and status via NNG REQ/REP. It’s designed to run very efficiently on Linux gateways and SBCs.
The system consists of a main service (ubridge) which manages connected uThing devices and publishes data to clients (plugin applications that can run on the same host or remotely).
Automatic device detection
uBridge runs as a daemon, constantly monitoring USB ports for new devices. If a uThing™ is detected, the server notifies connected plugins, can apply configuration, and starts streaming incoming data.
Features¶
- Very low resource usage: on a Raspberry Pi 3 it uses under 1% CPU and ~4 MB RAM.
- Extensible via plugins: modular design with official plugins for CSV logging, MQTT, InfluxDB, and HTTP/ThingsBoard; custom plugins can be added.
- Client libraries: libraries for various languages will be available soon.
- Flexible transports:
- IPC: best for local deployments on the same host.
- TCP: for remote clients (e.g., a CSV logger running on another host or in a container).
- Automatic device detection: takes care of the device management.
Architecture overview¶
- Bridge process starts two sockets:
- REQ/REP control: default
ipc:///tmp/ubridgeReqResp - PUB stream: default
ipc:///tmp/ubridgeStream
- REQ/REP control: default
- Device monitor scans
/dev/ttyACM*and/dev/ttyUSB*(ordevNameBase) and spawns per-device relay threads. - Published topics:
/sensors/<channelID>with JSON payloads.
Installation¶
uBridge targets Linux (systemd units provided) and can run on gateways and SBCs such as Raspberry Pi.
See the uBridge Server section for build/install and configuration, then install the plugins you need: