Network configuration tool for HW-VX6330K / HW-VX6346KL serial-to-Ethernet modules
Project description
hw-vx-config
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.
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).
Table of Contents
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
python -m venv .venv && source .venv/bin/activate
pip install -e .
# Discover all readers on the network
hw-vx-config search
# Or run directly without installing
python main.py
CLI Reference
All operations take the current device IP as the first positional argument.
# Discover all readers via broadcast
hw-vx-config search
# 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
Interactive Menu
The interactive menu (hw-vx-config with no arguments) provides a numbered prompt:
1. Search for readers — broadcast discovery, select from results
2. Connect to specific IP — skip discovery, target a known address directly
3. Show current configuration
4. Change IP address
5. Enable/Disable DHCP
6. Edit & save full configuration — field-by-field editor, confirm before write
7. Change remote server — set Remote IP, Remote Port, Work Mode
8. Reboot reader
q. Quit
Option 2 is useful when the device is on a different subnet and broadcast cannot reach it.
Protocol
UDP on port 65535. Every packet is ASCII. Replies are prefixed with A.
| Prefix | Direction | Action |
|---|---|---|
X |
→ device | Broadcast echo — triggers discovery reply |
W{mac} |
→ device | Select device by MAC |
L |
→ device | Login |
O |
→ device | Logout |
G{code} |
→ device | Get one setting |
S{code}{value}|{seq} |
→ device | Set one setting |
E |
→ device | Save and reboot |
A{payload} |
← device | All replies |
Discovery reply format: A{mac}/{port}/.../{username}/{device_name} from the device's source IP.
Setting codes of note: IP (IP address), NM (subnet mask), GI (gateway), DH (DHCP),
BR (baud rate), TP (protocol), RM (work mode). Full table in src/hw_vx_config/constants.py.
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. |
python examples/server_uhf.py
# Listening on 0.0.0.0:2077
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.
Tested with
- Package version: 0.1.0
- Hardware: HW-VX6330K, HW-VX6346KL
- Protocol: UDP port 65535, ASCII request/reply
- OS: Linux (Ubuntu 22.04+)
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hw_vx_config-0.1.0.tar.gz.
File metadata
- Download URL: hw_vx_config-0.1.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f9d97db6e983139bb30f0a5fd17206a9a0e0f97c1b666dc39dc68c1f0d4a694
|
|
| MD5 |
39bbf0088048990ce5cbb447fb081ec3
|
|
| BLAKE2b-256 |
10ff210ca68ff630aa6c2642e36528b01d7c9ffad006c6373917a075aa386c82
|
Provenance
The following attestation bundles were made for hw_vx_config-0.1.0.tar.gz:
Publisher:
publish.yml on xynogen/hw-vx-config
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hw_vx_config-0.1.0.tar.gz -
Subject digest:
4f9d97db6e983139bb30f0a5fd17206a9a0e0f97c1b666dc39dc68c1f0d4a694 - Sigstore transparency entry: 1947778951
- Sigstore integration time:
-
Permalink:
xynogen/hw-vx-config@19ff1aa07319b6bc9ab25d9999f2c39aacec7838 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xynogen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@19ff1aa07319b6bc9ab25d9999f2c39aacec7838 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hw_vx_config-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hw_vx_config-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2320475199a92e70ae9f79ef10862a519b108a75bf92017f2d6905f26270079d
|
|
| MD5 |
288e61f6940a905b1fedd8fb65e780c0
|
|
| BLAKE2b-256 |
69230945c156e161cb1e2a4332c18108d298b414b9e1483fc41627e26af46581
|
Provenance
The following attestation bundles were made for hw_vx_config-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on xynogen/hw-vx-config
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hw_vx_config-0.1.0-py3-none-any.whl -
Subject digest:
2320475199a92e70ae9f79ef10862a519b108a75bf92017f2d6905f26270079d - Sigstore transparency entry: 1947779050
- Sigstore integration time:
-
Permalink:
xynogen/hw-vx-config@19ff1aa07319b6bc9ab25d9999f2c39aacec7838 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xynogen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@19ff1aa07319b6bc9ab25d9999f2c39aacec7838 -
Trigger Event:
push
-
Statement type: