A standalone smart UPS is configured on /dev/ttyS0 on a Dell Poweredge 6300 QUAD PII machine. apcupsd and apctest both complain that they cannot talk to the UPS. Now change the cable type to "simple" in apcupsd.conf, (as opposed to 'smart') and run apctest - no need to actually do anything, just quit right away. Now change the cable type back to smart, and run either apcupsd or apctest now and the UPS now communicates fine. 'rmmod serial' and then 'modprobe serial' brings the problem back again. This suggests a problem in the serial kernel module rather than apcupsd, perhaps? An earlier version of apcupsd works fine on an old 2.2 kernel machine on a variety of other (old) Dell poweredge machines.
I've got similar problems with apcupsd that are _kernel-dependent_: Works fine under kernel-2.4.26-r9 (gentoo-sources, my .config) with my Smart-UPS-700 and a smart serial cable. Does _not_ work with kernel-2.4.28-r4 (same .config) : cannot connect to dev/ttyS0. The trick of "jiggling" the apcupsd.conf file between "samrt" and "simple" allows communications but it's garbled -- misidentifies UPS as BackUPS and various status items are wrongly reported. Under kernel-2.6.1-r2 (gentoo-dev-sources) it's worse -- complains cannot connect to USB [sic] device /dev/ttyS0! See also the comments I posted yesterday at http://forums.gentoo.org/viewtopic.php?t=279362 with link to my kernel configs. FWIW this used to work (same PC/cable/UPS) fine under Fedora Core 2 and 3. -peter denisevich
I seem to find that it's kernel dependent too: I've recently updated to 2.4.28-gentoo-r5 without amending the .config at all and it runs fine. I'm not sure that this warrants being called "fixed" without understanding what the hell is going on - I'm just keeping my eye on it for now.
Works for me, too, with kernel-2.4.28-r5, using the identical configuration as for the (bad) -r4. There seems to be a related report on the apcupsd-users mailing list where under RedHat a kernel and gcc upgrade broke a working serial port setup. But there's no resolution posted: http://sourceforge.net/mailarchive/message.php?msg_id=9149755 I agree that there seems to be something flaky about the serial port handling. And I wouldn't change the status of this bug report until we understand something ...
So any news on this bug?
any news on this bug? if not i will close it within a week
It would appear that the current ebuild fixes this problem. Regrettably I have no real insights into what the underlying problem was. Well, if it aint broke, don't mend it!
I've just updated to the 2.6 kernel and now /dev/ttyS0 device doesn't seem to exist, so now there's no communications with the UPS. The /dev/ttyS0 inode is there, and I'm pretty sure the kernel build options are OK. I am using udev.
It seems that I need to explicitly load the "8250" module to cause the appropriate serial port devices to appear. Once I do this, the apcupsd works fine. I think this problem is more to do with my not understanding properly how things work, in particular the new udev system, rather than a bug as such. It would be nice if these things automagically appeared and loaded the appropriate modules when needed; but it probably can be set up to do this, I just don't know how yet.
OK, it seems that I need to manually load module 8250 in order to have /dev/ttyS0 appear in /dev. Unlike devfs, udev doesn't load modules and it would appear that it never will work this way. Upon reflection, this is probably a hotplug [coldplug] problem more than anything else. I would be content to have this bug set as "fixed".
Done ;)