[Nut-upsdev] driver for IVT SCD solar controller ?
Rainer Fuegenstein
rfu at kaneda.iguw.tuwien.ac.at
Thu Jul 30 19:26:41 UTC 2009
AdK> Please fix the permissions problem first, either by running this as
AdK> root (should be OK for the time being) or by allowing whatever user
AdK> this is running as permission to the /var/state/ups directory. I would
AdK> really like to know what happens if you keep this running for a while.
OK, now running as root.
1st execution:
[root at test drivers]# ./ivtscd -DDDD -a ivtscd
Network UPS Tools - IVT Solar Controller driver 0.01 (2.4.1-1891)
Warning: This is an experimental driver.
Some features may not function correctly.
0.000000 debug level is '4'
0.002857 send: F
0.388363 read:
0.388853 \_: (42 bytes) => 00 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b
0.389507 31 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
0.390166 Parsed -1 parameters from reply
0.390670 IVT Solar Controller not detected
2nd execution:
- if it is started more than a minute after the previous execution,
the same error as above occurs.
- if it is executed immediately again, it looks like this:
[root at test drivers]# ./ivtscd -DDDD -a ivtscd
Network UPS Tools - IVT Solar Controller driver 0.01 (2.4.1-1891)
Warning: This is an experimental driver.
Some features may not function correctly.
0.000000 debug level is '4'
0.002797 send: F
0.365275 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
0.365819 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
0.366526 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
0.367082 Parsed 7 parameters from reply
2.367926 send: F
2.741239 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
2.741332 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
2.741397 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
2.741488 Parsed 7 parameters from reply
2.742385 dstate_init: sock /var/state/ups/ivtscd-ivtscd open on fd 5
2.742564 send: F
2.749231 read:
2.749745 \_: (1 bytes) => 0a
3.750200 read: timeout
4.742273 send: F
5.112240 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
5.112335 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
5.112400 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
5.112491 Parsed 7 parameters from reply
6.742273 send: F
7.108242 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
7.108338 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
7.108402 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
7.108493 Parsed 7 parameters from reply
8.742275 send: F
9.148244 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
9.148341 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
9.148405 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
9.148497 Parsed 7 parameters from reply
10.742274 send: F
11.128247 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
11.128341 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
11.128406 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
11.128496 Parsed 7 parameters from reply
12.742275 send: F
13.125245 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
13.125338 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
13.125402 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
13.125495 Parsed 7 parameters from reply
14.742274 send: F
15.092242 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
15.092338 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
15.092403 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
15.092495 Parsed 7 parameters from reply
16.742273 send: F
17.129239 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
17.129333 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
17.129398 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
17.129488 Parsed 7 parameters from reply
18.742274 send: F
19.106247 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
19.106345 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
19.106409 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
19.106500 Parsed 7 parameters from reply
20.742273 send: F
21.103241 read: R:12,12;- 3,8;17;12,01;12,62;- 6,3; 0,1;
21.103335 \_: (41 bytes) => 52 3a 31 32 2c 31 32 3b 2d 20 33 2c 38 3b 31 37 3b 31
21.103399 32 2c 30 31 3b 31 32 2c 36 32 3b 2d 20 36 2c 33 3b 20 30 2c 31 3b 0a
21.103490 Parsed 7 parameters from reply
^C 21.912826 Signal 2: exiting
[root at test drivers]#
AdK> It could be that we're beating the SCD to death by doing a query twice
AdK> right after another. This should be resolved once the driver has
AdK> started up and it polls once every 2 seconds.
yes, it looks better now, except for first null byte in the first run.
(it's running for five minutes now and shows reasonable data).
AdK> I added a small delay to
AdK> prevent this. It could also be that it is echoing the '\n' we send in
AdK> the 'F' command. Maybe this isn't needed?
in minicom just press F without enter and the result comes
immediately, so there is no cr/lf required after the F.
AdK> You're sure this isn't some kind of ground loop?
yes, that's also my suspicion:
- when the power cord of the test PC is unplugged, load drops from -3.8 to -2.0
- when the network cable is also unplugged, load drops from -2.0 to -0.3
(that's a bit low for an atom N270 + 80GB HD on idle, but could be
reasonable)
AdK> If this is a mains
AdK> connected PC, double check the protective earth.
I connected the PC to a different socket in a different room, but got
the same result.
AdK> It wouldn't be the
AdK> first time that a device goes berserk because it can't handle the 50
AdK> Hz current that is flowing in the green/yellow wire connection. Try
AdK> connecting a laptop (no wall adapter attached) to rule this out.
unfortunately, none of my (working) laptops has a serial port anymore.
I'll need to read into this ground loop problem ...
tn & cu
------------------------------------------------------------------------------
Unix gives you just enough rope to hang yourself -- and then a couple of more
feet, just to be sure.
(Eric Allman)
------------------------------------------------------------------------------
More information about the Nut-upsdev
mailing list