Skip to content

v1.3.1

Choose a tag to compare

@github-actions github-actions released this 28 May 05:37
· 13 commits to master since this release
fix: classify transport hiccups (ENOENT/ENODEV/EBADF/EIO) as TRANSIENT

These four errno values were previously FATAL, which on a shared RTU
bus causes the bus thread to set connected_=false, fire onBusError_
callbacks with FATAL severity, and — via the application-layer
shutdown hook that fronius-bridge registers on each bus error
callback — terminate the whole process.

On RTU these codes are the typical errno values seen when a USB-to-
serial adapter momentarily disappears (device unplug, kernel re-
enumeration, udev settle race, adapter firmware glitch). A simple
reconnect almost always recovers, and busLoop()'s Phase 1 already
implements that reconnect with exponential backoff. Classifying them
as FATAL therefore takes down the entire bridge for a condition the
bus is already designed to handle.

A misconfigured RTU device path (e.g. typo in YAML) also surfaces as
ENOENT, but TRANSIENT remains the right call there too: it produces
a repeated, visible warning every backoff cycle rather than a silent
startup exit during a boot-time enumeration race.

This change is a prerequisite for the upcoming EBZ Easymeter
integration in fronius-bridge, where the USB-IR dongle is known to
glitch occasionally and must recover without taking down the rest
of the bridge. The fix also benefits existing Fronius RTU users on
shared buses.