Hi,<br><br>you&#39;re definitly too fast Arjen ;-)<br><br><div class="gmail_quote">2010/6/25 Arjen de Korte <span dir="ltr">&lt;<a href="mailto:nut%2Bdevel@de-korte.org">nut+devel@de-korte.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Citeren <a href="mailto:Chris.Collins@apcc.com" target="_blank">Chris.Collins@apcc.com</a>:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I&#39;d like to submit a patch to enable NUT to communicate with APC 5G UPSs.<br>
The current usbhid-ups driver recognises APC UPSs by the Vendor ID and<br>
Product ID of 0x051D and 0x0002.  This needs to be amended with the new<br>
Product ID of 0x0003.<br>
<br>
(See attached file: apc-hid.patch)<br>
</blockquote>
<br></div>
Thanks for the patch.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Secondly, when Nut polls the UPS via the interrupt channel, these will time<br>
out, resulting in frequent lost comms.  The USB Interrupt channel is being<br>
reserved in 5G UPSs for a proprietary protocol.  In order to enable Nut to<br>
communicate with the UPS, a poll only configuration is required.  The<br>
details of my ups.conf file are as follows:<br>
<br>
[apc]<br>
    driver = usbhid-ups<br>
    port = auto<br>
    pollonly = 1<br>
</blockquote>
<br></div>
The &#39;pollonly&#39; is a flag, so just listing &#39;pollonly&#39; here would be enough (the &#39;= 1&#39; part is not used). Assuming this is important for this device, we should probably automatically disable the interrupt pipe, so this is what the revised patch will do upon detecting a 5G UPS.<br>
</blockquote></div><br clear="all">I came to the same conclusion. now to set &quot;use_interrupt_pipe = FALSE;&quot;, the content of r1853 should be moved to upsdrv_initups(), before the claim() calls.<br>and the new apc-hid-&gt;usb_device_id_t entry (from Chris&#39; patch) should have a fun pointer to set it.<br>
though that last one was obvious!<br><br>cheers,<br>Arnaud<br><span class="gI"><span class="gD" style="color: rgb(0, 104, 28);"></span></span>-- <br>Linux / Unix Expert R&amp;D - Eaton - <a href="http://www.eaton.com/mgeops">http://www.eaton.com/mgeops</a><br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/">http://www.networkupstools.org/</a><br>Debian Developer - <a href="http://www.debian.org">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.free.fr/">http://arnaud.quette.free.fr/</a><br>
<br>