David Bezuidenhout
2013-May-11 17:26 UTC
[Nut-upsuser] blazer_ser problem on windows NUT 2.6.5-3780M
Hi, I have a bunch of UPSs, most connected to pcs with Linux working 100% with NUT. The only one I have a problem with, is connected to Windows 7 64bit, and I used the straight MSI installed from the website named NUT-Installer-2.6.5-4.msi Took me a while to find a way to get it to work, but it is ugly for now. Just starting up the service results in a NUT not working at all, and I tracked it down to the blazer_ser driver not finding the UPS. Debugging shows some problem with the communication on my serial-usb port. What I have found is, that it doesn't work until I add 4x debug flags. eg: -DDDD Here is a copy of my ups.conf: [myups] driver = blazer_ser port = com6 desc = "Proline UPS" Here is the output from blazer_ser not working: C:\Program Files (x86)\NUT\bin>blazer_ser -ups *-DDD* -a myups Network UPS Tools - Megatec/Q1 protocol serial driver 1.55 (2.6.5-3780M) 0.000000 debug level is '3' 0.002000 w32_serial_open (com6) 0.177010 setting initial state on com6 0.231013 00000050 = w32_serial_open (com6) 0.236014 Warning: no locking method is available: No error [The operation completed successfully. ] 0.244014 vmin_ 0, vtime_ 0 0.346020 action 0 0.398023 vtime 0, vmin 1 0.401023 ReadTotalTimeoutConstant -2, ReadIntervalTimeout -1, ReadTotalTimeoutMultiplier -1 0.408024 vmin_ 1, vtime_ 0 0.410024 action 0 0.412024 vtime 0, vmin -1 0.414024 ReadTotalTimeoutConstant -2, ReadIntervalTimeout -1, ReadTotalTimeoutMultiplier -1 0.521030 Trying megatec protocol... 0.624036 send: 'Q1' 1.874107 read: Input/output error 1.876108 blazer_status: short reply 1.878108 Status read 1 failed 1.980113 send: 'Q1' 3.226185 read: Input/output error 3.229185 blazer_status: short reply 3.232185 Status read 2 failed 3.334191 send: 'Q1' 4.579262 read: Input/output error 4.581262 blazer_status: short reply 4.584262 Status read 3 failed 4.586263 Trying mustek protocol... 4.688268 send: 'QS' 5.716327 read: Input/output error 5.719327 blazer_status: short reply 5.722328 Status read 1 failed 5.825333 send: 'QS' 6.851392 read: Input/output error 6.854392 blazer_status: short reply 6.857392 Status read 2 failed 6.959398 send: 'QS' 7.987457 read: Input/output error 7.990457 blazer_status: short reply 7.993457 Status read 3 failed 7.995458 Trying megatec/old protocol... 8.098463 send: 'D' 9.116522 read: Input/output error 9.119522 blazer_status: short reply 9.121522 Status read 1 failed 9.224528 send: 'D' 10.242586 read: Input/output error 10.245586 blazer_status: short reply 10.247586 Status read 2 failed 10.349592 send: 'D' 11.368650 read: Input/output error 11.371651 blazer_status: short reply 11.374651 Status read 3 failed 11.376651 Trying zinto protocol... 11.479657 send: 'Q1' 12.727728 read: Input/output error 12.730728 blazer_status: short reply 12.733729 Status read 1 failed 12.836734 send: 'Q1' 14.081806 read: Input/output error 14.084806 blazer_status: short reply 14.086806 Status read 2 failed 14.188812 send: 'Q1' 15.435883 read: Input/output error 15.438883 blazer_status: short reply 15.441883 Status read 3 failed 15.443884 No supported UPS detected And here is the output when it works with the 4x -DDDD flag: C:\Program Files (x86)\NUT\bin>blazer_ser -ups *-DDDD* -a myups Network UPS Tools - Megatec/Q1 protocol serial driver 1.55 (2.6.5-3780M) 0.000000 debug level is '4' 0.002000 w32_serial_open (com6) 0.177010 setting initial state on com6 0.231014 00000050 = w32_serial_open (com6) 0.236014 Warning: no locking method is available: No error [The operation completed successfully. ] 0.244014 vmin_ 0, vtime_ 0 0.346020 action 0 0.398023 vtime 0, vmin 1 0.401023 ReadTotalTimeoutConstant -2, ReadIntervalTimeout -1, ReadTotalTimeoutMultiplier -1 0.408024 vmin_ 1, vtime_ 0 0.410024 action 0 0.412024 vtime 0, vmin -1 0.414024 ReadTotalTimeoutConstant -2, ReadIntervalTimeout -1, ReadTotalTimeoutMultiplier -1 0.521030 Trying megatec protocol... 0.625036 send: 'Q1' 0.627036 w32_serial_read : ulen 512, vmin_ -1, vtime_ 0, hEvent 00000054 0.642037 w32_serial_read : characters are available on input buffer 0.647037 w32_serial_read : Reading 1 characters 0.651038 w32_serial_read : total characters read = 1 0.654038 w32_serial_read : Reading 2 characters 0.658038 w32_serial_read : total characters read = 3 0.661038 w32_serial_read : Reading 1 characters 0.664038 w32_serial_read : total characters read = 4 0.668039 w32_serial_read : Reading 2 characters 0.670039 w32_serial_read : total characters read = 6 0.673039 w32_serial_read : Reading 1 characters 0.676039 w32_serial_read : total characters read = 7 0.679039 w32_serial_read : Reading 1 characters 0.682039 w32_serial_read : total characters read = 8 0.685040 w32_serial_read : Reading 1 characters 0.687040 w32_serial_read : total characters read = 9 0.690040 w32_serial_read : Reading 1 characters 0.693040 w32_serial_read : total characters read = 10 0.696040 w32_serial_read : Reading 1 characters 0.698040 w32_serial_read : total characters read = 11 0.700040 w32_serial_read : Reading 1 characters 0.702040 w32_serial_read : total characters read = 12 0.703041 w32_serial_read : Reading 1 characters 0.705041 w32_serial_read : total characters read = 13 0.707041 w32_serial_read : Reading 1 characters 0.709041 w32_serial_read : total characters read = 14 0.710041 w32_serial_read : characters are available on input buffer 0.713041 w32_serial_read : Reading 1 characters 0.715041 w32_serial_read : total characters read = 15 0.716041 w32_serial_read : characters are available on input buffer 0.719041 w32_serial_read : Reading 1 characters 0.721042 w32_serial_read : total characters read = 16 0.723042 w32_serial_read : Reading 1 characters 0.724042 w32_serial_read : total characters read = 17 0.726042 w32_serial_read : Reading 1 characters 0.728042 w32_serial_read : total characters read = 18 0.730042 w32_serial_read : characters are available on input buffer 0.732042 w32_serial_read : Reading 1 characters 0.734042 w32_serial_read : total characters read = 19 0.736042 w32_serial_read : Reading 1 characters 0.738043 w32_serial_read : total characters read = 20 0.739043 w32_serial_read : characters are available on input buffer 0.742043 w32_serial_read : Reading 1 characters 0.744043 w32_serial_read : total characters read = 21 0.745043 w32_serial_read : characters are available on input buffer 0.748043 w32_serial_read : Reading 1 characters 0.750043 w32_serial_read : total characters read = 22 0.752043 w32_serial_read : Reading 1 characters 0.753043 w32_serial_read : total characters read = 23 0.755044 w32_serial_read : characters are available on input buffer 0.757044 w32_serial_read : Reading 1 characters 0.759044 w32_serial_read : total characters read = 24 0.761044 w32_serial_read : Reading 1 characters 0.763044 w32_serial_read : total characters read = 25 0.765044 w32_serial_read : characters are available on input buffer 0.767044 w32_serial_read : Reading 1 characters 0.769044 w32_serial_read : total characters read = 26 0.771044 w32_serial_read : characters are available on input buffer 0.773045 w32_serial_read : Reading 1 characters 0.775045 w32_serial_read : total characters read = 27 0.777045 w32_serial_read : Reading 1 characters 0.779045 w32_serial_read : total characters read = 28 0.781045 w32_serial_read : characters are available on input buffer 0.783045 w32_serial_read : Reading 1 characters 0.785045 w32_serial_read : total characters read = 29 0.787045 w32_serial_read : Reading 1 characters 0.789045 w32_serial_read : total characters read = 30 0.790046 w32_serial_read : characters are available on input buffer 0.793046 w32_serial_read : Reading 1 characters 0.794046 w32_serial_read : total characters read = 31 0.796046 w32_serial_read : Reading 1 characters 0.798046 w32_serial_read : total characters read = 32 0.800046 w32_serial_read : characters are available on input buffer 0.802046 w32_serial_read : Reading 1 characters 0.804046 w32_serial_read : total characters read = 33 0.806046 w32_serial_read : Reading 1 characters 0.807047 w32_serial_read : total characters read = 34 0.809047 w32_serial_read : characters are available on input buffer 0.812047 w32_serial_read : Reading 1 characters 0.813047 w32_serial_read : total characters read = 35 0.815047 w32_serial_read : characters are available on input buffer 0.818047 w32_serial_read : Reading 1 characters 0.819047 w32_serial_read : total characters read = 36 0.821047 w32_serial_read : Reading 1 characters 0.823047 w32_serial_read : total characters read = 37 0.825048 w32_serial_read : characters are available on input buffer 0.827048 w32_serial_read : Reading 1 characters 0.829048 w32_serial_read : total characters read = 38 0.831048 w32_serial_read : Reading 1 characters 0.833048 w32_serial_read : total characters read = 39 0.834048 w32_serial_read : characters are available on input buffer 0.837048 w32_serial_read : Reading 1 characters 0.839048 w32_serial_read : total characters read = 40 0.841048 w32_serial_read : Reading 1 characters 0.842049 w32_serial_read : total characters read = 41 0.844049 w32_serial_read : characters are available on input buffer 0.846049 w32_serial_read : Reading 1 characters 0.848049 w32_serial_read : total characters read = 42 0.850049 w32_serial_read : characters are available on input buffer 0.853049 w32_serial_read : Reading 1 characters 0.855049 w32_serial_read : total characters read = 43 0.856049 w32_serial_read : Reading 1 characters 0.858049 w32_serial_read : total characters read = 44 0.860050 w32_serial_read : characters are available on input buffer 0.863050 w32_serial_read : Reading 1 characters 0.864050 w32_serial_read : total characters read = 45 0.866050 w32_serial_read : Reading 1 characters 0.868050 w32_serial_read : total characters read = 46 0.870050 w32_serial_read : characters are available on input buffer 0.872050 w32_serial_read : Reading 1 characters 0.874050 w32_serial_read : total characters read = 47 0.875050 w32_serial_read : characters are available on input buffer 0.878051 w32_serial_read : Reading 1 characters 1.879108 w32_serial_read : total characters read = 47 1.884108 read: '(227.0 227.0 227.0 029 51.0 14.0 41.0 00001001' 1.889108 Status read in 1 tries * 1.891109 Supported UPS detected with megatec protocol* 1.996115 send: 'F' 1.997115 w32_serial_read : ulen 512, vmin_ -1, vtime_ 0, hEvent 00000054 2.009115 w32_serial_read : characters are available on input buffer 2.014116 w32_serial_read : Reading 1 characters 2.017116 w32_serial_read : total characters read = 1 2.020116 w32_serial_read : Reading 2 characters 2.022116 w32_serial_read : total characters read = 3 2.024116 w32_serial_read : Reading 1 characters 2.026116 w32_serial_read : total characters read = 4 2.028116 w32_serial_read : Reading 1 characters 2.030116 w32_serial_read : total characters read = 5 2.033117 w32_serial_read : characters are available on input buffer 2.035117 w32_serial_read : Reading 1 characters 2.037117 w32_serial_read : total characters read = 6 2.040117 w32_serial_read : Reading 1 characters 2.042117 w32_serial_read : total characters read = 7 2.044117 w32_serial_read : characters are available on input buffer 2.047117 w32_serial_read : Reading 1 characters 2.049118 w32_serial_read : total characters read = 8 2.051118 w32_serial_read : Reading 1 characters 2.053118 w32_serial_read : total characters read = 9 2.055118 w32_serial_read : Reading 1 characters 2.056118 w32_serial_read : total characters read = 10 2.058118 w32_serial_read : characters are available on input buffer 2.061118 w32_serial_read : Reading 1 characters 2.062118 w32_serial_read : total characters read = 11 2.064118 w32_serial_read : characters are available on input buffer 2.067119 w32_serial_read : Reading 1 characters 2.068119 w32_serial_read : total characters read = 12 2.070119 w32_serial_read : Reading 1 characters 2.072119 w32_serial_read : total characters read = 13 2.074119 w32_serial_read : characters are available on input buffer 2.076119 w32_serial_read : Reading 1 characters 2.078119 w32_serial_read : total characters read = 14 2.080119 w32_serial_read : Reading 1 characters 2.082119 w32_serial_read : total characters read = 15 2.084120 w32_serial_read : characters are available on input buffer 2.086120 w32_serial_read : Reading 1 characters 2.088120 w32_serial_read : total characters read = 16 2.090120 w32_serial_read : Reading 1 characters 2.091120 w32_serial_read : total characters read = 17 2.093120 w32_serial_read : characters are available on input buffer 2.096120 w32_serial_read : Reading 1 characters 2.097120 w32_serial_read : total characters read = 18 2.099120 w32_serial_read : characters are available on input buffer 2.102121 w32_serial_read : Reading 1 characters 2.103121 w32_serial_read : total characters read = 19 2.105121 w32_serial_read : characters are available on input buffer 2.108121 w32_serial_read : Reading 1 characters 2.109121 w32_serial_read : total characters read = 20 2.111121 w32_serial_read : Reading 1 characters 2.113121 w32_serial_read : total characters read = 21 2.115121 w32_serial_read : characters are available on input buffer 2.117121 w32_serial_read : Reading 1 characters 2.119122 w32_serial_read : total characters read = 22 2.121122 w32_serial_read : characters are available on input buffer 2.123122 w32_serial_read : Reading 1 characters At this point I can start upsd manually and then finally it works: C:\Program Files (x86)\NUT\sbin>upsd -D -4 -q Network UPS Tools upsd 2.6.5-3780M 0.000000 listening on 127.0.0.1 port 3493 2.003114 Connected to UPS [myups]: blazer_ser-myups 2.650151 User upsmon at 127.0.0.1 logged into UPS [myups] And the output from upsc: C:\Program Files (x86)\NUT\bin>upsc myups upscli not initialized, force initialisation without SSL configuration Init SSL without certificate database Can not connect to localhost in SSL, continue uncrypted battery.charge: 100 battery.voltage: 13.90 battery.voltage.high: 13.00 battery.voltage.low: 10.40 battery.voltage.nominal: 12.0 device.mfr: device.model: PCSTAR-PRO device.type: ups driver.name: blazer_ser driver.parameter.pollinterval: 2 driver.parameter.port: com6 driver.version: 2.6.5-3780M driver.version.internal: 1.55 input.current.nominal: 3.0 input.frequency: 50.0 input.frequency.nominal: 50 input.voltage: 227.0 input.voltage.fault: 227.0 input.voltage.nominal: 230 output.voltage: 227.0 ups.beeper.status: enabled ups.delay.shutdown: 30 ups.delay.start: 180 ups.firmware: V1.02-1211 ups.load: 36 ups.mfr: ups.model: PCSTAR-PRO ups.status: OL ups.temperature: 41.0 ups.type: offline / line interactive What I don't understand is, what the driver does different with -DDDD vs -DDD or less D flags. But I am pretty certain that small difference in the code could fix this driver working for me in Windows without debugging, like it does on Linux (Ubuntu). Thank you in advance, David Bezuidenhout -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20130511/288d6ff3/attachment-0001.html>
Kris Jordan
2013-May-11 19:05 UTC
[Nut-upsuser] blazer_ser problem on windows NUT 2.6.5-3780M
David Bezuidenhout wrote, On 5/11/2013 10:26 AM:> Hi, > > I have a bunch of UPSs, most connected to pcs with Linux working 100% > with NUT. > The only one I have a problem with, is connected to Windows 7 64bit, > and I used the straight MSI installed from the website > named NUT-Installer-2.6.5-4.msi > > Took me a while to find a way to get it to work, but it is ugly for > now. Just starting up the service results in a NUT not working at all, > and I tracked it down to the blazer_ser driver not finding the UPS. > Debugging shows some problem with the communication on my serial-usb > port. What I have found is, that it doesn't work until I add 4x debug > flags. eg: -DDDDI had a similar issue with usbhid-ups on a USB 3.0 port until I moved it to a USB 2.0 port. Maybe it's timing related, I'd expect adding debugging would slow it down a tad.
Apparently Analagous Threads
- bug report: apcsmart (WIN) 940-0024C connect fail, problem with command 'E'
- blazer driver: Possible bugs with battery packs
- battery.charge and other fixes needed for X-Power Tigra 1kVA
- Problem connecting to APC Smart UPS SC1000 on Windows
- Problem to connect to APC SC1500