<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">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"><u></u>

  
    
  
  <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">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">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">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">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">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>