Hi All I am connecting a ups via a usb to serial converter. Works fine, however when the converter is unplugged and plugged back in, udev creates another device e.g instead of ttyUSB0 it creates ttyUSB1. Here is the udev rule that I added to the top of the 025_nut-usbups.rules file in order to create a static symlink should udev decide to create the device as either ttyUSB0 or ttyUSB1. KERNEL=="ttyUSB?", MODE="664" GROUP="nut", SYMLINK+="upsserial2usb" The ups.conf file is set to use the newly created symlink /dev/upsserial2usb [myups] driver = megatec port = /dev/upsserial2usb desc = "Local UPS" And here is the problem: upsdrvctl will fail to start when pointed to the symlink that the udev rule creates, but will start normally when set to use /dev/ttyUSB0 for example. I have also tried using NAME="upsserial2usb" in the rules file. Same issue however. Thanks Sean -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20080512/430a909a/attachment.htm
On Mon, May 12, 2008 at 7:05 AM, Sean Thomas <SeanT at zdata.co.za> wrote:> And here is the problem: upsdrvctl will fail to start when pointed to the > symlink that the udev rule creates, but will start normally when set to use > /dev/ttyUSB0 for example.That's a handy rule to have. I will have to try again later with udev and a USB-to-serial adapter, but I did a quick test with a symlink to /dev/ttyS0, using NUT from the SVN trunk (rev 1368), and I did not have any problems starting the bestups driver. Let's try and close the gap between what works, and what doesn't: 1) What version of NUT are you using? Did you compile from source, or is it provided by your Linux distribution as a package? 2) What do you get from 'ls -l /dev/upsserial2usb' and 'ls -lL /dev/upsserial2usb'? 3) Run upsdrvctl with "-t" as well, and copy the command it uses to start the driver. Then, add "-D" to that command and run it. For me, this would be "/lib/nut/bestups -D -a ppro2". What messages do you get from the driver? -- - Charles Lepple