There are 2 bugs in 3.14.4's handling of serial ups's.
The first is in src/drivers/apcsmart/smart.c
UPSlinkCheck should have a write_unlock(ups) to match the write_lock(ups) it calls.
The second is in src/drivers/apcsmart/smartsetup.c
apcsmart_ups_setup() should drain the serial line before it tries to send/receive
data. I added:
for(;;) {
char answer[10];
*answer = 0;
getline(answer, sizeof(answer), ups);
if( *answer == 0 )
break;
}
just before the first write(ups->fd, &a,1 );
--
Roger Fujii <
rmf@...>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php_______________________________________________
Apcupsd-users mailing list
Apcupsd-users@...
https://lists.sourceforge.net/lists/listinfo/apcupsd-users