A .NET Standard 2.1 library for interacting with Chameleon Ultra devices. This library provides a robust, cross-platform SDK for managing RFID tags, emulating cards, and performing advanced reader operations.
- Cross-Platform: Built on .NET Standard 2.1, compatible with .NET 6+, .NET MAUI, Android, iOS, and Desktop (Windows/macOS/Linux).
- Multiple Adapters:
- BLE Adapter: Supports Bluetooth Low Energy communication using
Plugin.BLE. - Serial Adapter: Supports USB-Serial communication using
System.IO.Ports.
- BLE Adapter: Supports Bluetooth Low Energy communication using
- Mifare Classic Support: Full implementation of the Crypto1 cipher and high-level commands for reading and validating Mifare Classic 1k/4k cards.
- Protocol Implementation: Complete port of the Chameleon Ultra frame protocol, including head/data LRC checks and asynchronous command/response handling.
src/ChameleonUltra: The core library.
Add a reference to the ChameleonUltra project or install the NuGet package:
dotnet add package ChameleonUltrausing ChameleonUltra;
using ChameleonUltra.Adapters;
// In a MAUI/Mobile context with Plugin.BLE
var adapter = new BleAdapter(selectedBluetoothDevice);
using var ultra = new ChameleonUltra(adapter);
await ultra.ConnectAsync();
// Scan for HF Tag
var tagInfo = await ultra.ScanHf14aAsync();
if (tagInfo.AntiColl != null)
{
Console.WriteLine($"Found Tag: {BitConverter.ToString(tagInfo.AntiColl.Uid)}");
}
// Read a Mifare Block
byte[] key = new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
var blockData = await ultra.ReadMf1BlockAsync(4, Mf1KeyType.KEY_A, key);
await ultra.DisconnectAsync();using ChameleonUltra;
using ChameleonUltra.Adapters;
var adapter = new SerialAdapter("COM3"); // or "/dev/ttyUSB0" on Linux/macOS
using var ultra = new ChameleonUltra(adapter);
await ultra.ConnectAsync();
await ultra.SetDeviceModeAsync(DeviceMode.READER);
// ... perform operations
await ultra.DisconnectAsync();This project is licensed under the MIT License.