Olav Seyfarth
2015-Nov-23 15:21 UTC
[Nut-upsuser] Cannot access Patriot Pro II from new system
Hi list, on my previous (lenny or squeeze) machine, I had it up and running, but that machine and configs are gone - and on my new jessie machine (see device and config details below) I cannot start the driver: # /lib/nut/bestups -DDDDD -a Patriot_Pro_II_750 0.000000 debug level is '5' 0.000806 send_to_all: SETINFO device.type "ups" 0.000842 send_to_all: SETINFO driver.version "2.7.2" 0.000862 send_to_all: SETINFO driver.version.internal "1.06" 0.000884 send_to_all: SETINFO driver.name "bestups" 17.264987 Unable to detect a Best/SOLA or Phoenix protocol UPS I see no other relevant log entries. I've noticed this tread: http://lists.alioth.debian.org/pipermail/nut-upsdev/2014-November/006801.html But unless I misunderstood something, the driver bestups should still work in jessie, right? Might this be a clable issue? The cable is the original cable that used to work with Best software (on Windows XP) and NUT (unsure which version, default repos). I checked it's wiring, it's as described in http://www.networkupstools.org/cables.html#_phoenixtec_best_power except that PC Pins 1,8 and 9 are connected to ground/shield. Or a serial setup failure? stty tells me that the driver sets speed to 2400baud, but does that mean that the driver can establish a connection to the device? How to tell? If I interpreted other posts correctly, I should be able to use a terminal program to access the UPS device. So I started minicom -D /dev/ttyS0 (without and with " -b 2400" or " -b 9600") and tried to enter "Q1 \r" but I don't even get a local echo. So what does that mean and what else can I try? Thank you for your ideas and hints! Olav P.S.: Once it works, should I contribute my values to https://github.com/networkupstools/nut-ddl/tree/master/Best_Power ? How? __________________________________ My new machine is ASUS H7-Plus; it has an internal serial connector (with tappet(?) so that I can only plug the internal cable in one way) but I bought a 3rd pary shield. My OS is jessie, Debian kernel 3.16.7-ckt17-1 My NUT version: 2.7.2-4, installed via apt-get from repos My UPS is a Patriot Pro II 750, P/N PP0750E S/N 186PFA4126 REV:00 (with battery replaced), manual available http://powerquality.eaton.de/Products-services/legacy/patriot-pro-info.asp, should be very similar to http://www.networkupstools.org/ddl/Best_Power/Patriot_Pro_II_400.html My config (all to default, except for these lines): /etc/nut/nut.conf: MODE=standalone /etc/nut/ups.conf: [Patriot_Pro_II_750] driver = bestups port = /dev/ttyS0 /etc/nut/upsd.users: [upsmon] upsmon master password = somepass /etc/nut/upsmon.conf: MONITOR Patriot_Pro_II_750 at localhost 1 upsmon somepass master /etc/passwd: nut:x:112:119::/var/lib/nut:/bin/false /etc/group: dialout:x:20:nut nut:x:119: /etc/udev/rules.d/99_nut-serialups.rules: KERNEL=="ttyS0", GROUP="nut" ________________ # ls -l /etc/nut -rw-r----- 1 root nut 1544 Nov 23 12:36 nut.conf -rw-r----- 1 root nut 4634 Nov 23 14:03 ups.conf -rw-r----- 1 root nut 4577 Nov 23 13:26 upsd.conf -rw-r----- 1 root nut 2177 Nov 23 14:04 upsd.users -rw-r----- 1 root nut 15233 Nov 23 14:04 upsmon.conf -rw-r----- 1 root nut 3887 M?r 20 2015 upssched.conf # ls -l /dev/ttyS0 crw-rw---- 1 root nut 4, 64 Nov 23 14:13 /dev/ttyS0 # setserial -gav /dev/ttyS0 /dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4 Baud_base: 115200, close_delay: 50, divisor: 0 closing_wait: 3000 Flags: spd_normal skip_test # stty -F /dev/ttyS0 speed 2400 baud; line = 0; min = 1; time = 0; -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 665 bytes Desc: OpenPGP digital signature URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20151123/7d52a602/attachment.sig>
Charles Lepple
2015-Nov-24 01:55 UTC
[Nut-upsuser] Cannot access Patriot Pro II from new system
On Nov 23, 2015, at 10:21 AM, Olav Seyfarth <olav at seyfarth.de> wrote:> > I've noticed this tread: > http://lists.alioth.debian.org/pipermail/nut-upsdev/2014-November/006801.html > But unless I misunderstood something, the driver bestups should still > work in jessie, right?It should still work.> Might this be a clable issue? > > The cable is the original cable that used to work with Best software (on > Windows XP) and NUT (unsure which version, default repos). I checked > it's wiring, it's as described in > http://www.networkupstools.org/cables.html#_phoenixtec_best_power except > that PC Pins 1,8 and 9 are connected to ground/shield. > > Or a serial setup failure? > > stty tells me that the driver sets speed to 2400baud, but does that mean > that the driver can establish a connection to the device? > How to tell?There is no hardware handshaking, so the only way to tell is to send commands to the UPS.> > If I interpreted other posts correctly, I should be able to use a > terminal program to access the UPS device. So I started minicom -D > /dev/ttyS0 (without and with " -b 2400" or " -b 9600") and tried to > enter "Q1 \r" but I don't even get a local echo.I think minicom defaults to enabling hardware handshaking, so try turning that off (^A, O, "Serial port setup", F).> So what does that mean and what else can I try? > > Thank you for your ideas and hints! > Olav > > P.S.: Once it works, should I contribute my values to > https://github.com/networkupstools/nut-ddl/tree/master/Best_Power ? How?You can open an issue on the DDL repository, and include the output of "upsc", "upsrw", and "upscmd -l". I think the latter two will be mostly empty-- I'd check, but I am actually running the newer nutdrv_qx, which wasn't released until NUT 2.7.3.> My new machine is ASUS H7-Plus; it has an internal serial connector > (with tappet(?) so that I can only plug the internal cable in one way) > but I bought a 3rd pary shield.If you have a jumper wire handy, you can connect the PC's TxD to RxD, and check that characters are echoed in minicom. Then check the continuity to the serial port.> > # setserial -gav /dev/ttyS0 > /dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4 > Baud_base: 115200, close_delay: 50, divisor: 0 > closing_wait: 3000 > Flags: spd_normal skip_testCurious about the "skip_test" option...> _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser-- Charles Lepple clepple at gmail
Olav Seyfarth
2015-Nov-26 23:56 UTC
[Nut-upsuser] Cannot access Patriot Pro II from new system
Hi Charles, thank you VERY MUCH for all your hints.> If you have a jumper wire handy, you can connect the PC's TxD to RxDI should have tried to connect from another computer in the first place. Or access another device known to work from this computer. It turned out that the shield I used to connect the mainboard connector to the PC case expected another mainboard pin layout. So all I had to do is to re-arrange the wires... See attached log.> open an issue on the DDL repository, and include the output of "upsc", > "upsrw", and "upscmd -l"Done: https://github.com/networkupstools/nut-ddl/issues/4 Please email me if I should provide/add anything else. Olav -------------- next part -------------- // I could not get nut on my new server running dibian jessie to connect to my UPS Best Power Patriot Pro 750. // THIS is is a trail of my tests on a SECOND computer - so this shows what you see if all DOES work well. // added user to dialout group and logged out and back in $ setserial -g /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 $ stty -F /dev/ttyS0 speed 9600 baud; line = 0; -brkint -imaxbel $ sudo apt-get install nut Paketlisten werden gelesen... Fertig Abh?ngigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig Die folgenden zus?tzlichen Pakete werden installiert: libupsclient3 nut-client nut-server Vorgeschlagene Pakete: nut-monitor nut-cgi nut-snmp nut-ipmi nut-xml Die folgenden NEUEN Pakete werden installiert: libupsclient3 nut nut-client nut-server 0 aktualisiert, 4 neu installiert, 0 zu entfernen und 0 nicht aktualisiert. Es m?ssen 876 kB an Archiven heruntergeladen werden. Nach dieser Operation werden 5.345 kB Plattenplatz zus?tzlich benutzt. M?chten Sie fortfahren? [J/n] Holen: 1 http://archive.ubuntu.com/ubuntu/ trusty/main libupsclient3 amd64 2.7.1-1ubuntu1 [60,0 kB] Holen: 2 http://archive.ubuntu.com/ubuntu/ trusty/main nut-client amd64 2.7.1-1ubuntu1 [87,2 kB] Holen: 3 http://archive.ubuntu.com/ubuntu/ trusty/main nut-server amd64 2.7.1-1ubuntu1 [609 kB] Holen: 4 http://archive.ubuntu.com/ubuntu/ trusty/main nut all 2.7.1-1ubuntu1 [120 kB] Es wurden 876 kB in 2 s geholt (416 kB/s). [...] $ sudo cat >>/etc/nut/ups.conf <<EOF [Best_Power_Patriot_Pro_750] driver = bestups port = /dev/ttyS0 EOF // added user to nut group and logged out and back in // all that's necessary for a DRIVER test should be there now // UPS device is OFF (neither plugged in nor switched on, but serial cable plugged in) $ /lib/nut/bestups -a Best_Power_Patriot_Pro_750 -DDDDD Network UPS Tools - Best UPS driver 1.06 (2.7.1) 0.000000 debug level is '5' 0.000881 send_to_all: SETINFO device.type "ups" 0.000931 send_to_all: SETINFO driver.version "2.7.1" 0.000959 send_to_all: SETINFO driver.version.internal "1.06" 0.000986 send_to_all: SETINFO driver.name "bestups" 17.267267 Unable to detect a Best/SOLA or Phoenix protocol UPS $ stty -F /dev/ttyS0 speed 2400 baud; line = 0; min = 1; time = 0; -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke $ setserial -g /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 // note that the port has been reconfigured // UPS is plugged, on and connected $ /lib/nut/bestups -a Best_Power_Patriot_Pro_750 -DDDDD Network UPS Tools - Best UPS driver 1.06 (2.7.1) 0.000000 debug level is '5' 0.000809 send_to_all: SETINFO device.type "ups" 0.000861 send_to_all: SETINFO driver.version "2.7.1" 0.000890 send_to_all: SETINFO driver.version.internal "1.06" 0.000918 send_to_all: SETINFO driver.name "bestups" 0.648605 get_ident: got [PRO,750,230,230,20.0,27.3] 0.648678 send_to_all: SETINFO input.voltage.nominal "230" 0.648715 send_to_all: SETINFO output.voltage.nominal "230" 0.648749 send_to_all: SETINFO ups.mfr "Best Power" 0.648766 send_to_all: SETINFO ups.model "Patriot Pro 750" 0.648783 send_to_all: SETINFO battery.voltage.nominal "24" Detected Best Power Patriot Pro 750 on /dev/ttyS0 0.749072 send_to_all: ADDCMD test.battery.start 0.749128 send_to_all: ADDCMD test.battery.stop 1.149812 send_to_all: SETINFO battery.voltage "27.5" 1.149863 send_to_all: SETINFO input.voltage "233.0" 1.149895 send_to_all: SETINFO output.voltage "233.0" 1.149919 send_to_all: SETINFO ups.load "000" 1.149940 send_to_all: SETINFO input.frequency "50.0" 1.149965 send_to_all: SETINFO battery.charge "100.0" 1.149990 send_to_all: SETINFO ups.status "OL" 1.150011 send_to_all: DATAOK 1.150112 dstate_init: sock /var/run/nut/bestups-Best_Power_Patriot_Pro_750 open on fd 5 1.150155 send_to_all: SETINFO driver.parameter.pollinterval "2" 1.150193 send_to_all: SETINFO device.mfr "Best Power" 1.150230 send_to_all: SETINFO device.model "Patriot Pro 750" ^C -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 665 bytes Desc: OpenPGP digital signature URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20151127/62acc0dd/attachment.sig>