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.
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.
| Device | RFID | Barcode | Antennas | USB |
|---|---|---|---|---|
| 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.
| Layer | Responsibility |
|---|---|
| Your Application | Calls commands (connect(), startReading(), checkoutCompleted()) and implements SdkListener to receive events. |
| AXL SDK | Manages connection lifecycle, serialises commands, handles error recovery, and dispatches responses to listener callbacks on the main thread. |
| USB Serial Layer | Opens the USB serial port, selects the correct driver for the connected device, reads and writes raw bytes. |
| AXL Hardware | Runs firmware that receives framed commands, drives the RFID/Barcode hardware, and sends back framed events. |
Requirements
Build environment, Android API levels, and hardware prerequisites.
| Requirement | Value |
|---|---|
| Android version | 5.0 and above (API 21+) |
| Target API | 34 (Android 14) |
| Language | Java 11 · Kotlin |
| USB | USB OTG support on the Android device |
| Dependency | usb-serial-for-android 3.8.1 or later (via JitPack) |
| Distribution | AAR file — drop into app/libs/ |
Quick Start
The minimal integration — connect to an AXL device and receive EPC tags in five steps.
- 1Add the SDKCopy
axlsdk.aarintoapp/libs/. Add JitPack to your repositories and declare the AAR andusb-serial-for-androidas dependencies in yourbuild.gradle. - 2Declare USB permissionsAdd
android.hardware.usb.hostto yourAndroidManifest.xmland include adevice_filter.xmllisting the VID/PID of your AXL device so Android routes USB attach events to your app. - 3Initialise the SDKCall
Sdk.getInstance().initialize(context)once when your activity starts. Optionally pass aSdkConfigto set timeout, batch size, or logging preferences. - 4Implement SdkListenerImplement the
SdkListenerinterface in your Activity and register it withsdk.setListener(this). At minimum handleonConnected(),onTagDetected(epc), andonError(message). - 5Connect and scanCall
sdk.connect()when the user taps Connect. OnonConnected(), callsdk.startReading(). Each EPC tag firesonTagDetected(epc). Callsdk.checkoutCompleted(txnId, epcs)to submit the transaction.
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.
app/
└── libs/
└── axlsdk.aar2 — Configure Gradle
The SDK depends on usb-serial-for-android, which is hosted on JitPack. Add the repository and declare both dependencies.
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}dependencies {
implementation(files("libs/axlsdk.aar"))
implementation("com.github.mik3y:usb-serial-for-android:3.9.0")
}allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}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.
<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.
<?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.
Sdk sdk = Sdk.getInstance();
sdk.initialize(this);
sdk.setListener(this); // Activity implements SdkListenerval sdk = Sdk.getInstance()
sdk.initialize(this)
sdk.setListener(this) // Activity implements SdkListenerInitialization with custom config
Pass a SdkConfig to override defaults — command timeout, batch size, and debug logging.
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
| Option | Default | Description |
|---|---|---|
commandTimeoutMs(n) | 5000 ms | How long the SDK waits for a device ACK before firing onError([E003]). |
checkoutBatchSize(n) | 20 | Maximum EPCs per checkout_complete command. Large lists are split into sequential batches — each batch is ACK'd before the next is sent. |
debugLogging(bool) | false | Enables verbose SDK log output. Useful during development. Disable for production builds. |
baudRate(n) | 115200 | USB 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.
@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
}
}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.
connectBtn.setOnClickListener(v -> sdk.connect());connectBtn.setOnClickListener { sdk.connect() }Connection sequence
A successful connect triggers three sequential callbacks on the main thread:
| Callback | When | Notes |
|---|---|---|
onConnected() | USB port open, handshake complete | Safe to call startReading() or sendDeviceConfig() from here. |
onDeviceIdentified(String type) | Device type resolved | Value is one of "FLAT", "BIN". Use to show or hide device-specific UI. |
onDeviceConfigLoaded(JSONObject config) | Device config fetched | Contains 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.
@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().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.
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"));
}
}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().
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.
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.
sdk.checkoutCompleted(txnId, new ArrayList<>(scannedEpcs));sdk.checkoutCompleted(txnId, scannedEpcs.toList())Batching behaviour
| Scenario | Behaviour |
|---|---|
| 20 EPCs, batch size 20 | 1 batch → 1 ACK → onCheckoutConfirmed fires. |
| 45 EPCs, batch size 20 | 3 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.
@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()
| Method | Behaviour | When 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
@Override
protected void onStop() {
super.onStop();
if (isFinishing() && sdk != null) {
if (sdk.isConnected()) sdk.disconnectBlocking();
sdk.releasePort();
}
}override fun onStop() {
super.onStop()
if (isFinishing && sdk != null) {
if (sdk.isConnected()) sdk.disconnectBlocking()
sdk.releasePort()
}
}SdkListener Callbacks
All callbacks are delivered on the main thread. Implement the interface in your Activity and register with sdk.setListener(this).
| Callback | Parameters | Required | Description |
|---|---|---|---|
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
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.
| Mode | Description | Valid next actions |
|---|---|---|
IDLE | SDK initialized, no device connected. | connect() |
CONNECTED | Device connected and handshake complete. Ready for commands. | startReading() · sendDeviceConfig() · getDeviceConfig() · disconnect() |
SCANNING | RFID reader active. onTagDetected() is firing. | pauseReading() · stopReading() |
PAUSED | Reader paused, session preserved, no tag events. | startReading() to resume · stopReading() to end |
CHECKOUT_PENDING | Checkout batches in flight, awaiting device ACKs. | None — wait for onCheckoutConfirmed(). |
DISCONNECTED | Was connected, now disconnected (cable removed or explicit disconnect). | connect() |
Guarding actions by mode
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.
| Code | Name | Cause | Recovery |
|---|---|---|---|
E001 | DEVICE_NOT_CONNECTED | Command 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. |
E002 | USB_PERMISSION_DENIED | User dismissed or denied the Android USB permission dialog. | Show an explanation and call connect() again to re-prompt. |
E003 | COMMAND_TIMEOUT | Device 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. |
E004 | CHECKOUT_FAILED | One or more checkout batches were rejected or timed out before all EPCs were ACK'd. | Retry checkoutCompleted() with the same transaction ID. |
E005 | CONFIG_SEND_FAILED | Device 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. |
E006 | DRIVER_NOT_FOUND | No 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. |
E008 | DEVICE_ERROR | The 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
@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.
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
| Method | Type | Description |
|---|---|---|
region(String) | String | Frequency 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) | int | Number of active antennas. AXL FLAT: always 1. AXL BIN: 1–4. |
hopEnabled(boolean) | boolean | Enable frequency hopping within the selected region. Required in most regions by radio regulations. |
wifiSsid(String) | String | WiFi network name. Leave unset to preserve the device's current WiFi config. |
wifiPassword(String) | String | WiFi password. |
wifiSecurity(String) | String | Security type. Values: "OPEN", "WPA2", "WPA3". |
wifiIpMode(String) | String | IP assignment. Values: "DHCP", "STATIC". |
wifiStaticIp(String) | String | Static 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.
| Device | Unit | Range | SDK constant |
|---|---|---|---|
| AXLF1 | 1/100 dBm | 0–2400 | RfidDeviceConfig.MAX_READ_POWER_AXLF1 |
| AXLB1 | 1/100 dBm | 0–2400 | RfidDeviceConfig.MAX_READ_POWER_AXLB1 |
| AXLF2 | dBm (direct) | 0–28 | RfidDeviceConfig.MAX_READ_POWER_AXLF2 |
| AXLF3 | dBm (direct) | 0–28 | RfidDeviceConfig.MAX_READ_POWER_AXLF3 |
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.
// 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
}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.
SdkConfig config = new SdkConfig.Builder()
.debugLogging(BuildConfig.DEBUG) // on in debug builds, off in release
.build();
sdk.initialize(this, config);Filtering Logcat output
adb logcat -s AXL_SDKDumping 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.
@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.
sdk.setLogListener((level, tag, message) -> {
if (level == LogLevel.WARN || level == LogLevel.ERROR) {
myAnalytics.log(level.name(), tag, message);
}
});dumpLogs() before the process exits if you need to capture a session-end snapshot.Settings Apply Rules
Different settings require different methods to apply. Some take effect immediately; others require a reconnect.
| Setting | How to apply | Transport |
|---|---|---|
| Baud rate | sdk.reconfigure(newConfig) then sdk.connect() — cannot change on a live connection. | USB only |
| Region, Protocol, Antennas, Read Power | sdk.sendDeviceConfig(config) — safe while CONNECTED or PAUSED. | USB |
| WiFi / LAN | Included in sendDeviceConfig(config) via .networkWifi() or .networkLan(). | USB |
| output_mode / output_format | Set via .outputMode(n) / .outputFormat(n) in RfidDeviceConfig.Builder — AXLF3 only. | USB |
| usb_mode | Set via .usbMode(n) in RfidDeviceConfig.Builder — AXLF3 only. | USB |
| clear_btn_delay | Set via .clearBtnDelay(ms) in RfidDeviceConfig.Builder — AXLF3 only. | USB |
| Checkout Batch Size | Set in SdkConfig.Builder().checkoutBatchSize(n) before initialize(). | SDK only |
SCANNING is active, defer sendDeviceConfig() until stopReading() completes.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
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.
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).
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", "") ?: ""
}| Field | Type | Notes |
|---|---|---|
lan | Boolean | true when wired LAN is active |
wifi.connected | Boolean | true when WiFi is connected |
wifi.ssid | String | connected network name |
ip | String | device IP address (empty when offline) |
internet | Boolean | true when internet is reachable |
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
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
| Field | Builder method | Values |
|---|---|---|
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
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 successTYPE_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
April 4
Every year
August 4
Every year
December 4
Every year
v26.3.1
2026-12-04- AXL Flat (VID
0x061F/ PID0x3C38) — USB auto-detection — the SDK now auto-detects this device variant.connect()identifies it automatically; it appears as"AXL Flat"in connection logs andDeviceInfo. Config is handled via the extended wire format automatically — no app changes required. deviceInfo.getModuleId()andDeviceInfo.hasCapability()—DeviceInfonow carries amoduleId(e.g."AXLF1","AXLF2","AXLB1") from the device handshake. UseDeviceInfo.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 onDeviceInfo.CAP_WIFI.sdk.setDeviceDebugMode(boolean)→onDebugModeChanged(JSONObject)— sends a debug-mode toggle to the device;onDebugModeChangedfires on confirmation. While active, the SDK emits verbose TX/RX and tag-detection logs.SdkConfig.Builder.connectRetries(int)— configures the maxconnection_syncretry 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 ondeviceInfo.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-onlyRfidDeviceConfig.Builderfields:.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).
- 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/usbModenow acceptint— these three builder methods previously acceptedString; they now take integer values directly (0, 1, 2) matching the device wire format. These fields apply to AXLF3 devices only.
getHealthInfo()— cascading E003 errors during active RFID scanning — callinggetHealthInfo()while scanning was active intermittently produced three consecutiveCOMMAND_TIMEOUTerrors. 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 toonError()as[E008] DEVICE_ERROR: <message>and can be handled programmatically withmessage.startsWith("[E008]").
Sdk.setDebugLogging(boolean)removed — useSdkConfig.debugLogging(true)at initialization for pre-connect verbose logging, orsdk.setDeviceDebugMode(true)after connecting for runtime device-side debug activation.
v26.2.9
2026-08-07- AXL ECU (Bin) USB device support — the SDK now recognises the AXLSYSTEMS AXLECU hardware (VID
0x061F/ PID0x3D38). A custombuildProber()method extends the default usb-serial-for-android probe table with the AXLECU VID/PID mapped toCdcAcmSerialDriver.
- 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 flushIOExceptionnow closes the stale port and falls through to a fresh open.
v26.2.8
2026-07-16Sdk.releasePort()— explicit USB port release for app-close path — call fromActivity.onStop()whenisFinishing()=trueafter anydisconnectBlocking(). Prevents a lingering port from causingCOMMAND_TIMEOUTwhen another app connects. No-op for BLE/WiFi transports.Sdk.getDeviceConfig()— explicit device config fetch — sends adevice_configcommand and firesSdkListener.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.
MAX_PAYLOADreduced from 120 → 64 bytes — aligns chunk size to USB Full Speed bulk transfer boundary, halving ACK latency per chunk.ack_connection_syncno longer containsconfig_data— config is now fetched via the newdevice_configcommand immediately after connect. SDK handles both old and new handshake responses gracefully.RF_INIT_TAIL_MSreduced 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.
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 indisconnect()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.