Getting Started

Overview

AXL SDK is an Android library that enables applications to communicate with AXL RFID hardware devices over USB.

The SDK handles all low-level hardware communication — transport connection, device handshake, error recovery, and event dispatch — so your application only needs to respond to events and call commands. No USB driver code, no protocol knowledge, no hardware expertise required.

RFID Tag Scanning
Read EPC tags with start, pause, and stop control. Submit scanned tags as a checkout transaction — auto-split into configurable batches.
USB Connection
Connect over USB OTG for full read, checkout, and configuration access.
Live Device Configuration
Push antenna power, frequency region, network settings, and hop sequence to the device at runtime without a restart.
Reliable Communication
All messages — commands, responses, EPC data — are framed and integrity-checked, ensuring no data is lost or corrupted across any transfer.
Barcode (AXL FLAT)
Integrated barcode scanning on the same device and the same USB connection.
Structured Error Reporting
All errors surface through a single onError() callback with a human-readable message and a short error code (E001–E008).

Supported Devices

The SDK supports all AXL hardware variants. Device capabilities vary by model.

DeviceRFIDBarcodeAntennasUSB
AXL FLAT✓✓1 (fixed active)✓
AXL BIN✓—Up to 4✓

How It Works

The SDK sits between your application and the AXL hardware. Your app calls commands and receives events — the SDK handles everything in between.

LayerResponsibility
Your ApplicationCalls commands (connect(), startReading(), checkoutCompleted()) and implements SdkListener to receive events.
AXL SDKManages connection lifecycle, serialises commands, handles error recovery, and dispatches responses to listener callbacks on the main thread.
USB Serial LayerOpens the USB serial port, selects the correct driver for the connected device, reads and writes raw bytes.
AXL HardwareRuns firmware that receives framed commands, drives the RFID/Barcode hardware, and sends back framed events.

Requirements

Build environment, Android API levels, and hardware prerequisites.

RequirementValue
Android version5.0 and above (API 21+)
Target API34 (Android 14)
LanguageJava 11 · Kotlin
USBUSB OTG support on the Android device
Dependencyusb-serial-for-android 3.8.1 or later (via JitPack)
DistributionAAR file — drop into app/libs/

Quick Start

The minimal integration — connect to an AXL device and receive EPC tags in five steps.

  1. 1
    Add the SDK
    Copy axlsdk.aar into app/libs/. Add JitPack to your repositories and declare the AAR and usb-serial-for-android as dependencies in your build.gradle.
  2. 2
    Declare USB permissions
    Add android.hardware.usb.host to your AndroidManifest.xml and include a device_filter.xml listing the VID/PID of your AXL device so Android routes USB attach events to your app.
  3. 3
    Initialise the SDK
    Call Sdk.getInstance().initialize(context) once when your activity starts. Optionally pass a SdkConfig to set timeout, batch size, or logging preferences.
  4. 4
    Implement SdkListener
    Implement the SdkListener interface in your Activity and register it with sdk.setListener(this). At minimum handle onConnected(), onTagDetected(epc), and onError(message).
  5. 5
    Connect and scan
    Call sdk.connect() when the user taps Connect. On onConnected(), call sdk.startReading(). Each EPC tag fires onTagDetected(epc). Call sdk.checkoutCompleted(txnId, epcs) to submit the transaction.
Android

Installation

Add the AAR to your project, configure Gradle dependencies, update your AndroidManifest, and add the USB device filter.

1 — Add the AAR file

Download axlsdk.aar from the release and copy it into your app's libs/ folder.

Project structure
app/
└── libs/
    └── axlsdk.aar

2 — Configure Gradle

The SDK depends on usb-serial-for-android, which is hosted on JitPack. Add the repository and declare both dependencies.

Kotlin DSL — settings.gradle.kts
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://jitpack.io") }
    }
}
Kotlin DSL — app/build.gradle.kts
dependencies {
    implementation(files("libs/axlsdk.aar"))
    implementation("com.github.mik3y:usb-serial-for-android:3.9.0")
}
Groovy DSL — build.gradle (project level)
allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
}
Groovy DSL — app/build.gradle
dependencies {
    implementation files('libs/axlsdk.aar')
    implementation 'com.github.mik3y:usb-serial-for-android:3.9.0'
}

3 — Update AndroidManifest.xml

Declare the USB host feature and the USB device attached intent filter.

AndroidManifest.xml
<uses-feature
    android:name="android.hardware.usb.host"
    android:required="false" />

<activity android:name=".MainActivity" android:exported="true">

     <!-- App launcher -->
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
   </intent-filter>
 <!-- Launch when AXL device is plugged in -->

  <intent-filter>
        <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
    </intent-filter>
    <meta-data
        android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
        android:resource="@xml/device_filter" />
</activity>

4 — Add device_filter.xml

Create res/xml/device_filter.xml. Android uses this file to decide which USB devices auto-launch your app on plug-in. It does not affect sdk.connect() — if your app is already running, the SDK connects regardless of what is listed here. Add entries for any AXL device you want to trigger an auto-launch. Values are in decimal — the hex equivalents are shown in the comments.

res/xml/device_filter.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    
        <!-- FTDI FT232R  VID=0x0403  PID=0x6001 -->
    
        <usb-device vendor-id="1027"  product-id="24577" />
    
        <!-- FTDI FT2232H VID=0x0403  PID=0x6010 -->
    
        <usb-device vendor-id="1027"  product-id="24592" />
  
        <!-- AXL FLAT  VID=0x0483  PID=0x5740 -->
    
        <usb-device vendor-id="1155"  product-id="22336" />
    
        <!-- AXL FLAT  VID=0x0483  PID=0x5741 (alt PID) -->
    
        <usb-device vendor-id="1155"  product-id="22337" />
      
        <!-- Silicon Labs CP210x VID=0x10C4  PID=0xEA60 -->
    
        <usb-device vendor-id="4292"  product-id="60000" />
    
        <!-- CH340 / CH341  VID=0x1A86  PID=0x7523 -->
    
        <usb-device vendor-id="6790"  product-id="29987" />
    
        <!-- CH9102 (CH343) VID=0x1A86  PID=0x55D4 -->
    
        <usb-device vendor-id="6790"  product-id="21972" />
    
        <!-- AXLSYSTEMS AXLECU VID=0x061F  PID=0x3D38 -->
    
        <usb-device vendor-id="1567"  product-id="15672" />
</resources>
device_filter.xml controls auto-launch only — it tells Android which USB devices should launch your app on plug-in. It has no effect on sdk.connect(). If your app is already running and the user taps Connect, the SDK will connect to any supported device regardless of what is listed in device_filter.xml.

When a new AXL device is added to the SDK, the only required change is adding its VID/PID to buildProber() inside the SDK. Update your app's device_filter.xml only if you also want the app to auto-launch when that device is plugged in.

Initialization

Initialize the SDK singleton once when your Activity starts. Set your listener before calling connect() — callbacks will not fire without one.

Basic initialization

Call initialize(context) with default settings. This is sufficient for most integrations.

Java
Sdk sdk = Sdk.getInstance();
sdk.initialize(this);
sdk.setListener(this); // Activity implements SdkListener
Kotlin
val sdk = Sdk.getInstance()
sdk.initialize(this)
sdk.setListener(this) // Activity implements SdkListener

Initialization with custom config

Pass a SdkConfig to override defaults — command timeout, batch size, and debug logging.

Java
SdkConfig config = new SdkConfig.Builder()
    .commandTimeoutMs(5000)   // how long to wait for a device ACK (default: 5000 ms)
    .checkoutBatchSize(20)    // EPCs per checkout_complete command (default: 20)
    .debugLogging(false)      // verbose SDK logging — enable during development
    .build();

Sdk sdk = Sdk.getInstance();
sdk.initialize(this, config);
sdk.setListener(this);

SdkConfig options

OptionDefaultDescription
commandTimeoutMs(n)5000 msHow long the SDK waits for a device ACK before firing onError([E003]).
checkoutBatchSize(n)20Maximum EPCs per checkout_complete command. Large lists are split into sequential batches — each batch is ACK'd before the next is sent.
debugLogging(bool)falseEnables verbose SDK log output. Useful during development. Disable for production builds.
baudRate(n)115200USB serial baud rate. Only change this if the device firmware uses a non-default rate.

Where to initialize

Initialize in Activity.onCreate() and release in Activity.onStop() when the app is finishing. This ensures the SDK lifecycle matches the Activity lifecycle.

Java — MainActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Sdk sdk = Sdk.getInstance();
    sdk.initialize(this, new SdkConfig.Builder()
        .checkoutBatchSize(20)
        .debugLogging(true)
        .build());
    sdk.setListener(this);
}

@Override
protected void onStop() {
    super.onStop();
    if (isFinishing() && sdk != null) {
        if (sdk.isConnected()) sdk.disconnectBlocking();
        sdk.releasePort(); // close USB port so other apps can connect
    }
}
Call sdk.setListener(this) after initialize() and before connect(). If no listener is set, all SDK events — onConnected(), onTagDetected(), onError() — are silently dropped.

USB Connection

Connect to an AXL device over USB OTG. The SDK manages the full lifecycle — permission request, driver selection, handshake, and event dispatch.

Calling connect()

Call sdk.connect() after initialize() and setListener(). If Android has not yet granted USB permission for the attached device, a system dialog is shown automatically. connect() completes once the user approves and the handshake succeeds.

Java
connectBtn.setOnClickListener(v -> sdk.connect());
Kotlin
connectBtn.setOnClickListener { sdk.connect() }

Connection sequence

A successful connect triggers three sequential callbacks on the main thread:

CallbackWhenNotes
onConnected()USB port open, handshake completeSafe to call startReading() or sendDeviceConfig() from here.
onDeviceIdentified(String type)Device type resolvedValue is one of "FLAT", "BIN". Use to show or hide device-specific UI.
onDeviceConfigLoaded(JSONObject config)Device config fetchedContains live hardware settings. Use to pre-populate a settings dialog.

Cable replug handling

When the USB cable is removed, onDisconnected() fires. Call sdk.connect() again after replug to re-establish the session. The SDK detects the fresh device and opens a new serial port — no need to call initialize() again.

Java — SdkListener
@Override
public void onDisconnected() {
    runOnUiThread(() -> {
        statusLabel.setText("Disconnected");
        connectBtn.setEnabled(true);
    });
}

// User taps Connect after replug
connectBtn.setOnClickListener(v -> sdk.connect());
connect() is asynchronous. Do not call startReading() immediately after — wait for onConnected().
Reading Data

RFID Scanning

Start the RFID reader, receive EPC tags in real time, and control the scan session.

Starting a scan

Call sdk.startReading() from onConnected() or from a user action. Each tag antenna read fires onTagDetected(String epc) on the main thread. The EPC value is a hexadecimal string (e.g. "E28011052000634D1E5E2A47"). The same physical tag may fire multiple times — deduplicate with a HashSet.

Java
private final Set<String> scannedEpcs = new HashSet<>();

@Override
public void onConnected() {
    scannedEpcs.clear();
    sdk.startReading();
}

@Override
public void onTagDetected(String epc) {
    if (scannedEpcs.add(epc)) {
        runOnUiThread(() -> tagCountLabel.setText(scannedEpcs.size() + " tags"));
    }
}
Kotlin
private val scannedEpcs = mutableSetOf<String>()

override fun onConnected() {
    scannedEpcs.clear()
    sdk.startReading()
}

override fun onTagDetected(epc: String) {
    if (scannedEpcs.add(epc)) {
        runOnUiThread { tagCountLabel.text = "${scannedEpcs.size} tags" }
    }
}

Pausing and resuming

Pause the reader without ending the session. Tags collected so far are preserved in your set. Resume with startReading().

Java
pauseBtn.setOnClickListener(v -> sdk.pauseReading());
resumeBtn.setOnClickListener(v -> sdk.startReading());

Stopping and submitting

Call sdk.stopReading() to end the session, then checkoutCompleted() to submit collected tags.

Java
checkoutBtn.setOnClickListener(v -> {
    sdk.stopReading();
    sdk.checkoutCompleted(generateTxnId(), new ArrayList<>(scannedEpcs));
});

Checkout

Submit collected EPC tags as a checkout transaction. The SDK automatically batches large lists and sequences the commands — each batch is ACK'd before the next is sent.

Submitting a transaction

Call checkoutCompleted() with a unique transaction ID and the full list of scanned EPCs. The SDK splits the list into batches (default: 20 EPCs) and sends them sequentially to the device.

Java
sdk.checkoutCompleted(txnId, new ArrayList<>(scannedEpcs));
Kotlin
sdk.checkoutCompleted(txnId, scannedEpcs.toList())

Batching behaviour

ScenarioBehaviour
20 EPCs, batch size 201 batch → 1 ACK → onCheckoutConfirmed fires.
45 EPCs, batch size 203 batches (20 + 20 + 5) → 3 ACKs → onCheckoutConfirmed fires.

Confirmation callback

onCheckoutConfirmed(txnId) fires after all batches are ACK'd by the device. Clear your EPC set here.

Java — SdkListener
@Override
public void onCheckoutConfirmed(String txnId) {
    runOnUiThread(() -> showCheckoutSuccess(txnId));
    scannedEpcs.clear();
}

Disconnecting

Disconnect gracefully and release the USB port so other apps can access the device.

disconnect() vs disconnectBlocking()

MethodBehaviourWhen to use
disconnect()Asynchronous — returns immediately, fires onDisconnected() when done.User taps a Disconnect button. Keeps UI responsive.
disconnectBlocking()Synchronous — blocks the calling thread until disconnect completes. No callback.Activity.onStop() when isFinishing() is true. Ensures clean shutdown before the process exits.

Releasing the USB port

Call sdk.releasePort() after disconnectBlocking() in the app-close path. Without it, the SDK holds the USB serial port open in a keep-alive state — the next app connecting to the same device will receive [E003] COMMAND_TIMEOUT.

Recommended app-close pattern

Java — Activity.onStop()
@Override
protected void onStop() {
    super.onStop();
    if (isFinishing() && sdk != null) {
        if (sdk.isConnected()) sdk.disconnectBlocking();
        sdk.releasePort();
    }
}
Kotlin — Activity.onStop()
override fun onStop() {
    super.onStop()
    if (isFinishing && sdk != null) {
        if (sdk.isConnected()) sdk.disconnectBlocking()
        sdk.releasePort()
    }
}
API Reference

SdkListener Callbacks

All callbacks are delivered on the main thread. Implement the interface in your Activity and register with sdk.setListener(this).

CallbackParametersRequiredDescription
onConnected()—✓USB handshake complete. Safe to call startReading() or sendDeviceConfig().
onDisconnected()—✓USB cable removed or disconnect() completed. Update UI and re-enable the Connect button.
onTagDetected(String epc)epc — hex EPC string✓Fires for every antenna read. The same physical tag fires multiple times — deduplicate with a HashSet.
onError(String message)message — [Exxx] description✓All SDK errors route here. The string always starts with an error code in brackets. See Error Codes.
onDeviceIdentified(String type)type — "FLAT" · "BIN"—Fires after onConnected(). Use to show or hide device-specific UI.
onDeviceConfigLoaded(JSONObject config)config — full device config JSON—Fires after handshake and on each explicit getDeviceConfig() call. Use to pre-populate a settings dialog.
onCheckoutConfirmed(String txnId)txnId — echoed from checkoutCompleted()—Fires when all EPC batches have been ACK'd by the device.
onScanSessionEnded()——Fires when stopReading() completes and the device confirms the session is closed.
onReadingPaused()——Device acknowledged pauseReading(). Reader is paused, session is preserved.
onConfigUpdated()——Device acknowledged sendDeviceConfig(). Settings are live.
onModuleTemperatureReceived(Int)tempCelsius—Fires once per tag batch on firmware ≥ 26.2.3. Older hardware never fires this.
onHealthInfoReceived(JSONObject)data—Response to getHealthInfo(). Contains module_temperature and optional SD card fields (sd_total_mb, sd_used_mb, sd_free_mb).
onNetworkStatusReceived(JSONObject)status—Response to getNetworkStatus(). AXLF2 and later. Contains lan, wifi.connected, wifi.ssid, ip, internet.
onDeviceLogReceived(String, String, String)level, message, timestamp—Real-time firmware log event. level: "USB_RX" · "RFID" · "ALERT" · "ERROR".
onBarcodeTagDetected(String)data—Scanned barcode string from startBarcodeReading().

Minimal implementation

Java
public class MainActivity extends AppCompatActivity implements SdkListener {

    @Override public void onConnected() {
        runOnUiThread(() -> statusLabel.setText("Connected"));
        sdk.startReading();
    }

    @Override public void onDisconnected() {
        runOnUiThread(() -> statusLabel.setText("Disconnected"));
    }

    @Override public void onTagDetected(String epc) {
        scannedEpcs.add(epc);
        runOnUiThread(() -> countLabel.setText(scannedEpcs.size() + " tags"));
    }

    @Override public void onError(String message) {
        runOnUiThread(() -> Toast.makeText(this, message, Toast.LENGTH_LONG).show());
    }
}

SDK Modes

The SDK tracks its own state. Read it at any time with sdk.getCurrentMode() to guard UI actions or debug connection issues.

ModeDescriptionValid next actions
IDLESDK initialized, no device connected.connect()
CONNECTEDDevice connected and handshake complete. Ready for commands.startReading() · sendDeviceConfig() · getDeviceConfig() · disconnect()
SCANNINGRFID reader active. onTagDetected() is firing.pauseReading() · stopReading()
PAUSEDReader paused, session preserved, no tag events.startReading() to resume · stopReading() to end
CHECKOUT_PENDINGCheckout batches in flight, awaiting device ACKs.None — wait for onCheckoutConfirmed().
DISCONNECTEDWas connected, now disconnected (cable removed or explicit disconnect).connect()

Guarding actions by mode

Java
SdkMode mode = sdk.getCurrentMode();

switch (mode) {
    case IDLE:
    case DISCONNECTED:
        sdk.connect();
        break;
    case CONNECTED:
        sdk.startReading();
        break;
    case SCANNING:
        sdk.stopReading();
        break;
    case CHECKOUT_PENDING:
        // wait — do not issue new commands
        break;
}

Error Codes

All errors arrive via onError(String). The string always starts with [Exxx] followed by a human-readable description. Match on the code prefix to handle errors programmatically.

CodeNameCauseRecovery
E001DEVICE_NOT_CONNECTEDCommand issued but no USB device is connected, or the port handle is stale (e.g. after cable replug).Call connect() again. The SDK detects the fresh device and opens a new port.
E002USB_PERMISSION_DENIEDUser dismissed or denied the Android USB permission dialog.Show an explanation and call connect() again to re-prompt.
E003COMMAND_TIMEOUTDevice did not ACK a command within commandTimeoutMs (default 5 000 ms).Check USB cable seating. Retry the command. Increase commandTimeoutMs in SdkConfig if the device is slow to respond.
E004CHECKOUT_FAILEDOne or more checkout batches were rejected or timed out before all EPCs were ACK'd.Retry checkoutCompleted() with the same transaction ID.
E005CONFIG_SEND_FAILEDDevice rejected the configuration payload — malformed JSON or an unsupported field value.Validate the RfidDeviceConfig values (region code, antenna count) against the device's supported range and retry.
E006DRIVER_NOT_FOUNDNo USB serial driver matched the connected device's VID/PID.Verify device_filter.xml includes the correct VID/PID for the connected device. See the Installation section.
E008DEVICE_ERRORThe connected device reported a hardware-level error (e.g. RF module failure).Transient — scanning typically continues. Log the message and monitor frequency. If repeated, check antenna connections and power level.

Handling errors in code

Java — SdkListener
@Override
public void onError(String message) {
    if (message.startsWith("[E001]") || message.startsWith("[E002]")) {
        runOnUiThread(this::showReconnectPrompt);
    } else if (message.startsWith("[E003]")) {
        runOnUiThread(this::showTimeoutDialog);
    } else {
        runOnUiThread(() ->
            Toast.makeText(this, message, Toast.LENGTH_LONG).show());
    }
}

Device Configuration

Push hardware settings to the device at runtime over USB. Configuration takes effect immediately without a device restart.

Building and sending a config

Use RfidDeviceConfig.Builder to construct a config. Only fields you set are included in the payload — unset fields keep the device's current value.

Java
RfidDeviceConfig config = new RfidDeviceConfig.Builder()
    .region("ETSI")          // frequency region
    .antennaPower(25)         // transmit power in dBm
    .antennaCount(1)          // 1 for AXL FLAT; up to 4 for AXL BIN
    .hopEnabled(true)         // frequency hopping within region
    .wifiSsid("MyNetwork")
    .wifiPassword("secret")
    .wifiSecurity("WPA2")
    .build();

sdk.sendDeviceConfig(config);

RfidDeviceConfig.Builder options

MethodTypeDescription
region(String)StringFrequency region. Common values: "FCC" (US/Canada), "ETSI" (EU), "CN" (China), "KR" (Korea).
antennaPower(int)int (dBm)RF transmit power. Supported range varies by region — check device firmware docs.
antennaCount(int)intNumber of active antennas. AXL FLAT: always 1. AXL BIN: 1–4.
hopEnabled(boolean)booleanEnable frequency hopping within the selected region. Required in most regions by radio regulations.
wifiSsid(String)StringWiFi network name. Leave unset to preserve the device's current WiFi config.
wifiPassword(String)StringWiFi password.
wifiSecurity(String)StringSecurity type. Values: "OPEN", "WPA2", "WPA3".
wifiIpMode(String)StringIP assignment. Values: "DHCP", "STATIC".
wifiStaticIp(String)StringStatic IP address. Used when wifiIpMode is "STATIC".

Antenna power ranges

read_power uses different units depending on the device family. Using an AXLF1-scale value on AXLF2 (or vice-versa) produces incorrect RF output — always gate on deviceInfo.moduleId.

DeviceUnitRangeSDK constant
AXLF11/100 dBm0–2400RfidDeviceConfig.MAX_READ_POWER_AXLF1
AXLB11/100 dBm0–2400RfidDeviceConfig.MAX_READ_POWER_AXLB1
AXLF2dBm (direct)0–28RfidDeviceConfig.MAX_READ_POWER_AXLF2
AXLF3dBm (direct)0–28RfidDeviceConfig.MAX_READ_POWER_AXLF3
Kotlin — gate power on module ID
override fun onDeviceIdentified(deviceInfo: DeviceInfo) {
    val maxPower = when (deviceInfo.moduleId) {
        DeviceInfo.MODULE_ID_AXLF2,
        DeviceInfo.MODULE_ID_AXLF3 -> RfidDeviceConfig.MAX_READ_POWER_AXLF2  // 28 dBm direct
        else                       -> RfidDeviceConfig.MAX_READ_POWER_AXLF1  // 2400 (1/100 dBm)
    }
    val config = RfidDeviceConfig.Builder()
        .antenna(1, true, maxPower)
        .build()
    sdk.sendDeviceConfig(config)
}

Fetching the current config

Call sdk.getDeviceConfig() to request the device's live configuration. The result fires onDeviceConfigLoaded(JSONObject) asynchronously. Useful for pre-populating a settings dialog when the user taps a settings gear icon.

Java — SdkListener
// Trigger from settings button
settingsBtn.setOnClickListener(v -> sdk.getDeviceConfig());

// Receive result
@Override
public void onDeviceConfigLoaded(JSONObject config) {
    String region = config.optString("region", "FCC");
    int power     = config.optInt("antenna_power", 20);
    int antennas  = config.optInt("antenna_count", 1);
    // ... populate settings UI fields
}
Production

Diagnostics & Logging

The SDK logs to Android Logcat under the tag AXL_SDK and maintains an in-memory ring buffer for field support dumps.

Verbose logging during development

Enable debugLogging in SdkConfig to print all SDK activity to Logcat — commands sent, responses received, CRC checks, and state transitions. Disable in production: verbose mode adds measurable overhead on low-end devices.

Java
SdkConfig config = new SdkConfig.Builder()
    .debugLogging(BuildConfig.DEBUG)   // on in debug builds, off in release
    .build();

sdk.initialize(this, config);

Filtering Logcat output

adb
adb logcat -s AXL_SDK

Dumping the ring buffer on error

Call sdk.dumpLogs() to retrieve recent SDK log lines as a single string. Attach this to crash reports or support emails to give the hardware team a snapshot of what the SDK was doing before the error occurred.

Java — in onError()
@Override
public void onError(String message) {
    String logDump = sdk.dumpLogs();
    // Attach to crash report or forward to support
    sendToSupport(message, logDump);
}

Real-time log listener

Register a log listener to receive each SDK log line as it is written. Use this in production to forward WARN and ERROR lines to a remote logging service without enabling full verbose mode.

Java
sdk.setLogListener((level, tag, message) -> {
    if (level == LogLevel.WARN || level == LogLevel.ERROR) {
        myAnalytics.log(level.name(), tag, message);
    }
});
The ring buffer holds the most recent log lines in memory. It does not persist across process restarts. Call dumpLogs() before the process exits if you need to capture a session-end snapshot.
Configuration

Settings Apply Rules

Different settings require different methods to apply. Some take effect immediately; others require a reconnect.

SettingHow to applyTransport
Baud ratesdk.reconfigure(newConfig) then sdk.connect() — cannot change on a live connection.USB only
Region, Protocol, Antennas, Read Powersdk.sendDeviceConfig(config) — safe while CONNECTED or PAUSED.USB
WiFi / LANIncluded in sendDeviceConfig(config) via .networkWifi() or .networkLan().USB
output_mode / output_formatSet via .outputMode(n) / .outputFormat(n) in RfidDeviceConfig.Builder — AXLF3 only.USB
usb_modeSet via .usbMode(n) in RfidDeviceConfig.Builder — AXLF3 only.USB
clear_btn_delaySet via .clearBtnDelay(ms) in RfidDeviceConfig.Builder — AXLF3 only.USB
Checkout Batch SizeSet in SdkConfig.Builder().checkoutBatchSize(n) before initialize().SDK only
When SCANNING is active, defer sendDeviceConfig() until stopReading() completes.
Device Variants

AXLF2 Device Features

AXLF2 (module_id = "AXLF2") is a newer AXL FLAT firmware variant with an expanded config set and live network reporting. All standard SDK operations work normally.

Detecting AXLF2

Kotlin
override fun onDeviceIdentified(deviceInfo: DeviceInfo) {
    if (deviceInfo.moduleId == DeviceInfo.MODULE_ID_AXLF2) {
        // AXLF2 — WiFi config and network_status are available
    }
        }

Antenna power — direct dBm (0–28)

AXLF2 uses direct dBm for antenna power. Do not use the 1/100 dBm scale from AXLF1/AXLB1 — sending the wrong scale produces incorrect RF output.

Kotlin
val config = RfidDeviceConfig.Builder()
    .region("ID")
    .antenna(1, true, RfidDeviceConfig.MAX_READ_POWER_AXLF2)   // 28 dBm
    .networkWifi("MySSID", "WPA2", "password")
    .build()

sdk.sendDeviceConfig(config)

Live network status

Call sdk.getNetworkStatus() to request the device's current network state. Fires onNetworkStatusReceived(JSONObject).

Kotlin
sdk.getNetworkStatus()

override fun onNetworkStatusReceived(status: JSONObject) {
    val lan      = status.optBoolean("lan", false)
    val internet = status.optBoolean("internet", false)
    val ip       = status.optString("ip", "")
    val wifi     = status.optJSONObject("wifi")
    val ssid     = wifi?.optString("ssid", "") ?: ""
}
FieldTypeNotes
lanBooleantrue when wired LAN is active
wifi.connectedBooleantrue when WiFi is connected
wifi.ssidStringconnected network name
ipStringdevice IP address (empty when offline)
internetBooleantrue when internet is reachable
Only call getNetworkStatus() on AXLF2 and later devices. Gate on DeviceInfo.hasCapability(deviceInfo.moduleId, DeviceInfo.CAP_WIFI) from onDeviceIdentified().

AXLF3 Device Features

AXLF3 (module_id = "AXLF3") includes everything AXLF2 supports plus EPC-to-UPC conversion configuration. These four fields are AXLF3 only — they are absent from all other device types.

Detecting AXLF3

Kotlin
override fun onDeviceIdentified(deviceInfo: DeviceInfo) {
    val hasEpcUpc = DeviceInfo.hasCapability(deviceInfo.moduleId, DeviceInfo.CAP_EPC_UPC_CONFIG)
    // Show EPC→UPC settings UI only when hasEpcUpc == true
}

AXLF3-only config fields

FieldBuilder methodValues
output_mode.outputMode(int)0 = Raw EPC (default) · 1 = UPC-POS (auto-decode) · 2 = UPC-Manual
output_format.outputFormat(int)0 = UPC-A 12 digits (default) · 1 = GTIN-13 · 2 = GTIN-14
usb_mode.usbMode(int)0 = HID keyboard (default) · 1 = Serial CDC
clear_btn_delay.clearBtnDelay(int)Long-press delay in ms. Default: 3000

Sending AXLF3 config

Kotlin
val config = RfidDeviceConfig.Builder()
    .outputMode(1)         // AXLF3 only — 0=EPC, 1=UPC-POS, 2=UPC-Manual
    .outputFormat(0)       // AXLF3 only — 0=UPC-A, 1=GTIN-13, 2=GTIN-14
    .usbMode(1)            // AXLF3 only — 0=HID, 1=Serial
    .clearBtnDelay(3000)   // AXLF3 only — ms
    .region("ID")
    .antenna(1, true, RfidDeviceConfig.MAX_READ_POWER_AXLF3)   // 28 dBm
    .networkWifi("MySSID", "WPA2", "password")
    .build()

sdk.sendDeviceConfig(config)   // → fires onConfigUpdated() on success
AXLF3 uses the same extended config format and TYPE_SYS command type as AXLF2 — the SDK handles this automatically. No special handling is needed in app code beyond gating the AXLF3-only fields on CAP_EPC_UPC_CONFIG.

Release Schedule

Release 1YY.1.x
Support Policy

April 4

Every year

Release 2YY.2.x
Support Policy

August 4

Every year

Release 3YY.3.x
Support Policy

December 4

Every year

AXL RFID SDK — Android

v26.3.1

2026-12-04
Latest
Adds AXL Flat (extended firmware) USB detection, capability-based device routing, AXLF2 network status, AXLF3 EPC-to-UPC configuration, and several utility APIs.
Added
  • AXL Flat (VID 0x061F / PID 0x3C38) — USB auto-detection — the SDK now auto-detects this device variant. connect() identifies it automatically; it appears as "AXL Flat" in connection logs and DeviceInfo. Config is handled via the extended wire format automatically — no app changes required.
  • deviceInfo.getModuleId() and DeviceInfo.hasCapability() — DeviceInfo now carries a moduleId (e.g. "AXLF1", "AXLF2", "AXLB1") from the device handshake. Use DeviceInfo.hasCapability(moduleId, CAP_*) to gate UI features instead of comparing raw device-type strings. New module ID constants: MODULE_ID_AXLF1, MODULE_ID_AXLF2, MODULE_ID_AXLB1. New capability flags: CAP_BARCODE, CAP_WIFI, CAP_FLAT_LITE_CONFIG, CAP_HOP_FREQUENCY, CAP_BIN_FREQUENCY, CAP_SINGLE_ANTENNA.
  • sdk.getNetworkStatus() → onNetworkStatusReceived(JSONObject) — returns live network state: LAN, WiFi SSID, IP address, internet connectivity. AXLF2 and later only — gate on DeviceInfo.CAP_WIFI.
  • sdk.setDeviceDebugMode(boolean) → onDebugModeChanged(JSONObject) — sends a debug-mode toggle to the device; onDebugModeChanged fires on confirmation. While active, the SDK emits verbose TX/RX and tag-detection logs.
  • SdkConfig.Builder.connectRetries(int) — configures the max connection_sync retry count. Default 12 (covers PAX L1400 USB cold-boot ~30 s). Set to 5 for warm-boot devices that keep USB power between reconnects.
  • sdk.getVersion() / sdk.getVersionCode() — returns the SDK version as a string (e.g. "26.3.1") or integer (e.g. 260301) without importing internal SDK classes.
  • Antenna power range constants — RfidDeviceConfig.MAX_READ_POWER_AXLF1 (2400 · 1/100 dBm), MAX_READ_POWER_AXLB1 (2400), MAX_READ_POWER_AXLF2 (28 · direct dBm). Gate the slider ceiling on deviceInfo.moduleId — sending an AXLF1-scale value to AXLF2 (or vice-versa) produces incorrect RF output.
  • AXLF3 device support — EPC-to-UPC conversion configuration — AXLF3 is a new AXL Flat firmware variant that adds four EPC-to-UPC config fields on top of everything AXLF2 supports. Gate on DeviceInfo.CAP_EPC_UPC_CONFIG. New SDK additions: MODULE_ID_AXLF3, CAP_EPC_UPC_CONFIG, MAX_READ_POWER_AXLF3 (= 28, same direct-dBm scale as AXLF2). Four AXLF3-only RfidDeviceConfig.Builder fields: .outputMode(int) (0=EPC · 1=UPC-POS · 2=UPC-Manual), .outputFormat(int) (0=UPC-A · 1=GTIN-13 · 2=GTIN-14), .usbMode(int) (0=HID · 1=Serial), .clearBtnDelay(int) (ms).
Changed
  • Hop frequency table reduced to 5 channels (AXL Flat and AXL Bin) — the hop frequency table has been reduced from 20 channels (1–20) to 5 channels (1–5). Each entry is now a set of frequency values rather than a single value. Apps that display a hop frequency picker should update their range and labels accordingly.
  • RfidDeviceConfig.Builder: outputMode / outputFormat / usbMode now accept int — these three builder methods previously accepted String; they now take integer values directly (0, 1, 2) matching the device wire format. These fields apply to AXLF3 devices only.
Fixed
  • getHealthInfo() — cascading E003 errors during active RFID scanning — calling getHealthInfo() while scanning was active intermittently produced three consecutive COMMAND_TIMEOUT errors. The firmware accesses the SD card to gather diagnostics (up to ~30 s during active scanning). This is now handled correctly — no spurious errors during normal scanning.
  • RF hardware errors from the RFID module were silently dropped — firmware-level RF errors (e.g. TMR_read err: 0x01000005) were previously swallowed and incorrectly surfaced as [E004] INVALID_JSON. These errors are now delivered to onError() as [E008] DEVICE_ERROR: <message> and can be handled programmatically with message.startsWith("[E008]").
Removed
  • Sdk.setDebugLogging(boolean) removed — use SdkConfig.debugLogging(true) at initialization for pre-connect verbose logging, or sdk.setDeviceDebugMode(true) after connecting for runtime device-side debug activation.
AXL RFID SDK — Android

v26.2.9

2026-08-07
Supports AXL FLAT and AXL BIN. AXL BIN support was introduced in this version.
Added
  • AXL ECU (Bin) USB device support — the SDK now recognises the AXLSYSTEMS AXLECU hardware (VID 0x061F / PID 0x3D38). A custom buildProber() method extends the default usb-serial-for-android probe table with the AXLECU VID/PID mapped to CdcAcmSerialDriver.
Fixed
  • Stale port causes connection failure after USB cable replug — (~1–2 in 15 attempts on AXL ECU and AXL FLAT). When the previous session had no scan activity, disconnect() kept the USB serial port alive. On cable replug, Android re-enumerated the device and invalidated the old port file descriptor. Fixed: a flush IOException now closes the stale port and falls through to a fresh open.
AXL RFID SDK — Android

v26.2.8

2026-07-16
Supports AXL FLAT only.
Added
  • Sdk.releasePort() — explicit USB port release for app-close path — call from Activity.onStop() when isFinishing()=true after any disconnectBlocking(). Prevents a lingering port from causing COMMAND_TIMEOUT when another app connects. No-op for BLE/WiFi transports.
  • Sdk.getDeviceConfig() — explicit device config fetch — sends a device_config command and fires SdkListener.onDeviceConfigLoaded(JSONObject). Call from your Settings gear icon tap handler to pre-populate the Settings dialog with live device values.
  • PacketFramer — reliable packet transport layer — all USB communication is now wrapped in a frame format with CRC16-CCITT validation. Transparent to the public SDK API — all existing method signatures and callback names are unchanged.
Changed
  • MAX_PAYLOAD reduced from 120 → 64 bytes — aligns chunk size to USB Full Speed bulk transfer boundary, halving ACK latency per chunk.
  • ack_connection_sync no longer contains config_data — config is now fetched via the new device_config command immediately after connect. SDK handles both old and new handshake responses gracefully.
  • RF_INIT_TAIL_MS reduced from 55 000 ms to 15 000 ms — RF hardware initialisation no longer blocks the handshake, so the tail only needs to cover transient delays.
Fixed
  • connect() wastes up to 12 s on USB disconnect mid-handshake — when the USB link drops during a retry loop, the SDK now re-throws immediately instead of sleeping 1 s per remaining attempt.
  • Second connect within the same session fails immediately with [E003] — the 450 ms peek read in disconnect() incorrectly treated firmware health bytes as scan activity, closing the port and cold-booting the device. Removed the peek; port-close decision is now based solely on whether actual tag data was dispatched.