search for: execute_and_retrieve_query

Displaying 4 results from an estimated 4 matches for "execute_and_retrieve_query".

2007 May 13
0
No subject
...t; usb_dev_handle *upsdev = NULL; int query_ups (unsigned char *reply) { unsigned char buf[4]; int ret; /* * This packet is a status request to the UPS */ buf[0]=0x01; buf[1]=0x00; buf[2]=0x00; buf[3]=0x30; return execute_and_retrieve_query(buf, reply); } int execute_and_retrieve_query(unsigned char *query, unsigned char *reply) { int ret; ret = usb_control_msg(upsdev, STATUS_REQUESTTYPE, REQUEST_VALUE, MESSAGE_VALUE, INDEX_VALUE, query, sizeof(query), 1000); if (ret < 0) { ret...
2007 May 13
0
No subject
..._usb.h" usb_dev_handle *upsdev = NULL; int query_ups (unsigned char *reply) { unsigned char buf[4]; int ret; /* * This packet is a status request to the UPS */ buf[0]=0x01; buf[1]=0x00; buf[2]=0x00; buf[3]=0x30; return execute_and_retrieve_query(buf, reply); } int execute_and_retrieve_query(unsigned char *query, unsigned char *reply) { int ret; ret = usb_control_msg(upsdev, STATUS_REQUESTTYPE, REQUEST_VALUE, MESSAGE_VALUE, INDEX_VALUE, query, sizeof(query), 1000); if (ret < 0) { return r...
2007 May 13
0
No subject
..._usb.h" usb_dev_handle *upsdev = NULL; int query_ups (unsigned char *reply) { unsigned char buf[4]; int ret; /* * This packet is a status request to the UPS */ buf[0]=0x01; buf[1]=0x00; buf[2]=0x00; buf[3]=0x30; return execute_and_retrieve_query(buf, reply); } int execute_and_retrieve_query(unsigned char *query, unsigned char *reply) { int ret; ret = usb_control_msg(upsdev, STATUS_REQUESTTYPE, REQUEST_VALUE, MESSAGE_VALUE, INDEX_VALUE, query, sizeof(query), 1000); if (ret < 0) { return r...
2007 Nov 20
2
Mustek Powermust 600VA
Hi, I'm having a hard time configuring a Mustek Powermust 600VA ups to work via USB with nut. I read somewhere that nut works OK via the rs232 cable, but unfortunately I don't have a COM port in my computer. The kernel detects the ups as an Xbox pad :) and loads the xpad module. I tried running /lib/nut/megatec with different /dev/ttySx but it displays megatec protocol UPS was not