Displaying 16 results from an estimated 16 matches for "ser_get_buf_len".
2015 Sep 09
3
APC BACK UPS 2200 model BZ2200BI-BR (New output
...tput:
/usr/local/libexec/nut/solis -a lobos -u root -D -D -D
Network UPS Tools - APC/Microsol Solis UPS driver 0.64 (2.7.3.1)
0.000000 debug level is '3'
0.001843 getbaseinfo: sending CMD_UPSCONT and ENDCHAR to sync
1.330248 getbaseinfo: received 25 bytes from ser_get_buf_len()
1.330283 CommReceive: RecPack: (25 bytes) => bb 47 88 ad 1b 0a
a0 18 02 30 14 10 0b 1.330298 00 00 00 01 00 09 a1 49 5e 5e 25 fe
Detected Solis 1.0 on /dev/cuaU0
UPS Date 1999/10/09
System Date 2015/09/09 day of week Wed
UPS internal Time 16:20:48
Shutdown programming not activate...
2015 Aug 26
5
APC BACK UPS 2200 model BZ2200BI-BR (update)
Turns out another user reported the same issue with a slightly different model: https://github.com/networkupstools/nut/issues/231 <https://github.com/networkupstools/nut/issues/231>
The "stty -f /dev/cuaU0 raw" trick should help, but I am confused as to why FreeBSD has different "raw" settings than what is set up at the same time as the baud rate:
2015 Aug 23
2
APC BACK UPS 2200 model BZ2200BI-BR (update)
...ar.gz:
[~]>/usr/local/libexec/nut/solis -a lobos -u root -D -D -D
Network UPS Tools - Microsol Solis UPS driver 0.63 (2.7.3.1)
0.000000 debug level is '3'
0.001946 getbaseinfo: sending CMD_UPSCONT and ENDCHAR to sync
0.002111 getbaseinfo: requesting 25 bytes from ser_get_buf_len()
0.963327 getbaseinfo: received 25 bytes from ser_get_buf_len()
0.963360 CommReceive: RecPack: (25 bytes) => 00 17 91 49 5e 5e
bc fe bb 46 88 ac 1b
0.963375 0a a0 ed 01 07 07 bb 46 82 ae 1b 09
0.963387 getbaseinfo: requesting 25 bytes from ser_get_buf_len()
2.04...
2015 Aug 20
6
APC BACK UPS 2200 model BZ2200BI-BR
Hi;
I'm having some trouble to comunicate with my just bought (08/17/15)
Ups. According to SOLIS(8):
SUPPORTED HARDWARE
This driver has been tested with :
Solis 1000 VA
Solis 1500 VA
Solis 2000 VA
Solis 3000 VA
Back-UPS BZ1200-BR
Back-UPS BZ2200BI-BR
So solis is the one to go for.
Here is my scenario:
SW: nut-2.7.3 (compiled from ports)
OS: FreeBSD
2005 Nov 08
0
gcc4 noise
...ups.c: In function upsdrv_updateinfo:
everups.c:96: warning: pointer targets in passing argument 2 of ser_get_char differ in signedness
everups.c:103: warning: pointer targets in passing argument 2 of ser_get_char differ in signedness
everups.c:113: warning: pointer targets in passing argument 2 of ser_get_buf_len differ in signedness
gcc -I../include -O -Wall -Wsign-compare -c -o powercom.o powercom.c
powercom.c: In function upsdrv_updateinfo:
powercom.c:233: warning: pointer targets in passing argument 2 of ser_get_buf_len differ in signedness
gcc -I../include -O -Wall -Wsign-compare -c -o cyberpower.o...
2005 Dec 19
1
tripplitesu driver fix
...OnLine SU2200XL and
possibly other SmartOnLine UPSes.
Here is a one-line fix.
Lee
--- ../nut-2.0.2/drivers/tripplitesu.c Thu Jan 27 08:33:21 2005
+++ drivers/tripplitesu.c Sat Oct 1 13:38:51 2005
@@ -227,7 +227,7 @@
buffer[4] = '\0';
if (!strcmp(buffer, "~00D")) {
- if (ser_get_buf_len(upsfd, buffer, 4, 3, 0) <= 0)
+ if (ser_get_buf_len(upsfd, buffer, 3, 3, 0) <= 0)
return -1;
buffer[3] = '\0';
count = atoi(buffer);
2008 Oct 30
1
Adding debugging information in serial.c
In order to improve the diagnostics for serial connected devices, I
would like to add the possibility to differentiate between errors and
timeouts.
For the ser_get_char() and ser_get_buf_len() we might do this by
changing the return value. For the first, return value -1 would be an
error, 0 a timeout and 1 success. The latter could return -1 on error,
between 0 and (buflen-1) for a timeout and buflen for success.
Unfortunately, the ser_get_line_alert() and ser_get_line() functi...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...++ 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 *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...
2008 Oct 27
5
Cyberpower/powerpanel error: Data stale
All,
I have a Cyberpower UPS that I have been working with for about a
year. I have used NUT in the past with good results, but as of late have
been seeing issues with nut talking to the UPS. I will start with the
information on the server that is running NUT, and has the UPS
connected VIA an RS232 cable.
O/S : Fedora 9
Kernal (uname -a): Linux haruhi 2.6.26.5-45.fc9.x86_64 #1 SMP Sat
2008 Oct 27
5
Cyberpower/powerpanel error: Data stale
All,
I have a Cyberpower UPS that I have been working with for about a
year. I have used NUT in the past with good results, but as of late have
been seeing issues with nut talking to the UPS. I will start with the
information on the server that is running NUT, and has the UPS
connected VIA an RS232 cable.
O/S : Fedora 9
Kernal (uname -a): Linux haruhi 2.6.26.5-45.fc9.x86_64 #1 SMP Sat
2008 Feb 08
0
[nut-commits] svn commit r1285 - in trunk: . common include
...gt; no longer requires casting to an unsigned char.
>
> Modified:
> trunk/ChangeLog
> trunk/common/common.c
> trunk/include/common.h
>
> Modified: trunk/ChangeLog
I would like to do something similar to the following ser_* functions:
ser_send_buf
ser_send_buf_pace
ser_get_buf_len
ser_get_line_alert
ser_get_line
Many drivers currently 'suffer' from compiler signedness warnings. We
could do away with these by typecasting everything to the 'correct' type,
but I think this is unwanted (and sometimes even counter productive).
There is not much point in making...
2011 Oct 13
0
1) A memory leak in drivers/rhino.c 2) Wunused-but-set-variable.patch
...time_t *tmt;
- struct tm *now;
- tmt = ( time_t * ) malloc( sizeof( time_t ) );
- time( tmt );
- now = localtime( tmt );
- /* int hours, mins; hours = now->tm_hour; mins = now->tm_min; */
-
temp[0] = 0; /* flush temp buffer */
tam = ser_get_buf_len(upsfd, temp, pacsize, 3, 0);
2) nut-upsdev/2011-October/005608.html
--------------------------------------
The patch from above might not apply cleanly. The reason is that I
first applied the patch from nut-upsdev/2011-October/005608.html.
That patch deals with another issue I see...
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
0
patch: Fix [-Wunused-but-set-variable]
...tmt = ( time_t * ) malloc( sizeof( time_t ) );
time( tmt );
now = localtime( tmt );
- hours = now->tm_hour;
- mins = now->tm_min;
+ /* int hours, mins; hours = now->tm_hour; mins = now->tm_min; */
temp[0] = 0; /* flush temp buffer */
tam = ser_get_buf_len(upsfd, temp, pacsize, 3, 0);
2005 Dec 19
0
new(er) SEC driver.
...iled to read next char */
upsdebugx(SEC_LOG_LOWLEVEL, " FAILED to receive type char");
return -2;
}
r = -2;
switch (*buf) {
case SEC_DATAMSG:
upsdebugx(SEC_LOG_LOWLEVEL, " got a %c!", SEC_DATAMSG);
/* data being returned - get the length */
if ((r=ser_get_buf_len(fd, buf, 3, 1, 0)) < 3) {
upsdebugx(SEC_LOG_LOWLEVEL, " OOPS only %d of 3 chars read (%c)",r,*buf);
return -2;
}
*(buf+3) = '\0';
p = buf;
l = strtol(buf, &p, 10);
if ((p == buf) || (*p != '\0')) { /* invalid number */
upsdebugx(SEC_LO...
2008 Dec 24
1
Driver removal notification: al175
Hi Kirill,
just to notify you that your al175 driver is being removed from the
NUT tree, as of 2.4.0-pre1.
if you wish to see it entering the tree again, please contact the
Development mailing list to talk about it.
Merry Christmas and happy New Year.
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops
Network UPS Tools (NUT) Project Leader -