Skip to main content

chainway-serial

Check PyPI Python License

Asynchronous Python library for the Chainway UR4 fixed UHF RFID reader, over RS-232 and TCP, built on serialx. Requires Python >= 3.14.

uv add chainway-serial

or:

pip install chainway-serial
import asyncio

from chainway_serial import ChainwayClient


async def main() -> None:
    async with ChainwayClient("socket://192.168.99.200:8888") as client:
        print(await client.get_version())

        async for tag in client.inventory():
            print(tag.epc.hex(), tag.rssi, tag.antenna)


asyncio.run(main())

Scope

Area Coverage
Transports Any serialx URL: device paths, socket://, rfc2217://, ESPHome proxies
Status Firmware, STM32 and hardware versions, device ID, temperature, return loss, antenna connection state, battery
RF Per-antenna read and write power, region, fixed frequency, Gen2 parameters, RF link, FastID, TagFocus, fast inventory mode, carrier wave
Inventory Mode selection, tag filter, single and continuous inventory with phase reporting, tag callbacks
Tag operations Read, write, block write, block erase, lock, kill, authenticate, block permalock, with tag filters
Collected tags Batch pull, counts, delete, flash pull, for auto and trigger work modes
Configuration Reader and destination addresses, work modes, trigger timing, buzzer, volume, GPO, antennas, software and factory reset
Peripherals Barcode imager, buzzer, LED
Firmware Bootloader jump and the update block flow
Discovery UDP discovery broadcast listener

Protocol status

The wire protocol is reverse engineered from the vendor Android, Java and Windows SDKs, cross-checked against the vendor's official protocol document. Every command of the document is implemented, including its module-level subset. No command has been verified against live hardware yet. The complete byte level reference, with every decoded payload layout and the unverified items, lives in docs/protocol.md. When a reader is available, uv run python scripts/probe_chainway.py socket://192.168.99.200:8888 exercises every command and writes the responses to captures/.

While a continuous inventory runs, the reader answers no command except stop inventory. The client models this: other commands raise ChainwayInventoryActiveError until the scan ends.

Documentation

The full documentation is on Read the Docs.

Metadata

Release files for chainway-serial 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chainway-serial 0.1.0
File Size Uploaded
chainway_serial-0.1.0.tar.gz 26.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chainway-serial 0.1.0
File Interpreter ABI Platform
chainway_serial-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.9 kB

Release files / chainway_serial-0.1.0.tar.gz

Download URL chainway_serial-0.1.0.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
37519cea8ef10e0566bba18148f1425187203c5a353ecff2e74084f81161ea41
BLAKE2b-256 checksum
How to use checksums
6fd287774cc7d72b0386619366d8dafc6187161d91d22f68281ca30568efb0cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / chainway_serial-0.1.0-py3-none-any.whl

Download URL chainway_serial-0.1.0-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa132117d77992494ad2a0ee0b351c4834a73a9033d5887c1fb02b1f6079eafe
BLAKE2b-256 checksum
How to use checksums
0d246a22a8d6ea97f26f887b2b1bdcd87abae76f7a7e5b767534bb279512a0cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page