0

I'm trying to read a Wacom tablet thanks to libusb. The program runs well on Ubuntu, but it is not reading the data on Raspbian.

The device is recognized by the OS (lsusb -v) and also by my program, but the function "libusb_interrupt_transfer" (from libusb) does not read any information.

The return of the function is =0, (no error), but no data to read.

Here is a resume of the code...

const int VENDOR = 1386; // Vendor: 1386(decimal)==056a(hex) == "Wacom"
const int PEN_PRODUCT_ID = 184; //   idProduct   0x00b8 Intuos4 4x6
const int PEN_INTERFACE = 0;
const int PEN_ENDPOINT_ADDRESS = 0x81;
const int PEN_TIMEOUT = 5; // In milliseconds
const int PEN_EXPECTED_PACKET_SIZE = 10; // In bytes

(Some loop here)

if (usbdevice->idProduct == PEN_PRODUCT_ID) {
    puts("Found pen device");
    penDevice = usbdevice;
    penDevice->open();
    usbdevice = NULL;
}

(another loop here)

libusb_interrupt_transfer(penDevice->deviceHandle, PEN_ENDPOINT_ADDRESS, data_pen, ARRAY_SIZE, & bytesRead_pen, PEN_TIMEOUT);
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Pavel glv
  • 1
  • 1

1 Answers1

0

Did you try to increase the value of the PEN_TIMEOUT variable? A value higher than 50 ms might work.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131