Skip to content

nutdrv_qx: add richcomm-svc USB transport for SVC V-1000F - #3565

Open
alliancesko wants to merge 1 commit into
networkupstools:masterfrom
alliancesko:richcomm-svc-pr
Open

nutdrv_qx: add richcomm-svc USB transport for SVC V-1000F#3565
alliancesko wants to merge 1 commit into
networkupstools:masterfrom
alliancesko:richcomm-svc-pr

Conversation

@alliancesko

@alliancesko alliancesko commented Aug 12, 2026

Copy link
Copy Markdown

nutdrv_qx: add richcomm-svc USB transport for SVC V-1000F

Summary

This adds an explicit richcomm-svc USB communication subdriver to
nutdrv_qx for older session-initialized Richcomm USB-to-UART bridges.

The implementation was developed and tested with an SVC V-1000F reporting
USB ID 0925:1234 and product string UPS USB MON V1.4. This device uses the
existing Megatec protocol and Armac command framing, but does not answer Qx
commands until its bridge has been configured for 2400 baud and sent a
64-byte session-opening sequence.

Closes #3562.

Commit tested: 4e1aa23b32376658f455110cf9d1c880c0176ff2.

Implementation

  • Add richcomm-svc as an explicit nutdrv_qx USB communication subdriver.
  • Share the existing Armac command framing instead of adding another Qx
    protocol dialect.
  • Configure the bridge for 2400 baud and send its session-opening reports
    before the first command.
  • Ignore up to five leading empty HID reports before a UART response.
  • Use the 6-byte interrupt reads required by the V-1000F; the 8-byte reads
    used by the current normal armac transport cause LIBUSB_ERROR_OVERFLOW
    on this hardware.
  • Reset the transport initialization state after USB reconnection.
  • Reject failed and short initialization transfers.
  • Bump the internal nutdrv_qx version from 0.54 to 0.55.
  • Document the subdriver, tested hardware, mandatory configuration and known
    test limits in the man page, HCL and NEWS.

The mode is deliberately not selected automatically. USB ID 0925:1234 is
shared by devices with different communication details, including hardware
which already works with the normal armac transport.

Configuration

[svc-v1000f]
    driver = nutdrv_qx
    port = auto
    subdriver = richcomm-svc
    protocol = megatec
    vendorid = 0925
    productid = 1234

Hardware verification

Tested on a physical SVC V-1000F under the submitter's control:

  • polling and Megatec protocol detection;
  • stable Q1, I and F responses;
  • live NUT values including OL/OB, input and output voltage, battery
    voltage, load, frequency and temperature;
  • test.battery.start.quick, with the observed sequence OL -> OB -> OL;
  • fresh initialization after physically disconnecting and reconnecting USB.

Deep battery tests and load or shutdown commands were not attempted.

The implementation is based on independently observed USB communication. It
does not include copied or decompiled proprietary source code.

Checks

  • make -j4 -C drivers nutdrv_qx
  • make -j4 check — 6 tests passed, 0 failed
  • documentation spellcheck and man-source sanity check
  • git diff --check
  • nutdrv_qx --help lists richcomm-svc
  • physical read-only test passed with the v2.8.5 proof of concept
  • physical read-only test of the final master-based binary passed on the
    SVC V-1000F: Megatec 0.10 was detected and live status data was read

AI assistance disclosure

The protocol investigation, patch development, documentation and PR drafting
were assisted by OpenAI Codex. The submitter directed the work, performed the
tests on physical hardware, reviewed the resulting behavior and remains
responsible for the contribution.

Add an explicit USB communication subdriver for older session-initialized
Richcomm USB-to-UART bridges. The tested SVC V-1000F uses the existing
Megatec protocol and Armac command framing, but requires a 2400-baud report
and a 64-byte session-opening sequence before it accepts commands.

Ignore leading empty HID reports from this bridge and reset its transport
state after USB reconnection. Use the 6-byte reads required by the V-1000F
without changing the 8-byte reads used by normal armac devices. Keep the mode
opt-in because 0925:1234 is shared by devices with different communication
behavior.

Document the mandatory configuration, tested hardware and untested command
scope in the man page, HCL and NEWS.

Development and documentation were assisted by OpenAI Codex. The submitter
reviewed the changes and verified the hardware behavior.

Signed-off-by: Yuriy_Y <alliancesko@gmail.com>
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit 4e1aa23 is temporarily available: NUT-tarballs-PR-3565.zip.

@jimklimov jimklimov added enhancement USB Qx protocol driver Driver based on Megatec Q<number> such as new nutdrv_qx, or obsoleted blazer and some others serial port Richcomm AI For good or bad, machine tools are upon us. Humans are still the responsible ones. labels Aug 12, 2026
@jimklimov jimklimov added this to the 2.8.6 milestone Aug 12, 2026
@jimklimov

Copy link
Copy Markdown
Member

Thanks, looks great!

@alliancesko

Copy link
Copy Markdown
Author

Thanks, looks great!

It works for me. I need to check with other people now. Glad to help. I had problems with similar UPS for a long time. With the release of version 2.8.5, things started moving forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI For good or bad, machine tools are upon us. Humans are still the responsible ones. enhancement Qx protocol driver Driver based on Megatec Q<number> such as new nutdrv_qx, or obsoleted blazer and some others Richcomm serial port USB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nutdrv_qx: session initialization required for SVC V-1000F Richcomm variant (0925:1234)

2 participants