[Nut-upsdev] smsbrasil-0.0.2 driver

Rodrigo Vigna skrull at gmail.com
Wed Jun 26 05:11:56 UTC 2013


cmd test.battery.start.deep was not tested yet.

cmd test.battery.start.quick works as expected.
cmd test.battery.start 120 works as expected.
cmd test.battery.stop works as expected.
cmd beeper.toggle works as expected.
cmd shutdown.return works as expected.
cmd shutdown.reboot does not work entirely. After a minute, UPS is shut
down but didn't come back. (Issuing shutdown.stop power up it again)

Some details I found:

After shutdown.return and shutdown.reboot, usb port (/dev/ttyUSB0) is still
open and working.
Powering down from ups button disables communication.

Power up from ups button issues power-on self test (pop, crack and clicking
sounds) whereas shutdown.return and shutdown.stop just bring it on without
post. I think this is normal.

Also, from ups button power up, power up from shutdown.return or
shutdown.stop, the smsbrasil sets ups.status as OL BYPASS. Since this ups
is line interactive, what is this bypass bit? I didn't review the driver
yet but it is a bug from the driver or hardware?
Also related, after returning from a test, the driver sets ups.status as OL
_without_ BYPASS.

There is also (I suppose) wrong values on reestabilishing connection.
input.voltage 3892.0
input.frequency 0.2
output.voltage 3892.0
battery.charge 2252.8
ups.temp 3072.0
ups.load 3891.2
battery.runtime 180
ups.status ALARM OL BOOST OVER FSD
Could this be related to pu.BatOnOff ?

There is also another point, after issuing shutdown.reboot or
shutdown.return, the ups.load, output.voltage and battery.runtime values
goes to 0, but ups.status is "OL BYPASS". Is this ok?

driver debug log is attached. (smsbrasil -qqqqqq -DDDDDD -i 5)

Rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20130626/7e5c2fb2/attachment-0001.html>
-------------- next part --------------
TURNED OFF via ups main button
- communication is lost.
- upsc sms always returns "Error: Data stale" 

3096.067419	smsBR_RecAnswer: Started
3098.069531	smsBR_RecAnswer: Exiting by timeout (2 seconds)
3098.069592	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
3098.069617	send_to_all: DATASTALE
3098.069699	send_to_one: PONG
3101.070466	smsBR_RecAnswer: Started
3103.072605	smsBR_RecAnswer: Exiting by timeout (2 seconds)
3103.072686	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
3106.073475	smsBR_RecAnswer: Started
3108.075605	smsBR_RecAnswer: Exiting by timeout (2 seconds)
3108.075686	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
3111.076076	smsBR_RecAnswer: Started
3113.078197	smsBR_RecAnswer: Exiting by timeout (2 seconds)
3113.078257	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
3116.078210	smsBR_RecAnswer: Started
3118.080324	smsBR_RecAnswer: Exiting by timeout (2 seconds)
3118.080383	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
-------------- next part --------------
ISSUED cmd shutdown.reboot (ups powers[B off)
POWERED UP via ups main button.
 - OK: after a few seconds, it powers up.
 - returns as OL,BYPASS.

2991.969202	send_to_one: PONG
2995.983147	smsBR_RecAnswer: Started
2997.529898	smsBR_RecAnswer: Finished
2998.019372	send_to_one: PONG
3000.986221	smsBR_RecAnswer: Started
3001.101895	smsBR_RecAnswer: Finished
3001.101968	send_to_all: SETINFO output.voltage "114.0"
3005.987327	smsBR_RecAnswer: Started
3006.102942	smsBR_RecAnswer: Finished
3006.102987	send_to_all: SETINFO output.voltage "115.0"
3006.103009	send_to_all: SETINFO ups.load "9.0"
3006.103024	send_to_all: SETINFO battery.runtime "4020"
3010.992345	smsBR_RecAnswer: Started
3011.107999	smsBR_RecAnswer: Finished
3011.108071	send_to_all: SETINFO output.voltage "114.0"
3011.108122	send_to_all: SETINFO ups.load "12.0"
3011.108154	send_to_all: SETINFO battery.runtime "3060"
3015.993547	smsBR_RecAnswer: Started
3016.108933	smsBR_RecAnswer: Finished
3016.109008	send_to_all: SETINFO ups.load "13.0"
3016.109052	send_to_all: SETINFO battery.runtime "2820"
3020.997869	smsBR_RecAnswer: Started
3021.117924	smsBR_RecAnswer: Finished
3021.117994	send_to_all: SETINFO input.voltage "228.0"
3021.118047	send_to_all: SETINFO ups.load "15.0"
3021.118080	send_to_all: SETINFO battery.runtime "2400"
-------------- next part --------------
ISSUED cmd shutdown.reboot
 - OK: shutdown ups.
 - FAILED: after a minute it is still powered off.
 - attempting to power up via ups button works, power-on self test is executed and it returns as OL,BYPASS.

2430.556827	smsBR_RecAnswer: Started
2430.672842	smsBR_RecAnswer: Finished
2432.019188	send_to_one: PONG
2434.428696	instcmd: command [shutdown.reboot] handled
2435.558033	smsBR_RecAnswer: Started
2435.673902	smsBR_RecAnswer: Finished
2435.673999	send_to_all: SETINFO ups.alarm "UPS under SHUTDOWN mode!"
2435.674042	send_to_all: SETINFO ups.status "ALARM OL BYPASS FSD"
2440.563059	smsBR_RecAnswer: Started
2440.678883	smsBR_RecAnswer: Finished
2442.111280	send_to_one: PONG
2445.566594	smsBR_RecAnswer: Started
2445.681823	smsBR_RecAnswer: Finished
2448.174522	send_to_one: PONG
2450.569001	smsBR_RecAnswer: Started
2450.684810	smsBR_RecAnswer: Finished
2450.684884	send_to_all: SETINFO output.voltage "0.0"
2450.684946	send_to_all: DELINFO ups.alarm
2450.684976	send_to_all: SETINFO ups.status "OL BYPASS"
2455.571353	smsBR_RecAnswer: Started
2455.686801	smsBR_RecAnswer: Finished
2455.686885	send_to_all: SETINFO ups.load "0.0"
2455.686931	send_to_all: SETINFO battery.runtime "0"
2460.576291	smsBR_RecAnswer: Started
2460.691822	smsBR_RecAnswer: Finished
2460.691890	send_to_all: SETINFO input.voltage "228.0"
2465.581234	smsBR_RecAnswer: Started
2465.696827	smsBR_RecAnswer: Finished
2465.696895	send_to_all: SETINFO input.voltage "230.0"
2470.586203	smsBR_RecAnswer: Started
2470.701823	smsBR_RecAnswer: Finished
2471.387767	send_to_one: PONG
2475.590461	smsBR_RecAnswer: Started
2475.705773	smsBR_RecAnswer: Finished
2477.440340	send_to_one: PONG
2480.593682	smsBR_RecAnswer: Started
2480.708823	smsBR_RecAnswer: Finished
2480.708891	send_to_all: SETINFO input.voltage "228.0"

deu


- desligando no botao:
perde conexao ttyusb0 timeout

- ligando no botao:
post

 801.445746	smsBR_RecAnswer: Exiting by timeout (2 seconds)
 801.445806	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
 804.446713	smsBR_RecAnswer: Started
 804.446755	smsBR_RecAnswer: Finished
 804.446775	send_to_all: SETINFO output.voltage "115.0"
 804.446804	send_to_all: DATAOK
 809.451780	smsBR_RecAnswer: Started
 809.451858	smsBR_RecAnswer: Finished
 809.451895	send_to_all: SETINFO input.voltage "230.0"
 814.456905	smsBR_RecAnswer: Started
 814.456979	smsBR_RecAnswer: Finished
 814.457020	send_to_all: SETINFO output.voltage "114.0"
 814.457069	send_to_all: SETINFO ups.temperature "27.0"
 814.457097	send_to_all: SETINFO ups.load "4.0"
 814.457128	send_to_all: SETINFO battery.runtime "9180"
 819.461994	smsBR_RecAnswer: Started
 819.462069	smsBR_RecAnswer: Finished
 819.462103	send_to_all: SETINFO input.voltage "228.0"
 819.462175	send_to_all: SETINFO ups.temperature "35.0"
 819.462206	send_to_all: SETINFO ups.load "10.0"
 819.462236	send_to_all: SETINFO battery.runtime "3660"
 824.467081	smsBR_RecAnswer: Started
 824.467182	smsBR_RecAnswer: Finished
 824.467219	send_to_all: SETINFO input.voltage "230.0"
 824.467271	send_to_all: SETINFO ups.load "16.0"
 824.467304	send_to_all: SETINFO battery.runtime "2280"
 829.468666	smsBR_RecAnswer: Started
 829.468749	smsBR_RecAnswer: Finished
 829.923706	send_to_one: PONG


FSD?

-- test quick
- volta como online apenas

 456.942856	instcmd: command [test.battery.start.quick] handled
 459.166328	smsBR_RecAnswer: Started
 459.282400	smsBR_RecAnswer: Finished
 459.282482	send_to_all: SETINFO output.voltage "113.0"
 459.282549	send_to_all: SETINFO ups.alarm "UPS under Battery Test Mode!"
 459.282580	send_to_all: SETINFO ups.status "ALARM OB DISCHRG"
 464.167063	smsBR_RecAnswer: Started
 464.282398	smsBR_RecAnswer: Finished
 464.282443	send_to_all: SETINFO output.voltage "111.0"
 464.282465	send_to_all: SETINFO ups.temperature "35.0"
 469.170223	smsBR_RecAnswer: Started
 469.285426	smsBR_RecAnswer: Finished
 469.285508	send_to_all: SETINFO output.voltage "107.0"
 469.285557	send_to_all: SETINFO battery.charge "76.0"
 469.285589	send_to_all: SETINFO ups.load "9.0"
 469.285620	send_to_all: SETINFO battery.runtime "3060"
 469.285652	send_to_all: DELINFO ups.alarm
 469.285703	send_to_all: SETINFO ups.status "OL"
 474.175170	smsBR_RecAnswer: Started
 474.290443	smsBR_RecAnswer: Finished
 474.290478	send_to_all: DATASTALE
 479.176141	smsBR_RecAnswer: Started
 479.291387	smsBR_RecAnswer: Finished
 479.291438	send_to_all: SETINFO battery.charge "87.0"
 479.291461	send_to_all: SETINFO ups.temperature "34.0"
 479.291476	send_to_all: SETINFO ups.load "8.0"
 479.291491	send_to_all: SETINFO battery.runtime "3960"
 479.291506	send_to_all: DATAOK

-------------- next part --------------
ISSUED cmd shutdown.return
 - OK: shutdown ups
 - OK: power up on AC voltage presence.
 - power up without power-on self test.
 - returns as OL, BYPASS.
 - bogus/wrong values at 319.101601-319.101923

 287.521507	instcmd: command [shutdown.return] handled
 289.080847	smsBR_RecAnswer: Started
 289.196576	smsBR_RecAnswer: Finished
 289.196645	send_to_all: SETINFO output.voltage "110.0"
 289.196699	send_to_all: SETINFO ups.load "17.0"
 289.196731	send_to_all: SETINFO battery.runtime "2100"
 289.196767	send_to_all: SETINFO ups.alarm "UPS under SHUTDOWN mode!"
 289.196798	send_to_all: SETINFO ups.status "ALARM OB DISCHRG"
 294.085840	smsBR_RecAnswer: Started
 296.087984	smsBR_RecAnswer: Exiting by timeout (2 seconds)
 296.088043	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
 296.088066	send_to_all: DATASTALE
 296.088127	send_to_one: PONG
 299.087368	smsBR_RecAnswer: Started
 301.087525	smsBR_RecAnswer: Exiting by timeout (2 seconds)
 301.087589	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
 304.090471	smsBR_RecAnswer: Started
 306.092596	smsBR_RecAnswer: Exiting by timeout (2 seconds)
 306.092658	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
 309.093541	smsBR_RecAnswer: Started
 311.085731	smsBR_RecAnswer: after 3 retries the number of bytes was insuficient. Waited >15: received: 1
 311.085792	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is not replying requests...
 314.096593	smsBR_RecAnswer: Started
 314.336963	smsBR_RecAnswer: after 3 retries the number of bytes was insuficient. Waited >15: received: 1
 314.337024	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is not replying requests...
 319.101469	smsBR_RecAnswer: Started
 319.101543	smsBR_RecAnswer: Finished
 319.101564	Communications with UPS re-established
 319.101601	send_to_all: SETINFO input.voltage "3892.0"
 319.101642	send_to_all: SETINFO input.frequency "0.2"
 319.101674	send_to_all: SETINFO output.voltage "3892.0"
 319.101703	send_to_all: SETINFO output.frequency "0.2"
 319.101733	send_to_all: SETINFO battery.charge "2252.8"
 319.101763	send_to_all: SETINFO ups.temperature "3072.0"
 319.101793	send_to_all: SETINFO ups.load "3891.2"
 319.101848	send_to_all: SETINFO battery.runtime "180"
 319.101888	send_to_all: SETINFO ups.alarm "UPS selftest failed! UPS under SHUTDOWN mode! UPS under Battery Test Mode!"
 319.101923	send_to_all: SETINFO ups.status "ALARM OL BOOST OVER FSD"
 319.101949	send_to_all: DATAOK
 324.106570	smsBR_RecAnswer: Started
 324.106641	smsBR_RecAnswer: Finished
 324.106665	send_to_all: DATASTALE
 329.111650	smsBR_RecAnswer: Started
 329.111723	smsBR_RecAnswer: Finished
 329.111760	send_to_all: SETINFO input.voltage "228.0"
 329.111800	send_to_all: SETINFO input.frequency "60.0"
 329.111830	send_to_all: SETINFO output.voltage "114.0"
 329.111859	send_to_all: SETINFO output.frequency "60.0"
 329.111888	send_to_all: SETINFO battery.charge "92.0"
 329.111915	send_to_all: SETINFO ups.temperature "35.0"
 329.111942	send_to_all: SETINFO ups.load "10.0"
 329.111992	send_to_all: SETINFO battery.runtime "3360"
 329.112031	send_to_all: DELINFO ups.alarm
 329.112059	send_to_all: SETINFO ups.status "OL BYPASS"
-------------- next part --------------
ISSUED cmd shutdown.reboot (ups powers[B off)
ISSUED cmd shutdown.stop

 - OK: after a few seconds, it powers up.
 - returns as OL,BYPASS.

2677.032464	instcmd: command [shutdown.stop] handled
2679.239243	send_to_one: PONG
2680.714296	smsBR_RecAnswer: Started
2680.829828	smsBR_RecAnswer: Finished
2680.829897	send_to_all: SETINFO input.voltage "228.0"
2685.719242	smsBR_RecAnswer: Started
2685.834859	smsBR_RecAnswer: Finished
2685.834929	send_to_all: SETINFO input.voltage "230.0"
2690.724324	smsBR_RecAnswer: Started
2690.839941	smsBR_RecAnswer: Finished
2690.840014	send_to_all: SETINFO output.voltage "115.0"
2695.729329	smsBR_RecAnswer: Started
2695.844934	smsBR_RecAnswer: Finished
2695.845018	send_to_all: SETINFO ups.load "6.0"
2695.845058	send_to_all: SETINFO battery.runtime "6120"
2700.731103	smsBR_RecAnswer: Started
2700.846939	smsBR_RecAnswer: Finished
2700.847014	send_to_all: SETINFO output.voltage "114.0"
2700.847066	send_to_all: SETINFO ups.load "10.0"
2700.847098	send_to_all: SETINFO battery.runtime "3660"
2705.736082	smsBR_RecAnswer: Started
2705.850942	smsBR_RecAnswer: Finished
2705.851025	send_to_all: SETINFO ups.load "12.0"
2705.851071	send_to_all: SETINFO battery.runtime "3060"
2710.741048	smsBR_RecAnswer: Started
2710.856951	smsBR_RecAnswer: Finished
2710.857035	send_to_all: SETINFO ups.load "14.0"
2710.857076	send_to_all: SETINFO battery.runtime "2580"
2715.746045	smsBR_RecAnswer: Started
2715.861871	smsBR_RecAnswer: Finished
2715.861941	send_to_all: SETINFO input.voltage "228.0"
2715.861988	send_to_all: SETINFO output.voltage "115.0"
2715.862027	send_to_all: SETINFO ups.load "16.0"
2715.862058	send_to_all: SETINFO battery.runtime "2280"
-------------- next part --------------
WRONG VALUES

 287.521507	instcmd: command [shutdown.return] handled
 289.080847	smsBR_RecAnswer: Started
 289.196576	smsBR_RecAnswer: Finished
 289.196645	send_to_all: SETINFO output.voltage "110.0"
 289.196699	send_to_all: SETINFO ups.load "17.0"
 289.196731	send_to_all: SETINFO battery.runtime "2100"
 289.196767	send_to_all: SETINFO ups.alarm "UPS under SHUTDOWN mode!"
 289.196798	send_to_all: SETINFO ups.status "ALARM OB DISCHRG"
 294.085840	smsBR_RecAnswer: Started
 296.087984	smsBR_RecAnswer: Exiting by timeout (2 seconds)
 296.088043	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
 296.088066	send_to_all: DATASTALE
 296.088127	send_to_one: PONG
 299.087368	smsBR_RecAnswer: Started
 301.087525	smsBR_RecAnswer: Exiting by timeout (2 seconds)
 301.087589	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
 304.090471	smsBR_RecAnswer: Started
 306.092596	smsBR_RecAnswer: Exiting by timeout (2 seconds)
 306.092658	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is returning by timeout...
 309.093541	smsBR_RecAnswer: Started
 311.085731	smsBR_RecAnswer: after 3 retries the number of bytes was insuficient. Waited >15: received: 1
 311.085792	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is not replying requests...
 314.096593	smsBR_RecAnswer: Started
 314.336963	smsBR_RecAnswer: after 3 retries the number of bytes was insuficient. Waited >15: received: 1
 314.337024	Communications with UPS lost: upsdrv_updateinfo: UPS at port /dev/ttyUSB0 is not replying requests...
 319.101469	smsBR_RecAnswer: Started
 319.101543	smsBR_RecAnswer: Finished
 319.101564	Communications with UPS re-established
 319.101601	send_to_all: SETINFO input.voltage "3892.0"
 319.101642	send_to_all: SETINFO input.frequency "0.2"
 319.101674	send_to_all: SETINFO output.voltage "3892.0"
 319.101703	send_to_all: SETINFO output.frequency "0.2"
 319.101733	send_to_all: SETINFO battery.charge "2252.8"
 319.101763	send_to_all: SETINFO ups.temperature "3072.0"
 319.101793	send_to_all: SETINFO ups.load "3891.2"
 319.101848	send_to_all: SETINFO battery.runtime "180"
 319.101888	send_to_all: SETINFO ups.alarm "UPS selftest failed! UPS under SHUTDOWN mode! UPS under Battery Test Mode!"
 319.101923	send_to_all: SETINFO ups.status "ALARM OL BOOST OVER FSD"
 319.101949	send_to_all: DATAOK
 324.106570	smsBR_RecAnswer: Started
 324.106641	smsBR_RecAnswer: Finished
 324.106665	send_to_all: DATASTALE
 329.111650	smsBR_RecAnswer: Started
 329.111723	smsBR_RecAnswer: Finished
 329.111760	send_to_all: SETINFO input.voltage "228.0"
 329.111800	send_to_all: SETINFO input.frequency "60.0"
 329.111830	send_to_all: SETINFO output.voltage "114.0"
 329.111859	send_to_all: SETINFO output.frequency "60.0"
 329.111888	send_to_all: SETINFO battery.charge "92.0"
 329.111915	send_to_all: SETINFO ups.temperature "35.0"
 329.111942	send_to_all: SETINFO ups.load "10.0"
 329.111992	send_to_all: SETINFO battery.runtime "3360"
 329.112031	send_to_all: DELINFO ups.alarm
 329.112059	send_to_all: SETINFO ups.status "OL BYPASS"


More information about the Nut-upsdev mailing list