|
|
|
@ -27,13 +27,14 @@
|
|
|
|
|
|
|
|
|
|
#include "backend_common.h"
|
|
|
|
|
|
|
|
|
|
#define BACKEND_VERSION "0.33"
|
|
|
|
|
#define BACKEND_VERSION "0.34"
|
|
|
|
|
#ifndef URI_PREFIX
|
|
|
|
|
#error "Must Define URI_PREFIX"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if !defined(LIBUSBX_API_VERSION) && !defined(LIBUSB_API_VERSION)
|
|
|
|
|
#error "We need libusb >= 1.0.13!"
|
|
|
|
|
#define OLDLIBUSB_WORKAROUND
|
|
|
|
|
#warning "We HIGHLY recommend using libusb >= 1.0.13!"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Support Functions */
|
|
|
|
@ -232,7 +233,13 @@ static int print_scan_output(struct libusb_device *device,
|
|
|
|
|
uint8_t port_num;
|
|
|
|
|
|
|
|
|
|
bus_num = libusb_get_bus_number(device);
|
|
|
|
|
#ifdef OLDLIBUSB_WORKAROUND
|
|
|
|
|
WARNING("**** THIS PRINTER DOES NOT EXPORT A SERIAL NUMBER AND YOU ARE USING LIBUSB < 1.0.13\n");
|
|
|
|
|
WARNING("**** We cannot identify individual printers of this type without a newer version of libusb!\n");
|
|
|
|
|
port_num = 255;
|
|
|
|
|
#else
|
|
|
|
|
port_num = libusb_get_port_number(device);
|
|
|
|
|
#endif
|
|
|
|
|
sprintf((char*)serial, "NONE_B%03d_D%03d", bus_num, port_num);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|