search for: get_belkin_reply

Displaying 2 results from an estimated 2 matches for "get_belkin_reply".

2010 Dec 01
1
Belkin Regulator Pro dropping connection and halting
I've a Belkin Regulator Pro (F6C1400-EUR) connected via serial to a FreeBSD machine using NUT v.2.4.3 Sometimes I get a series of logged messages saying that the data is switching between stale and valid, this in itself isn't an issue, however occasionally when the communication is re-established, upsmon gets a "On battery" message followed quickly by "Battery low"
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...t = command_sequence(&id_command, 1, answer); } Index: b/drivers/belkin.c =================================================================== --- a/drivers/belkin.c 2011-05-31 13:36:49.000000000 +0300 +++ b/drivers/belkin.c 2011-08-17 00:40:17.000000000 +0300 @@ -113,7 +113,7 @@ static int get_belkin_reply(char *buf) long cnt; char tmp[8]; - usleep(25000); + struct timespec delay = {0, 25e6}; nanosleep(&delay, NULL); /* pull first 7 bytes to get data length - like ~00D004 */ ret = ser_get_buf_len(upsfd, (unsigned char *)tmp, 7, 2, 0); @@ -160,7 +160,7 @@ static int do_broken_rat(char...