<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><br><div></div><div id="divNeteaseMailCard"></div><font size="2" face="Verdana">
<div>Hi, Charles!</div>
<div> </div>
<div>Thank you very much for your patience!!</div>
<div> </div>
<div> </div>
<div>Maybe it better for me to describe my work detailly:</div>
<div> </div>
<div>It is a cooperation study project. In our developing enviroment, we
have:</div>
<div>1. A PC, with Redhat run in VMware, and VMware run in Windows XP. This is
the one I mentioned as "A".</div>
<div>2. A Synology NAS machine, which is quite proprably using NUT to control
UPS.</div>
<div>3. An ARM9 board, the target, with a Linux kernel ver 2.6.31.8, whose roofs
is an NFS provided by the VMwared Redhat. This is the one I mentioned as "B".</div>
<div> </div>
<div>What we want is to make my board to share UPS communication with the Synology machine and my PC, no matter whom the "host" of UPS is.</div>
<div>
<div>Because I want to make series of operation in a web server, currently I am
not planning to use upsmon but to write a simply client by my own.</div>
<div>As suggested in User Manual, I read codes of upsc and wrote a client to get
UPS information only.<br><br></div>
<div>My own simple client sucessfuly got UPS name and informaion when it is
physically plugged into local. Therefore I stepped forward: getting UPS
information from remote machine when not detectting UPS in local.And that went failed.<br></div>
<div> </div>
<div>
<div>You said I have accomplished everything I need, but still, I could not
connect to "A", who has the physical UPS.</div>
<div> </div>
<div>Now in "A", configurations are:</div>
<div>/* nut.conf */</div>
<div>MODE = netserver </div>
<div> </div>
<div>/* ups.conf */</div></div>
<div>
<div>[MY_UPS]</div>
<div> driver = usbhid-ups</div>
<div> port = auto</div>
<div> desc = "Common-USB-UPS"</div></div>
<div> </div>
<div>/* upsd.conf */</div>
<div>LISTEN 192.168.1.100 #IP of A</div>
<div> </div>
<div> </div>
<div>While in "B", configuration is:</div>
<div>/* upsd.conf */</div>
<div>LISTEN 192.168.1.100</div>
<div> </div>
<div> </div>
<div>In "A", upsd success:</div>
<div>
<div># /usr/local/ups/bin/upsdrvctl start</div>
<div>Network UPS Tools - UPS driver controller 2.6.3</div>
<div>Network UPS Tools - Generic HID driver 0.35 (2.6.3)</div>
<div>USB communication driver 0.31</div>
<div>Using subdriver: CyberPower HID 0.3</div>
<div># upsd</div>
<div>Network UPS Tools upsd 2.6.3</div>
<div>listening on 192.168.1.100 port 3493</div>
<div>/var/state/ups is world readable</div>
<div>Connected to UPS [MY_UPS]: usbhid-ups-MY_UPS</div></div>
<div> </div>
<div> </div>
<div>But in "B", fail:</div>
<div>
<div># upsd</div>
<div>Network UPS Tools upsd 2.6.3</div>
<div>not listening on 192.168.1.100 port 3493</div>
<div>no listening interface available</div>
<div> </div>
<div>I could figured out where went wrong. I looked into network, the communication between "A" and "B" is OK (maybe a littled delayed, but thay can communicate). I tried ethereal, but I did not find anything useful.<br>The ethereal log file is attached, I think most of them may be NFS conmmunication. <br><br>Where goes wrong?<br><br></div><br><div> </div>
<div> </div>
<div> </div>
<div>Besides, about the tcp-wrappers, here is my thinking:</div>
<div>There is an option of our Synology machine: "IPs that allowed to connected
to this UPS"</div>
<div>We are very curious about that and desided to achieve the same
functionality in the board. And that is the reason we were using
tcp-wrappers.</div>
<div> </div></div>
<div> </div>
<div> </div>
<div>--</div>
<div>andrew chang</div>
<div>2012-03-19</div></div>
<div> </div>
<div> </div></font><pre><br>At 2012-03-18 05:05:32,"Charles Lepple" <clepple@gmail.com> wrote:
>On Mar 17, 2012, at 11:46 AM, Andrew Min Chang wrote:
>
>> I meaned to try various configurations to examine my theory, but I still stucked in "tcp-wrapper not found". Cross compiling makes things totally different.
>
>Again, I wonder if you really need that library. I am fairly certain you can accomplish everything you need with the kernel's built-in firewall (including logging).
>
>> PS: Is it better to send this question to nut-packager but nut-upsuser?
>
>Probably not - the nut-packager list was meant for coordinating things like .deb and RPM package creation.
>
>--
>Charles Lepple
>clepple@gmail
>
>
>
</pre></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>