Hi there,<br>
<br>
I just got a bit of time to see this mail... still late (and busy) as always<br><br><div><span class="gmail_quote">2005/11/6, Peter Selinger &lt;<a href="mailto:selinger@mathstat.dal.ca">selinger@mathstat.dal.ca</a>&gt;:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I just noticed the following curious behavior when using newhidups<br>with upsdrvctl and two different USB devices:
<br><br>...<br><br>On the other hand, if I assign two different dummy &quot;ports&quot; to these<br>devices:<br><br>[belkinusb]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;driver = newhidups<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;port = auto1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;desc = &quot;Belkin UPS, USB interface&quot;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vendorid=050d<br><br>[mgeusb]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;driver = newhidups<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;port = auto2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;desc = &quot;MGE UPS, USB interface&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vendor = &quot;MGE.*&quot;<br><br>then the two devices will be distinguished correctly. Is this behavior
<br>documented? The man page currently says:<br><br>IMPLEMENTATION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newhidups only support 1 UPS at this time. You can put the &quot;auto&quot; value<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for port in ups.conf, i.e.:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[newhidups]
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; driver = newhidups<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port = auto<br><br>This is now most definitely outdated. But the fact that the &quot;port&quot; is<br>used in this way, although it does not mean anything, should probably
<br>be documented.<br><br>Arnaud, any thoughts on this? -- Peter</blockquote><div><br>
<br>
yep, 2 in facts:<br>
1) the above problem is due to the state sockets and driver pidfile
naming. These are currently build using &quot;drv-name&quot;-&quot;port&quot; (adding
&quot;.pid&quot; for the pidfile).<br>
This is, as you stated, not enough now with the newhidups case and its &quot;auto&quot; port probing!<br>
I've thinked about that when starting newhidups, and come to the
conclusion that using the ups definition name (ie belkinusb and mgeusb)
would be sufficient. A good way to ensure a unique filename. A special
case is when the driver is launched manually (ie just with a port, no
-a and not with upsdrvctl). In that case, we'll use the current
behavior.<br>
I'm preparing that for the cvs Dev. Watch the commit list this evening...<br>
<br>
2) having the above done, newhidups manpage can be updated, and the problem solved. Peter, I let you handle this part.<br>
</div><br>
Arnaud<br></div>