Essy.EssyBus
2.3.5
dotnet add package Essy.EssyBus --version 2.3.5
NuGet\Install-Package Essy.EssyBus -Version 2.3.5
<PackageReference Include="Essy.EssyBus" Version="2.3.5" />
<PackageVersion Include="Essy.EssyBus" Version="2.3.5" />
<PackageReference Include="Essy.EssyBus" />
paket add Essy.EssyBus --version 2.3.5
#r "nuget: Essy.EssyBus, 2.3.5"
#:package Essy.EssyBus@2.3.5
#addin nuget:?package=Essy.EssyBus&version=2.3.5
#tool nuget:?package=Essy.EssyBus&version=2.3.5
EssyBus .NET Library
EssyBus is a lightweight and robust communication library for interacting with devices over the EssyBus protocol.
It provides a clean abstraction between the underlying physical transport (UART, RS-485, USB, etc.) and your high-level device logic.
This package includes:
EssyBus— Manages communication, framing, retries, and device orchestration.EssyBusClient— Base class for building device-specific drivers.IPhysicalLayer— Interface you implement to link EssyBus to your hardware or simulation layer.- A structured exception hierarchy.
✨ Features
🔌 Pluggable Physical Layer
Implement IPhysicalLayer to make EssyBus work with:
- Serial ports
- USB bridges
- RS-485 interfaces
- Hardware simulators
- Unit-test stubs
🧱 High-Level Client Framework
Derive your device classes from EssyBusClient to automatically get:
- Typed request/response handling
EncodeFunction/EncodeMethodhelpers- Async and sync APIs
- Built-in Ping & FirmwareVersion access
- Automatic casting to numeric, float, string types
🔁 Robust Error Handling
EssyBus includes:
- Automatic retry logic
- Bus reset on communication failures
- Checksum verification
- Timeout/error propagation
- Fatal-error protection
⚡ Interrupt Handling Support
Devices can signal interrupts using the physical layer interrupt line.
Implement:
IEssyBusClientInterruptIEssyBusClientResetable
EssyBus will automatically dispatch interrupts when detected.
🔧 Automatic Device Reset
If enabled, devices implementing IEssyBusClientResetable are automatically reset when added.
📦 Installation
dotnet add package EssyBus
🚀 Getting Started
1. Implement the Physical Layer
public class SerialPhysicalLayer : IPhysicalLayer
{
// Implement WriteBytes, ReadBytes, interrupts, etc.
}
2. Create and Configure EssyBus
var bus = new EssyBus(new SerialPhysicalLayer());
3. Build Your Device Client
public class MyDevice : EssyBusClient
{
public MyDevice(byte address) : base(address, "My Device") {}
public int GetTemperature()
{
EncodeFunction(10, out int temp);
return temp;
}
}
4. Add Client and Communicate
var device = new MyDevice(1);
bus.AddClient(device);
Console.WriteLine(device.GetTemperature());
🧩 Architecture Overview
EssyBus
Handles communication, framing, retries, checksum, STX/ETX formatting, interrupt dispatch, and optional async operations.
EssyBusClient
Provides strongly typed access to device methods:
EncodeFunction(...)EncodeMethod(...)- Async equivalents
- Auto firmware retrieval
Ping(),RebootDevice(),DisconnectedFromBus()
Exception Types
EssyBusExceptionPhysicalLayerExceptionEssyBusClientExceptionFatalEssyBusException
🛠 Protocol Details
EssyBus currently supports two protocol versions, selected transparently per device.
Protocol V1 (Legacy)
STX (255) | Address | Leader | Length | HEX(Data...) | Checksum | ETX (254) | EOT (253)
- Payload bytes are HEX-encoded (each byte → two nibbles)
- Maximum payload: 250 bytes
- Checksum = sum(payload) mod 250
- Simple framing, no escaping
- Used by default for legacy devices
Protocol V2 (Enhanced)
Protocol V2 removes HEX encoding and introduces binary framing with escaping and extended length support.
STX_V2 (251)
Address | Leader | Length (low, high) | Data (escaped) | Checksum | ETX (254) | EOT (253)
Key Improvements
- Binary payload (no HEX expansion)
- Escaping using
ESC = 250for any byte > 250 - 16-bit payload length (low + high byte)
- Higher throughput and lower latency
- Fully backward compatible at the bus level
Escaping Rules
Any byte with value > 250 is encoded as:
ESC, (byte - 250)
This applies to:
- Payload bytes
- Length bytes
Checksum is calculated on the unescaped payload:
checksum = sum(payload) % 250
Selecting Protocol Version
Protocol selection is per client:
public class MyDevice : EssyBusV2Client
{
public MyDevice(byte address) : base(address, "My V2 Device") {}
}
EssyBusClient→ Protocol V1EssyBusV2Client→ Protocol V2
The EssyBus automatically handles framing, retries, and decoding based on the client type.
📄 License
MIT License
🧯 Logging / Debugging
var loggerFactory = LoggerFactory.Create(b => b.AddConsole());
var bus = new EssyBus(myPhysicalLayer, loggerFactory);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- System.Memory (>= 4.6.3)
-
.NETFramework 4.8.1
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- System.Memory (>= 4.6.3)
-
.NETStandard 2.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- System.Memory (>= 4.6.3)
-
.NETStandard 2.1
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
-
net9.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Essy.EssyBus:
| Package | Downloads |
|---|---|
|
Essy.EssyBus.FTDI
An FTDI implementation of the EssyBus |
|
|
EssyBusBLDCMotorController
An IMotor implementation for a BLDC motor attached to the EssyBus |
|
|
EssyBusStepperMotorController
An IMotor implementation for a Stepper motor attached to the EssyBus |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.3.5 | 336 | 12/16/2025 |
| 2.3.4 | 269 | 12/16/2025 |
| 2.3.3 | 132 | 12/12/2025 |
| 2.3.2 | 130 | 12/12/2025 |
| 2.3.1 | 121 | 12/12/2025 |
| 2.3.0 | 422 | 12/11/2025 |
| 2.2.0 | 147 | 12/6/2025 |
| 2.1.2 | 680 | 12/3/2025 |
| 2.1.1 | 679 | 12/3/2025 |
| 2.1.0 | 681 | 12/3/2025 |
| 2.0.0 | 683 | 12/2/2025 |
| 1.6.0 | 198 | 11/26/2025 |
| 1.5.2 | 326 | 11/17/2025 |
| 1.5.1 | 288 | 11/16/2025 |
| 1.3.0.10 | 468 | 7/28/2025 |
Fixed issue with returning data that is escaped