<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite"><blockquote type="cite"><div dir="ltr"><div>I setup apcsmart driver on port /dev/ttyUSB0 in ups.conf and check that runing user=root.</div><div><br></div></div></blockquote><div>user=root is only for testing- this may cause other permissions problems later. </div></blockquote><div><div><br></div></div><div>It looks like the simplest way to handle this on Debian is to add the system 'nut' user to the 'dialout' group:</div><div><br></div><div style="margin: 0px; font-family: Monaco;">$ sudo adduser nut dialout</div><div><br></div><blockquote type="cite"><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I have been meaning to collect some information on using serial UPSes with NUT via USB-to-serial converters, but you can adapt the udev rules to match your converter, and even create a symlink so that it will not change names. (If a process has /dev/ttyUSB0 open, and the USB cable is unplugged, udev will create /dev/ttyUSB1 when it is next plugged in, which will not match the configuration file)</div><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></blockquote><br></div><div>Just confirmed that the default udev rules for Raspbian wheezy will create some symlinks in /dev/serial/by-path and /dev/serial/by-id which should be useful.</div><div><br></div><div>I have an inexpensive USB-to-serial cable which does not have a unique serial number, so I can only use one of that model at a time, and still uniquely identify it. But this is what it produces:</div><div><br></div><div><div style="margin: 0px; font-family: Monaco;"><span style="color: #5330e1">$</span> ls -l /dev/serial/by-id/</div><div style="margin: 0px; font-family: Monaco;">total 0</div><div style="margin: 0px; font-family: Monaco; color: rgb(52, 187, 199);"><span style="color: #000000">lrwxrwxrwx 1 root root 13 Dec 31  1969 </span>usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0<span style="color: #000000"> -> </span><span style="color: #999900; background-color: #000000">../../ttyUSB0</span></div><div><span style="color: #999900; background-color: #000000"><br></span></div></div><div>Although it is unwieldy, the pathnames under /dev/serial/by-id should always point to the correct /dev/ttyUSB? node.</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><div>-- </div><div>Charles Lepple</div><div>clepple@gmail</div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br></body></html>