<div dir="ltr"><div>Hello, and thanks for the clarifications.</div><div><br></div><div> As described, the change does not seem to be too complex on the NUT project's side, the PR posted below took about an hour with some research and this write-up, so I'm not sure I can put a price tag on it :) A donation at <a href="https://opencollective.com/networkupstools">https://opencollective.com/networkupstools</a> or <a href="https://github.com/sponsors/networkupstools">https://github.com/sponsors/networkupstools</a> would be welcome though, more so a recurring one.</div><div><br></div><div> The technicalities about it have several correct answers, depending on the situation:</div><div><br>
<div>* If your testbed has NUT v2.8.1 (packaged or otherwise available),
its `usbhid-ups` driver should newly support a `subdriver` option -
specifically to help gauge support of existing code paths for `vendorid`
and `productid` values that are not yet built into the binaries as
known supported handlers for these devices. So hopefully (this feature was not extensively tested yet) you can in fact run `usbhid-ups -s test -x port=auto -x vendorid=0483 -x productid=a430 -x subdriver="cyberpower" -DDDDDD -d 1` and get a detailed log of NUT driver start-up (devices found, matching attempts tried and if they succeeded, first device data walk...) and eventually a list of collected data points similar to what the `upsc` client would report in production.<br></div><div><br></div>
</div><div>* If you can build NUT from sources on a system (PC, SBC...) connected to an UPS for the testing, this would be best for practical testing (if the proposed change works out of the box) and for possible iterations on the modified code (especially if the first attempt does not get it right, or if there would be some more work needed beside "knowing" a couple of new IDs) :)</div><br><div>The Wiki article <a href="https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests">https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests</a> details custom builds of NUT for testing from the build workspace (not necessarily installing into the OS) and prerequisites for a number of platforms based on experience with the NUT CI farm summarized at <a href="https://networkupstools.org/docs/user-manual.chunked/_build_prerequisites_to_make_nut_from_scratch_on_various_operating_systems.html">https://networkupstools.org/docs/user-manual.chunked/_build_prerequisites_to_make_nut_from_scratch_on_various_operating_systems.html</a> / <a href="https://github.com/networkupstools/nut/blob/master/docs/config-prereqs.txt">https://github.com/networkupstools/nut/blob/master/docs/config-prereqs.txt</a>. <br></div><div><br></div><div>
<div> I've posted the anticipated change set as a pull request <a href="https://github.com/networkupstools/nut/pull/2312">https://github.com/networkupstools/nut/pull/2312</a> so to build it from sources per instructions in Wiki, you would need to clone the PR's source branch, e.g.:</div><div><br></div><div>:; git clone <a href="https://github.com/jimklimov/nut">https://github.com/jimklimov/nut</a> -b cyberenergy nut<br></div><div><br></div>
</div><div>Hope this helps,</div><div>Jim Klimov<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 15, 2024 at 5:24 AM <<a href="mailto:abeyoungh@gmail.com">abeyoungh@gmail.com</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 class="msg5604591949176787001"><div lang="ZH-TW" style="overflow-wrap: break-word;"><div class="m_5604591949176787001WordSection1"><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif">Hello Jim,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif"> Thanks for your prompt reply and happy lunar new year.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif"> I think my situation is first one. Actually I am from CyberPower UPS manufacture. In the past, CyberPower UPS works well with NUT. Today, I want to use another VID/PID to fulfill ODM business rather than CyberPower brand UPS. My engineer will apply standard USB power device description like as CyberPower’s USB design. The only difference is VID/PID. What I request is someone could help me finish following two items. <u></u><u></u></span></p><ol style="margin-top:0cm" start="1" type="A"><li class="m_5604591949176787001MsoListParagraph" style="margin-left:6pt"><span lang="EN-US" style="font-family:"Calibri",sans-serif">Offer the beta NUT version that should include below requirement to me. I will test it by myself. <u></u><u></u></span></li></ol><p class="MsoNormal" style="margin-left:72pt"><u></u><span lang="EN-US" style="font-family:"Calibri",sans-serif"><span>I.<span style="font:7pt "Times New Roman""> </span></span></span><u></u><span lang="EN-US" style="font-family:"Calibri",sans-serif">New VID "0x0483", PID "0xA430"<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:72pt"><u></u><span lang="EN-US" style="font-family:"Calibri",sans-serif"><span>II.<span style="font:7pt "Times New Roman""> </span></span></span><u></u><span lang="EN-US" style="font-family:"Calibri",sans-serif">Corresponding existing (sub-)driver "usbhid-ups"<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:72pt"><u></u><span lang="EN-US" style="font-family:"Calibri",sans-serif"><span>III.<span style="font:7pt "Times New Roman""> </span></span></span><u></u><span lang="EN-US" style="font-family:"Calibri",sans-serif">Manufacture "CyberEnergy"<u></u><u></u></span></p><ol style="margin-top:0cm" start="2" type="A"><li class="m_5604591949176787001MsoListParagraph" style="margin-left:6pt"><span lang="EN-US" style="font-family:"Calibri",sans-serif">Once the beta NUT is compatible with new UPS, help me pull request until formal NUT support my new VID/PID device. <u></u><u></u></span></li></ol><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:24pt"><span lang="EN-US" style="font-family:"Calibri",sans-serif">Can you help me or suggest proper person to complete above? How much should I pay for this, please let me know if anything that I should notice.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif">Thank you very much and look forward your further feedback, <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif">Eric Hsu<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(225,225,225) currentcolor currentcolor;padding:3pt 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:"Calibri",sans-serif"> Jim Klimov <<a href="mailto:jimklimov%2Bnut@gmail.com" target="_blank">jimklimov+nut@gmail.com</a>> <br><b>Sent:</b> Wednesday, February 7, 2024 4:10 PM<br><b>To:</b> <a href="mailto:abeyoungh@gmail.com" target="_blank">abeyoungh@gmail.com</a><br><b>Cc:</b> nut-upsdev <<a href="mailto:nut-upsdev@alioth-lists.debian.net" target="_blank">nut-upsdev@alioth-lists.debian.net</a>><br><b>Subject:</b> Re: [Nut-upsdev] NUT supports new VID/PID<u></u><u></u></span></p></div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Hello and welcome!<u></u><u></u></span></p><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"> It really depends on what it really means to "add support":<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"> If the needed abilities are already present in an existing driver and its sub-driver (`usbhid-ups` as you say, if this uses a HID protocol, or `nutdrv_qx` likely otherwise), and the issue is just about adding the IDs to the suitable handler so it "knows" it is compatible during device detection, then it is trivial. In fact, if you go to NUT GitHub Wiki page to look for "Building in-place" instructions, you can experiment locally and post a pull request with a checked-working change set.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"> If this issue is however about adding a new (or extending an old) (sub-)driver, then I really hope some of the list members can help with the investigation and coding.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">Hope this helps,<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">Jim Klimov<u></u><u></u></span></p></div><p class="MsoNormal" style="margin-bottom:12pt"><span lang="EN-US"><u></u> <u></u></span></p><div><p class="MsoNormal"><span lang="EN-US">On Wed, Feb 7, 2024, 07:50 abeyoungh--- via Nut-upsdev <<a href="mailto:nut-upsdev@alioth-lists.debian.net" target="_blank">nut-upsdev@alioth-lists.debian.net</a>> wrote:<u></u><u></u></span></p></div><div><div><p class="MsoNormal"><span lang="EN-US">Hi all,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> I am looking for someone who help me request NUT to supports power device which has unregistered VID/PID. I will pay you for your service.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> Detail requirement<u></u><u></u></span></p><ol start="1" type="1"><li class="MsoNormal"><span lang="EN-US">New VID "0x0483", PID "0xA430"<u></u><u></u></span></li></ol><p class="MsoNormal" style="margin-left:42pt"><u></u><span lang="EN-US"><span>2.<span style="font:7pt "Times New Roman""> </span></span></span><u></u><span lang="EN-US">Corresponding driver "usbhid-ups"<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:42pt"><u></u><span lang="EN-US"><span>3.<span style="font:7pt "Times New Roman""> </span></span></span><u></u><span lang="EN-US">Manufacture "CyberEnergy"<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal" style="margin-left:24pt"><span lang="EN-US">I have no idea to handle this. If need more information, please let me know, thanks.<u></u><u></u></span></p></div></div><p class="MsoNormal"><span lang="EN-US">_______________________________________________<br>Nut-upsdev mailing list<br><a href="mailto:Nut-upsdev@alioth-lists.debian.net" target="_blank">Nut-upsdev@alioth-lists.debian.net</a><br><a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev</a><u></u><u></u></span></p></div></div></div></blockquote></div>