<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello There,</p>
<p>I tried your advice and i don't think it works either,</p>
<p>See the logs,</p>
<p>"<br>
</p>
<p>/tmp/nut# ./drivers/usbhid-ups -DDDDDD -d1 -s test -x port=auto
-x vendorid=... -x productid=... -x subdriver=...<br>
Network UPS Tools - Generic HID driver 0.52
(2.8.0-2557-g81fca30b2)<br>
USB communication driver (libusb 1.0) 0.46<br>
0.000000 [D3] main_arg: var='port' val='auto'<br>
0.000056 [D6] testinfo_reloadable: var=port,
infoname=driver.parameter.port, newval=auto, reloadable=0,
reload_flag=0<br>
0.000072 [D6] testinfo_reloadable: verdict for (re)loading
var=port value: 1<br>
0.000101 [D5] send_to_all: SETINFO driver.parameter.port
"auto"<br>
0.000127 [D3] main_arg: var='vendorid' val='...'<br>
0.000163 [D5] send_to_all: SETINFO driver.parameter.vendorid
"..."<br>
0.000188 [D3] main_arg: var='productid' val='...'<br>
0.000214 [D5] send_to_all: SETINFO
driver.parameter.productid "..."<br>
0.000234 [D3] main_arg: var='subdriver' val='...'<br>
0.000261 [D5] send_to_all: SETINFO
driver.parameter.subdriver "..."<br>
0.000286 [D1] Network UPS Tools version
2.8.0-2557-g81fca30b2 (release/snapshot of 2.8.0.1) built with gcc
(Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 and configured with flags:
--enable-Wcolor --enable-keep_nut_report_feature --with-all=auto
--with-cgi=auto --with-serial=auto --with-dev=auto --with-doc=skip
--with-nut_monitor=auto --with-pynut=auto
--disable-force-nut-version-header --enable-check-NIT
--enable-maintainer-mode --disable-silent-rules
--sysconfdir=/etc/nut --with-group=nut --with-user=nut
--enable-inplace-runtime='2.8.0-2557-g81fca30b2 (release/snapshot
of 2.8.0.1) built with gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
and'<br>
0.000313 [D1] debug level is '6'<br>
0.000339 [D5] send_to_all: SETINFO driver.debug "6"<br>
0.000373 [D5] send_to_all: SETFLAGS driver.debug RW NUMBER<br>
0.001993 [D1] Succeeded to become_user(nut): now UID=127
GID=139<br>
0.002050 [D5] send_to_all: SETINFO device.type "ups"<br>
0.002084 [D5] send_to_all: SETINFO driver.state
"init.device"<br>
0.002113 [D1] upsdrv_initups (non-SHUT)...<br>
0.002144 [D2] Initializing an USB-connected UPS with library
libusb-1.0.23 (API: 0x1000107) (NUT subdriver name='USB
communication driver (libusb 1.0)' ver='0.46')<br>
0.016173 [D2] Checking device 1 of 7 (1D6B/0003)<br>
0.016242 [D1] Failed to open device (1D6B/0003), skipping:
Access denied (insufficient permissions)<br>
0.016259 [D2] Checking device 2 of 7 (0BDA/57C4)<br>
0.016288 [D1] Failed to open device (0BDA/57C4), skipping:
Access denied (insufficient permissions)<br>
0.016305 [D2] Checking device 3 of 7 (0BDA/B006)<br>
0.016333 [D1] Failed to open device (0BDA/B006), skipping:
Access denied (insufficient permissions)<br>
0.016350 [D2] Checking device 4 of 7 (05E3/0610)<br>
0.016378 [D1] Failed to open device (05E3/0610), skipping:
Access denied (insufficient permissions)<br>
0.016397 [D2] Checking device 5 of 7 (04E2/1410)<br>
0.016438 [D1] Failed to open device (04E2/1410), skipping:
Access denied (insufficient permissions)<br>
0.016465 [D2] Checking device 6 of 7 (0483/91D1)<br>
0.016498 [D1] Failed to open device (0483/91D1), skipping:
Access denied (insufficient permissions)<br>
0.016520 [D2] Checking device 7 of 7 (1D6B/0002)<br>
0.016548 [D1] Failed to open device (1D6B/0002), skipping:
Access denied (insufficient permissions)<br>
0.016575 [D2] libusb1: No appropriate HID device found<br>
0.016605 libusb1: Could not open any HID devices:
insufficient permissions on everything<br>
0.016626 No matching HID UPS found<br>
0.016658 [D5] send_to_all: SETINFO driver.state
"cleanup.exit"<br>
root@LOULOU:/tmp/nut# ./drivers/huawei-ups2000 -DDDDDD -d1 -s test
-x port=auto -x vendorid=... -x productid=... -x subdriver=...<br>
Network UPS Tools - NUT Huawei UPS2000 (1kVA-3kVA) RS-232 Modbus
driver 0.05 (2.8.0-2557-g81fca30b2)<br>
Warning: This is an experimental driver.<br>
Some features may not function correctly.<br>
<br>
0.000000 [D3] main_arg: var='port' val='auto'<br>
0.000049 [D6] testinfo_reloadable: var=port,
infoname=driver.parameter.port, newval=auto, reloadable=0,
reload_flag=0<br>
0.000065 [D6] testinfo_reloadable: verdict for (re)loading
var=port value: 1<br>
0.000091 [D5] send_to_all: SETINFO driver.parameter.port
"auto"<br>
0.000108 [D3] main_arg: var='vendorid' val='...'<br>
<br>
Fatal error: 'vendorid' is not a valid variable name for this
driver.<br>
<br>
Look in the man page or call this driver with -h for a list of<br>
valid variable names and flags.<br>
0.000152 [D5] send_to_all: SETINFO driver.state
"cleanup.exit"<br>
"</p>
<p>And after severals attempts to compile huawei-ups2000 i managed
to do it and i tried the same command using huawei-ups2000.</p>
<p>See the logs<br>
</p>
<p>"</p>
<p>/tmp/nut# ./drivers/huawei-ups2000 -DDDDDD -d1 -s test -x
port=auto -x vendorid=... -x productid=... -x subdriver=...<br>
Network UPS Tools - NUT Huawei UPS2000 (1kVA-3kVA) RS-232 Modbus
driver 0.05 (2.8.0-2557-g81fca30b2)<br>
Warning: This is an experimental driver.<br>
Some features may not function correctly.<br>
<br>
0.000000 [D3] main_arg: var='port' val='auto'<br>
0.000048 [D6] testinfo_reloadable: var=port,
infoname=driver.parameter.port, newval=auto, reloadable=0,
reload_flag=0<br>
0.000064 [D6] testinfo_reloadable: verdict for (re)loading
var=port value: 1<br>
0.000092 [D5] send_to_all: SETINFO driver.parameter.port
"auto"<br>
0.000117 [D3] main_arg: var='vendorid' val='...'<br>
<br>
Fatal error: 'vendorid' is not a valid variable name for this
driver.<br>
<br>
Look in the man page or call this driver with -h for a list of<br>
valid variable names and flags.<br>
0.000163 [D5] send_to_all: SETINFO driver.state
"cleanup.exit"<br>
"</p>
<p>Best regards,</p>
<p>FatGear<br>
</p>
<div class="moz-cite-prefix">Le 19/09/2023 à 21:40, Jim Klimov a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAJYg8vK==qqwhfBxxAYYX=9iKmf38C5REBe=C08g6Kof07S5BQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Well, now that the `subdriver` option got added to
`usbhid-ups` too, you can at least try that (by building again
the current master). See command-line help for the subdrivers
it would currently recognize, and copy e.g. the first word as
the matching option, e.g.:<br>
<br>
</div>
<div> ./drivers/usbhid-ups -DDDDDD -d1 -s test -x port=auto
-x vendorid=... -x productid=... -x subdriver=...</div>
<div><br>
</div>
<div>and try to lockpick your way here.</div>
<div><br>
</div>
<div>On a side note, some long-awaited tinkering began on making
an APC modbus driver a reality, but so far it is in such early
stages that it relies on an unpublished version of the modbus
library so is not trivial to even build (or get packaged).</div>
<div><br>
</div>
<div>Jim</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Sep 19, 2023 at
9:13 PM FatGear <<a href="mailto:fatgear1@free.fr"
moz-do-not-send="true" class="moz-txt-link-freetext">fatgear1@free.fr</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hello there,</p>
<p>I don't think that's working,😕</p>
<p>I have done all your repo but i don't know how it's
supposed to work.<br>
</p>
<p>I have a idea, change vendor id and product id to make
the driver try to connect to the ups, what do you think of
that ? With this driver maybe : usbhid-ups<br>
</p>
<p>FatGear<br>
</p>
<div>Le 16/09/2023 à 20:40, Jim Klimov a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">It seems the `libmodbus` library or headers
were not found, or something similar - so the driver
against it was not built. Did you install
`libmodbus-dev` before the build? What does `config.log`
in the build root say (and.or the summary shown after
you run the `configure` script)?<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Sep 16, 2023
at 7:46 PM FatGear <<a
href="mailto:fatgear1@free.fr" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">fatgear1@free.fr</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi,</p>
<p>I don't know what i'm doing wrong but it seams
that is not working,</p>
<p>I tried to put and remove id but it's not
fonctioning,</p>
<p>/etc/nut/ups.conf<br>
</p>
<p>"</p>
<p>pollinterval = 1<br>
maxretry = 3<br>
<br>
[ups1kva]<br>
driver = huawei-ups2000<br>
port auto<br>
vendorid = "04e2"<br>
productid = "1410"<br>
"<br>
</p>
<p>Then i use this commands for rebooting the
drivers</p>
<p><a
href="https://techno-tim.github.io/posts/NUT-server-guide/"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://techno-tim.github.io/posts/NUT-server-guide/</a></p>
<p>"<br>
</p>
<p>/tmp# sudo service nut-server restart<br>
/tmp# sudo service nut-client restart<br>
/tmp# sudo systemctl restart nut-monitor<br>
/tmp# sudo upsdrvctl stop<br>
Network UPS Tools - UPS driver controller
2.8.0-2454-g91b3ee057<br>
Can't open
/var/state/ups/huawei-ups2000-ups1kva.pid either:
No such file or directory<br>
/tmp# sudo upsdrvctl start<br>
Network UPS Tools - UPS driver controller
2.8.0-2454-g91b3ee057<br>
Can't start /usr/bin/huawei-ups2000: No such file
or directory<br>
"</p>
<p>On my "/tmp/nut/drivers/" i have :<br>
</p>
<p>huawei-ups2000.c<br>
</p>
<p>And in my "ls /lib/nut/" I haven't huawey-ups2000</p>
<p><br>
</p>
<p>"APC" became "schneider" i don't know this is
relevant or not.<br>
</p>
<p>What are you sugesting i do next ?</p>
<p>If you want we can call each others, via discord
maybe ?</p>
<p>FatGear<br>
</p>
<p><br>
</p>
<div>Le 16/09/2023 à 17:00, Jim Klimov a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi, sounds like we're making progress here
:)<br>
</div>
<div><br>
Well, if you've tried *all* of those
commands, it should have made a build
workspace under /tmp/nut where it has a
current NUT codebase build.</div>
<div><br>
</div>
<div> That should include a
`/tmp/nut/drivers/huawei-ups2000` binary right
there (assuming you also did follow the link
to <a
href="https://github.com/networkupstools/nut/blob/master/docs/config-prereqs.txt"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://github.com/networkupstools/nut/blob/master/docs/config-prereqs.txt</a>
and installed the `libmodbus-dev` or
equivalent for your OS distribution, among
other prerequisites). This one should suffice
to try testing if your device is supported by
that driver.<br>
</div>
<div><br>
</div>
<div> The contents of `/lib/nut` are relevant
if you've also followed up with `sudo make
install` noted at the end of the doc, to
replace your packaged NUT installation.
Perhaps even then, it might not auto-detect
the custom paths to drivers like these and
would just place the new ones into /usr/bin or
some such.</div>
<div><br>
</div>
<div> All that said however, if the UPS you are
looking at is still the APC mentioned earlier,
I have doubts if the huawei driver would
handle it (might... maybe they are an OEM for
rebranding now?..) or if that device just
happens to use the same USB interface chip as
some of those Huawei's did - and perhaps
without changing the IDs to APC's (which seems
strange, they have an assigned ID), but talks
a different protocol using such chip.<br>
</div>
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Sep
16, 2023 at 10:09 AM FatGear via Nut-upsdev
<<a
href="mailto:nut-upsdev@alioth-lists.debian.net"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">nut-upsdev@alioth-lists.debian.net</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I tried all commands on <br>
<a
href="https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests"
rel="noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests</a><br>
<br>
but i don't know what i'm supposed to do
next, it seams to download some <br>
things on my /tmp/nut/ but i don't know what
is it.<br>
<br>
My kernel is Linux 5.4.0-162-generic x86_64
and i don't have <br>
huawei-ups2000 driver.<br>
<br>
I have "/lib/nut$ ls<br>
al175 blazer_usb metasys
riello_ser<br>
apcsmart clone mge-shut
riello_usb<br>
apcsmart-old clone-outlet mge-utalk
safenet<br>
apcupsd-ups dummy-ups microdowell
solis<br>
bcmxcp etapro nutdrv_atcl_usb
tripplite<br>
bcmxcp_usb everups nutdrv_qx
tripplitesu<br>
belkin gamatronic oldmge-shut
tripplite_usb<br>
belkinunv genericups oneac
upscode2<br>
bestfcom isbmex optiups
upsd<br>
bestfortress ivtscd powercom
upsmon<br>
bestuferrups liebert powerpanel
usbhid-ups<br>
bestups liebert-esp2 rhino
victronups<br>
blazer_ser masterguard richcomm_usb<br>
"<br>
<br>
My lsusb is showing "Bus 001 Device 008: ID
04e2:1410 Exar Corp. <br>
XR21V1410 USB-UART IC"<br>
<br>
And i don't know what to do next.<br>
<br>
Fatgear<br>
<br>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</body>
</html>