CSL RFID Reader Library for .NET — supporting Bluetooth LE and TCP/IP communication with CSL RFID readers.
| Reader | Connection |
|---|---|
| CS108 | Bluetooth LE |
| CS468 | Bluetooth LE |
| CS710S | Bluetooth LE |
| CS203XL | Bluetooth LE / TCP/IP |
- .NET Standard 2.0 — Xamarin.Forms, .NET MAUI, and other .NET Standard compatible frameworks
- .NET 10 — .NET 10+ applications
- .NET 10 Windows — Windows desktop applications (TCP/IP support)
- Bluetooth LE (BLE) communication via Plugin.BLE
- TCP/IP connectivity for fixed readers (Windows desktop)
- Multi-reader support across CSL RFID readers
- Rich RFID operations: inventory, read/write, lock/kill, filtering
- Barcode scanning integration
- Battery & notification management
dotnet add package CSLibrary2026Or add to your .csproj:
<PackageReference Include="CSLibrary2026" Version="1.0.0-beta.1" />using CSLibrary;
// Create the reader instance
var reader = new HighLevelInterface();
// Discover BLE devices
var deviceFinder = new DeviceFinder();
deviceFinder.OnDeviceFound += (sender, device) =>
{
Console.WriteLine($"Found: {device.Name}");
};
await deviceFinder.StartScanAsync();
// Connect to a BLE reader
await reader.ConnectAsync(adapter, device, MODEL.CS108);using CSLibrary;
// Create the reader instance
var reader = new HighLevelInterface();
// Connect via TCP/IP (CS203XL Network API)
await reader.ConnectAsync("192.168.1.100", 2000);// RFID tag inventory callback
reader.rfid.OnAsyncCallback += (sender, e) =>
{
if (e.type == Constants.CallbackType.TAG_RANGING)
{
Console.WriteLine($"EPC: {e.info.epc}");
}
};
// Reader state change callback
reader.OnReaderStateChanged += (sender, e) =>
{
Console.WriteLine($"State: {e.state}");
};// Set power level (0–3000 = 0–30.00 dBm)
reader.rfid.SetPowerLevel(3000);
// Start inventory
reader.rfid.StartOperation(RFIDReader.Operation.TAG_RANGING);
// Stop after some time
reader.rfid.StopOperation();| Method | Description |
|---|---|
ConnectAsync(IAdapter, IDevice, MODEL) |
Connect to a BLE reader |
ConnectAsync(string ipAddress, int port) |
Connect to a TCP/IP reader |
DisconnectAsync() |
Disconnect from the reader |
Start operations:
reader.rfid.StartOperation(Operation.TAG_RANGING); // Inventory
reader.rfid.StartOperation(Operation.TAG_READ); // Read tags
reader.rfid.StartOperation(Operation.TAG_READ_TID); // Read TID bank
reader.rfid.StartOperation(Operation.TAG_READ_USER); // Read USER bank
reader.rfid.StartOperation(Operation.TAG_WRITE); // Write tags
reader.rfid.StartOperation(Operation.TAG_LOCK); // Lock tag
reader.rfid.StartOperation(Operation.TAG_KILL); // Kill tag
reader.rfid.StopOperation(); // Stop continuous operationPower & Frequency:
reader.rfid.SetPowerLevel(uint pwrlevel); // Set power (0–3000)
reader.rfid.GetActiveMaxPowerLevel(); // Get max power
reader.rfid.SetCurrentLinkProfile(uint profile); // Set link profile
reader.rfid.SetCountry(string countryName); // Set country frequency
reader.rfid.SetCountry(string countryName, int ch);// Set country + fixed channelSingulation Algorithms:
reader.rfid.SetCurrentSingulationAlgorithm(SingulationAlgorithm.FIXEDQ);
reader.rfid.SetFixedQParms(FixedQParms parms);
reader.rfid.SetDynamicQParms(DynamicQParms parms);
reader.rfid.SetTagGroup(TagGroup tagGroup);
reader.rfid.SetPostMatchCriteria(SingulationCriterion[] criteria);Callback Events:
reader.rfid.OnAsyncCallback— Inventory / tag data (CallbackType.TAG_RANGING,TAG_SEARCHING)reader.rfid.OnAccessCompleted— Read/write/lock resultreader.OnReaderStateChanged— RFID reader state
reader.GetCurrentBatteryLevel(); // Get battery level
reader.ClearEventHandler(); // Clear all callback events
reader.notification.OnVoltageEvent += ... // Battery level changes
reader.notification.OnKeyEvent += ... // Hotkey pressesreader.barcode.OnCapturedNotify += (sender, e) => Console.WriteLine($"Barcode: {e.Barcode}");
reader.barcode.Start();
reader.barcode.Stop();Events:
OnCapturedNotify— Captured barcode dataOnStateChanged— Scanner state
CSLibrary2026/
├── Source/
│ ├── CSLibrary.cs # Main library entry point
│ ├── Transport/ # Transport layer abstraction
│ │ ├── ITransport.cs # Transport interface
│ │ ├── BLETransport.cs # BLE transport (Plugin.BLE)
│ │ └── TCPTransport.cs # TCP transport
│ ├── BluetoothProtocol/ # BLE protocol (send/receive/connect)
│ ├── HAL/
│ │ ├── Plugin.BLE/ # BLE backend for MAUI
│ │ └── TCPIP/ # TCP/IP backend for Windows desktop
│ ├── RFIDReader/
│ │ └── CSLUnifiedAPI/
│ │ └── Basic_API/
│ │ ├── CS108/ # CS108 / CS468 reader API (Rx000)
│ │ └── CS710S/ # CS710S / CS203XL reader API (E710/E910)
│ ├── BarcodeReader/ # Barcode scanning
│ ├── Battery/ # Battery management
│ └── Notification/ # System notifications
└── Properties/
CSLibrary2026 uses a transport abstraction layer (ITransport) to support both Bluetooth LE and TCP/IP connections:
HighLevelInterface
├── rfid — RFID operations (inventory, read/write, lock/kill)
├── barcode — Barcode scanning
├── notification — Battery, key events
└── _transport — ITransport (BLETransport or TCPTransport)
ITransport
├── ConnectAsync() — Connect via BLE or TCP
├── SendAsync() — Send command data
├── Disconnect() — Close connection
└── SetReceiveCallback() — Handle incoming data
MIT License. See LICENSE for details.
- GitHub Repository: https://github.com/cslrfid/CSLibrary2026
- NuGet Package: https://www.nuget.org/packages/CSLibrary2026