1

I'm trying to read the serial number of a device using javax usb library, and I'm getting this error :

[javax.usb.UsbPlatformException: USB error 8: Unable to get string descriptor languages: Overflow]

The line is simply :

 device.getUsbStringDescriptor(descript.iManufacturer());

Someone already had this error ?

Thanks,

pcs
  • 1,864
  • 4
  • 25
  • 49
Romain
  • 151
  • 1
  • 12
  • 1
    This could be a bug in the library. Did you try with some other device (maybe your mouse, or webcam)? I suspect you are on a windows machine - did you check in the hardware info if the device was correctly detected and read? It should show the serial number too. If on Linux, you can check with `lsusb`. – jcoppens May 11 '15 at 04:50
  • Actually I found out what the problem was, my devices are HID and javax requires a Libusb driver to properly work with... – Romain May 11 '15 at 11:11
  • 1
    Great - I'd suggest posting your find as a reply to your question, so the question gets marked as having a reply. It makes it easier for others... – jcoppens May 11 '15 at 13:55
  • @Romain Could you post your solution so others (me) could see it. Specifiably which driver did you add? – cliff2310 Apr 06 '16 at 22:42
  • I'm using hid4java https://github.com/gary-rowe/hid4java because you cannot use javax with HID devices – Romain Apr 07 '16 at 09:08

1 Answers1

0

I had this error because I hadn't the right driver on a CDC device. With the Zadig application http://zadig.akeo.ie/ I could install the WINUSB driver on my device. And this worked fine on a Microchip Demo Board.

Yet the exception remained on my own prototype board. The VUSB connection was not correct.This works fine correctly now in the power-off mode (i.e. the power is not provided by the USB)

frva
  • 76
  • 1
  • 5