Displaying 2 results from an estimated 2 matches for "buflen_fix".
2020 Apr 03
0
Patch to support Powercool PCRACK-1200VA
...support this UPS the
"langid_fix" parameter is also needed, to force avoidance of calls to
usb_get_string_simple()
The UPS is working with this patch plus following entry in ups.conf
[POWERCOOL]
driver = nutdrv_qx
port = auto
protocol=megatec
langid_fix=0x409
buflen_fix=102
desc = "POWERCOOL"
Patch is below, I hope it is of assistance.
Regards,
Ian
diff --git a/drivers/nutdrv_qx.c b/drivers/nutdrv_qx.c
index bb526608..75bb97f8 100644
--- a/drivers/nutdrv_qx.c
+++ b/drivers/nutdrv_qx.c
@@ -422,6 +422,7 @@ static USBDevice_t usbdevice;...
2020 Apr 03
0
Powercool PCRACK-1200VA patch update
...ing() that is implemented in
libusb.c
This was necessary in order to make the bufflen_fix available in
libusb.c where usb_get_string() is called in libusb_open()
This wrapper function mops up and hides all the work concerned with
handling of langid and bufflen.
The static vars langid_fix and buflen_fix are accordingly moved to libusb.c
regards,
Ian
diff --git a/drivers/libusb.c b/drivers/libusb.c
index 0eb054a7..42f1b93f 100644
--- a/drivers/libusb.c
+++ b/drivers/libusb.c
@@ -36,6 +36,7 @@
#define USB_DRIVER_NAME "USB communication driver"
#define USB_DRIVER_VERSION ...