On Fri, 30 May 2003, Chuan Guo wrote: >but when i want to getManufacturerString(..), i receive a Error: >//-----Exception--- >Exception in thread "main" javax.usb.UsbException: Strings not supported by >device > at com.ibm.jusb.UsbDeviceImp.getLangId(UsbDeviceImp.java:405) > at >com.ibm.jusb.UsbDeviceImp.requestUsbStringDescriptor(UsbDeviceImp.java:418) > at com.ibm.jusb.UsbDeviceImp.getUsbStringDescriptor(UsbDeviceImp.java:179) > at com.ibm.jusb.UsbDeviceImp.getString(UsbDeviceImp.java:193) > at com.ibm.jusb.UsbDeviceImp.getManufacturerString(UsbDeviceImp.java:102) > at chuan.test.TestArea.displayUsbDevice(TestArea.java:45) >//-----End of Exception--------
That Exception means that your device does not define any lang-ids, which means that the device does not have any string-descriptors. That's perfectly ok according to the USB spec, a device doesn't have to define any string descriptors. If you know that your device does define some string descriptors, then the Exception is a bug...what's happening is the request for the lang-id string descriptor (which is the string descriptor with index 0) is succeeding, but getting less than 4 bytes. The lang-id string descriptor needs to be at least 4 bytes: a type byte, length byte, and lang-id word (2 bytes). It can be longer, if more lang-ids are supported, but the first lang-id is the "default" for the device. If there isn't a default lang-id, then the device can't support string descriptors, as each string descriptor request needs a lang-id to get the string descriptor in the desired language. So unless you're sure your device defines string descriptors, don't worry about this, it's ok. In fact, it would be good to add a new exception for this case, a UsbStringsNotSupportedException...I'll add that. >ps: i have yet a problem: >i cannot run the SwingUsbView, receive alwalys: >//---Log------- >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x4C5408B4 >Function=(null)+0x4C5408B4 >Library=/usr/java/j2sdk1.4.1_02/jre/lib/i386/libawt.so > >NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. >Current Java thread: > at sun.java2d.loops.Blit.Blit(Native Method) > at sun.awt.X11PMBlitLoops$DelegateBlitLoop.Blit(X11PMBlitLoops.java:138) > at >sun.awt.image.AcceleratedOffScreenImage.copyBackupToAccelerated(AcceleratedO >ffScreenImage.java:174) > at >sun.awt.motif.X11OffScreenImage.copyBackupToAccelerated(X11OffScreenImage.ja >va:168) >..... >//----End of Log ---- >where is the Error? that's a Java bug. Try using a different Java version, like Blackdown's or IBM's, or a different SUN version. Maybe try using 1.3.X instead of 1.4.X... -- Dan Streetman [EMAIL PROTECTED] --------------------- 186,272 miles per second: It isn't just a good idea, it's the law! ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ javax-usb-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/javax-usb-devel