-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request : Add support for Huawei Modbus UPSs #1017
Comments
connecting usb port recognized as a /dev/ttyXRUSB0 device |
I believe currently there is one modbus-aware driver, Actually, one of the discussed efforts is indeed a Huawei UPS2000 driver in #954 which was not merged yet due to a burst of activity and then silence from the contributor. But I suppose it would help if you can build that branch from biergaizi:ups2000 and confirm whether it works for your device. |
Any progress on that? |
This is new information for me. What system are you using? The RX21V1410 chip in UPS2000 doesn't work on the official upstream Linux kernel, it can be recognized as a CDC device, but not functional (presumably because the chip is in a special configuration). On your system, if you see that the device shows as a nonstandard name like I didn't even realize there is actually a distro that included out-of-tree driver for the chip. In all my documentation I always claim that USB is entirely unsupported, but apparently with the unofficial driver installed, USB should actually work. Again, what is your distro? |
Following the same line of investigation, apparently the driver for MaxLinear RX21V1410 has just been mainlined to the upstream in January and April, and an official driver (with the standard serial port names, not the nonstandard Perhaps it was a good decision not to merge my patch back in January. Time to retest the driver and update the documentation. |
Never mind the question. Linux 5.12 and newer kernels already have a mainline driver |
@whc2001: now it's 100% completed. Waiting for a code review and a merge. |
Glad to hear, thanks for the effort! |
Now that the driver became part of NUT master branch, may I ask people watching this issue to try a build and report if it works for them? :) |
We've just bought a UPS2000-A-1KTTS. I'm not very familiar with building C code, i had some issues. (fresh master 88e8a83) root@mgmt01:/usr/local/ups/etc# cat ups.conf seems working |
Thanks, I suppose that can be treated as a bug. It seems that `configure`
script does not really know or care about the ever-changing population of
drivers, and is geared to enable/disable whole categories (e.g.
with/without modbus) so did not require to have libmodbus as a dependency
for particular enabled driver - just opted to use one if available.
…On Mon, Jan 24, 2022, 12:46 ultinous-dancsa ***@***.***> wrote:
We've just bought a UPS2000-A-1KTTS. I'm not very familiar with building C
code, i had some issues. (fresh master 88e8a83
<88e8a83>
)
Linux mgmt01 4.4.0-210-generic #242
<#242>-Ubuntu SMP Fri Apr 16
09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 16.04 (yeah, old, currently under replacement)
config: ./configure --with-user=ups --with-group=nut --with-usb
--with-drivers=huawei-ups2000
i'm not sure if it's a bug, but configure won't complain about missing
modbus lib, but the make will fail. apt-get install libmodbus-dev is needed.
***@***.***:/usr/local/ups/etc# cat ups.conf
[huvi]
driver = huawei-ups2000
port = /dev/ttyXRUSB0
desc = "Workstation"
***@***.***:/usr/local/ups/sbin# /usr/local/ups/bin/upsc ***@***.***
battery.capacity: 9
battery.charge: 100.0
battery.charger.status: charging
battery.packs: 2
battery.runtime: 8692
battery.voltage: 27.4
device.mfr: Huawei
device.model: UPS2000A
...
ups.firmware: V2R1C1SPC50
ups.firmware.aux: P1.0-D1.0
seems working
—
Reply to this email directly, view it on GitHub
<#1017 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMPTFBHQ7MWLI2VSEGVZFDUXU3Y7ANCNFSM43A34PMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
PR #1277 should handle the drive-by I suppose the original issue for Huawei Modbus can be marked as achieved. |
Here is the page of NUT for this product: |
Thanks for reporting. I'll add your model to the list of tested units in the documentation. |
This commit adds UPS2000-A-1KTTS with another firmware version (V2R1C1SPC50) to the list of tested UPS models. Thanks @ultinous-dancsa for reporting it [1]. [1] networkupstools#1017 (comment) Signed-off-by: Yifeng Li <[email protected]>
here comes the Huawei UPS2000 series UPS Modbus Protocol Manual
https://support.huawei.com/view/PdfRead/EDOC1000110696/SUPE_DOC/k001/document.pdf
It has a USB port and a RS232 port
USB port seems like behind a translation chip " ID 04e2:1410 Exar Corp. XR21V1410 USB-UART IC"(on lsusb command) though RS232
Any ideas guys?
The text was updated successfully, but these errors were encountered: