Displaying 4 results from an estimated 4 matches for "powpan_status".
2016 Jan 19
5
Patching CyberPower UPS drivers
...I have it working (I really only changed powerp-txt.c) but still have a couple questions... Charles said I should mention them here to talk to anyone interest but specifically Arjen (one of the original authors of the driver)
Soooo...
Here I am. ;)
Where should we start?
Essentially, I rewrote powpan_status so it better tolerates strings of different lengths (although I only have the 1 UPS right now, so I can't test against another and different string lengths)
I had to make the serial read much longer so it grabs 55bytes instead of the original short list.
> 9.843588 read: (55 bytes) =...
2016 Jan 28
0
Patching CyberPower UPS drivers
On Jan 19, 2016, at 9:37 AM, Ben Kamen <ben at benkamen.net> wrote:
>
> Hey there,
>
> I got a new UPS (CyberPower PR1500LCDRTXL2Ua) and found the serial drivers don't quite work...
[...]
> Essentially, I rewrote powpan_status so it better tolerates strings of different lengths (although I only have the 1 UPS right now, so I can't test against another and different string lengths)
>
> I had to make the serial read much longer so it grabs 55bytes instead of the original short list.
>
>> 9.843588...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...tic int powpan_command(const char *bu
upsdebug_hex(3, "send", buf, bufsize);
- usleep(100000);
+ struct timespec delay = {0, 100e6}; nanosleep(&delay, NULL);
ret = ser_get_buf_len(upsfd, powpan_answer, bufsize-1, SER_WAIT_SEC, SER_WAIT_USEC);
@@ -427,7 +427,7 @@ static int powpan_status(status_t *statu
upsdebug_hex(3, "send", "D\r", 2);
- usleep(200000);
+ struct timespec delay = {0, 200e6}; nanosleep(&delay, NULL);
ret = ser_get_buf_len(upsfd, status, sizeof(*status), SER_WAIT_SEC, SER_WAIT_USEC);
@@ -576,7 +576,7 @@ static int powpan_initups(v...
2016 Jan 18
4
NUT support for CyberPower PR1500LCDRTXL2Ua
Hey all,
I ended up picking up the module listed in Subject line.
I switched over my config but apparently not all going smoothly.
My config is:
[office]
driver = powerpanel
port = /dev/ttyS0
desc = "Office UPS"
When I test the driver running power-panel as a test, I get:
> [root at cornelius init.d]# powerpanel -a office -D -D -D -D
>