Arnaud Quette
2008-Oct-21 20:06 UTC
[Nut-upsdev] Powercom Imperial/Black Knight USB support for NUT
2008/10/18 Sergiy Yegorov <prapor at unixzone.org.ua>:> Dear Arnaud!Hi Sergiy and Alexey,> Please, check this patch. It adds USB-attached Powercom UPS Imperial & > Black Knight series. Originaly code is writed by Kirill Burdin > (burdin at post.ru) for Imperial UPS`es. > I`m just sysadmin without enought C programming > skills, so I adapted it to nut-2.2.2-6 (Lenny) & test it with BNT devices.not that bad for a sysadmin ;-) there was just 1 big mistake: + if (types[type].name != "USB") { that would work in C++ (using the String class), but not in C. here, you're comparing if 2 memory pointers are different! that will always be true (someone there to calculate the probability?), so the case that interest you (USB) will always work. but not anymore with other models ;-) the right version is: if (strcmp(types[type].name, "USB")) { quickly looking at the powercom code in the trunk, there has been some changes around. @Alexey: can you please have a look at the patch and get it in shape for merging? there also miss an update to the manpage and the drivers.list.> It`s realy works as expected and I have no problems with it. My friends > use it with other distributions (mostly - CentOS/RHEL) and also have no problems. > Currently available powercom driver is not workable with USB-attached devices.just to be sure, for other users: what is the name of the port you've indicated in ups.conf (my guess is ttyUSB0 since the powercom driver has no real USB support)?> For example: > /var/log/daemon.log message with original: > Oct 18 23:20:11 main powercom[10312]: data receiving error > (-1 instead of 16 bytes) > /var/log/daemon.log message with patched: > Oct 18 23:20:52 main powercom[4551]: Startup successfulthat suits me fine. for the sake of completeness, can you also post back an upsc output, and report if you have tested the low battery condition?> P.S. Excuse me my bad English.still, not that bad... for a sysadmin ;-p thanks, Arnaud -- Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ Free Software Developer - http://arnaud.quette.free.fr/ -------------- next part -------------- A non-text attachment was scrubbed... Name: powercom.diff.gz Type: application/x-gzip Size: 1380 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20081021/dd404fcb/attachment.bin
Arjen de Korte
2008-Oct-23 06:38 UTC
[Nut-upsdev] Powercom Imperial/Black Knight USB support for NUT
Citeren Arnaud Quette <aquette.dev at gmail.com>: [...]> just to be sure, for other users: what is the name of the port you've > indicated in ups.conf (my guess is ttyUSB0 since the powercom driver > has no real USB support)?If this is the case, what are the vendorid and productid that are reported for this device? The output of 'lsusb -v' should reveal this. Furthermore, I would prefer to see something else than 'USB' as the keyword here. Chances are that we will see additional Powercom like devices that are similarly equipped with a USB port. I don't think the settings for this device are generic enough to cover all variations there might be, so something more descriptive for the devices you tested it with (possibly by adding additional table entries) would be welcomed. Best regards, Arjen -- Please keep list traffic on the list
Reasonably Related Threads
- Powercom black knight 800AP (serial)
- Anybody have expirience with Powercom Imperial 1500 VAC (USB interface)?
- Unable to disable beeper on Powercom Imperial IMP-525AP
- Unable to disable beeper on Powercom Imperial IMP-525AP [SOLVED]
- CentOS 5.4 KVM: PXE boot problem