Skip to main content

hw-vx-config

PyPI version Python License: MIT CI

Network configuration tool for HW-VX6330K / HW-VX6346KL serial-to-Ethernet modules on Linux. Sends UDP packets directly to the device — no DLLs, no runtime dependencies, pure stdlib. Interactive input uses stdlib readline, so arrow keys edit text instead of appearing as escape characters.

Accepts a device IP or discovers via broadcast; reads and writes all network, serial, and advanced settings over the HW-VX UDP protocol (port 65535).

Note: This tool has only been tested on Linux. While it may work on other platforms, no guarantees are made for macOS or Windows.

Table of Contents

Features

  • L2 discovery through 255.255.255.255 for readers on the same LAN/VLAN.
  • CIDR sweep discovery that sends X to every usable host using one UDP socket.
  • Runtime choice between unicast configuration and broadcast-by-MAC configuration.
  • Full network, serial, remote server, DHCP, reboot, and RFID reader operations.
  • Editable terminal input with arrow keys through stdlib readline.

Requirements

  • Python 3.10 or later
  • Linux (uses SO_BROADCAST; port 65535 requires no root)
  • Device reachable on the local network (same subnet or routed UDP)

Quick Start

pip install hw-vx-config

# Discover all readers on the network
hw-vx-config search

Or install with pipx for isolated CLI usage:

pipx install hw-vx-config

CLI Reference

All operations take the current device IP as the first positional argument.

# Discover all readers via limited broadcast (255.255.255.255)
hw-vx-config search

# Sweep every usable IP in a CIDR (172.27.43.65 through .78)
hw-vx-config search --network 172.27.43.64/28

# Print full configuration for a device
hw-vx-config config <ip>

# Change static IP and reboot
hw-vx-config set-ip <current-ip> <new-ip>

# Enable or disable DHCP and reboot
hw-vx-config dhcp <ip> on|off

# Send reboot command
hw-vx-config reboot <ip>

# Launch interactive menu
hw-vx-config interactive
hw-vx-config              # same — interactive is the default

RFID Reader Commands

These commands use the UHF RFID binary protocol (UHFReader18) over TCP. The <port> is the device's configured TCP port (from network settings).

# Get reader information (address, firmware, power, etc.)
hw-vx-config reader-info <ip> <port>

# Set reader address from 0 to 1
hw-vx-config set-reader-addr <ip> <port> 1

# Set reader address when current address is not 0
hw-vx-config set-reader-addr <ip> <port> 5 --adr 1

Interactive Menu

The interactive menu (hw-vx-config with no arguments) provides a numbered prompt. Press l to redraw only options currently available: discovery options before connecting, device operations after connecting, and RFID operations after configuration is loaded.

  ╔══════════════════════════════════════════════════════╗
  ║  HW-VX6330K / HW-VX6346KL  Network Config Tool       ║
  ║  Linux Edition — ported from C# Demo v2.11           ║
  ╚══════════════════════════════════════════════════════╝

  ╔══════════════════════════════════════════════════════╗
  ║  1. Search for readers                               ║  ← broadcast discovery, select from results
  ║  2. Connect to specific IP                           ║  ← skip discovery, target a known address
  ╠══════════════════════════════════════════════════════╣
  ║  3. Show current configuration                       ║
  ║  4. Change IP address                                ║
  ║  5. Enable/Disable DHCP                              ║
  ║  6. Change remote server                             ║  ← Remote IP, Remote Port, Work Mode
  ╠══════════════════════════════════════════════════════╣
  ║  7. Edit & save full configuration                   ║  ← field-by-field editor, confirm before write
  ║  8. Reboot reader                                    ║
  ╠══════════════════════════════════════════════════════╣
  ║  9. RFID reader info                                 ║  ← address, firmware, power (TCP binary)
  ║  10. Set RFID reader address                         ║  ← change reader Adr (0–254)
  ╠══════════════════════════════════════════════════════╣
  ║  q. Quit   l. List available options                 ║
  ╚══════════════════════════════════════════════════════╝

Search first shows a discovery submenu:

Discovery mode:
1. L2 broadcast — fastest, same LAN/VLAN
2. CIDR sweep — send to each usable IP

CIDR example: 172.27.43.64/28 sends X once to every usable address from 172.27.43.65 through 172.27.43.78, then collects replies on one socket. A prefixless value such as 10.10.23.0 defaults to /24. After selecting a reader, choose unicast or broadcast-by-MAC mode.

Option 2 is useful when the device is on a different subnet and broadcast cannot reach it.

Examples

The examples/ directory contains companion scripts.

File Description
server_uhf.py TCP server that receives RFID tag data from the reader on port 2077. Run this alongside the reader when Work Mode is set to Client and Remote Port is 2077.
library_usage.py Shows how to use HwVxDevice and HwVxNetworking directly in Python code — discover, read config, change settings, and quick operations.
rfid_usage.py Shows how to use RfidClient to get reader info and change the reader address via the binary protocol.
python examples/server_uhf.py
# Listening on 0.0.0.0:2077

Troubleshooting

Problem Possible cause Fix
search returns nothing Firewall blocks UDP 65535 Open UDP 65535 inbound/outbound (sudo ufw allow 65535/udp)
Limited broadcast uses the wrong interface Sweep a CIDR, e.g. search --network 172.27.43.64/28
Device on a routed subnet CIDR sweep sends unicast X to each usable address; routing and UDP 65535 must permit it
Broadcast not reaching device Ensure host and device share the same L2 network / VLAN
Timeout on config / set-ip Device IP changed or unreachable Verify with ping <ip>; re-discover with search
Permission denied on socket Rare kernel policy Run with sudo or check sysctl net.ipv4.ip_unprivileged_port_start

Development

Install with dev extras, then use the standard toolchain:

pip install -e ".[dev]"

# Lint and format
ruff check --fix src/ tests/
ruff format src/ tests/

# Type check
mypy src/

# Run tests
pytest

# Tests with coverage
pytest --cov=hw_vx_config --cov-report=term-missing

Tests live in tests/ and mock the UDP socket — no device needed to run them.

Protocol

UDP port 65535 (device config) and TCP port 2077 (RFID tag push). Full details → docs/api/protocol.md and docs/DOCUMENTATION.md.

Further Reading

  • docs/api/ — per-module API reference and RFID binary protocol
  • docs/DOCUMENTATION.md — full UHFReader18 manual (EPC C1G2 / ISO18000-6B command set, status codes, tag memory)

Uninstall

pip uninstall hw-vx-config
# or if installed with pipx:
pipx uninstall hw-vx-config

Tested with

  • Hardware: HW-VX6330K, HW-VX6346KL
  • Protocol: UDP port 65535, ASCII request/reply
  • OS: Linux (Ubuntu 22.04+)

License

MIT — see PyPI page for the published package.

Metadata

Release files for hw-vx-config 1.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 hw-vx-config 1.1.0
File Size Uploaded Provenance Actions
hw_vx_config-1.1.0.tar.gz 36.8 kB With provenance Details for hw_vx_config-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hw-vx-config 1.1.0
File Interpreter ABI Platform Actions
hw_vx_config-1.1.0-py3-none-any.whl Python 3 none any Details for hw_vx_config-1.1.0-py3-none-any.whl

Total release size: 62.1 kB

Release files / hw_vx_config-1.1.0.tar.gz

Download URL hw_vx_config-1.1.0.tar.gz
Size 36.8 kB
Tags Source
SHA-256 checksum
How to use checksums
361a931ff3739896614616b6edc2b4c178dacf85ef2d97328cdebe18731f9cbd
BLAKE2b-256 checksum
How to use checksums
fb59be4c325ee1793d68f3b20b413230400fe6b3eade18d56b8299f88b7e836a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 12, 2026.

Transparency log

Release files / hw_vx_config-1.1.0-py3-none-any.whl

Download URL hw_vx_config-1.1.0-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6abd07f8b55c972789b3637d02df22d548da3659b8cec1a90cee5b55688d7bb
BLAKE2b-256 checksum
How to use checksums
f9e74139d670b6fe0b16c8b803a328140f5b727926db79230ef625965cbee6be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 12, 2026.

Transparency log

Security for hw-vx-config 1.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hw_vx_config-1.1.0.tar.gz

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 Aug 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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