question: public byte [ ] readEEPROM ( DeviceHandle handle , short offset , int length ) throws IllegalArgumentException { if ( offset + length > 256 ) { throw new IllegalArgumentException ( "cannot read more than 256 " + "bytes from EEPROM - requested to read to byte [" + ( offset + length ) + "]" ) ; } byte [ ] data = new byte [ length ] ; ByteBuffer buffer = ByteBuffer . allocateDirect ( 1 ) ; try { writeRegister ( handle , Block . I2C , EEPROM_ADDRESS , ( byte ) offset , 1 ) ; } catch ( LibUsbException e ) { mLog . error ( "usb error while attempting to set read address to " + "EEPROM register, prior to reading the EEPROM device " + "descriptor" , e ) ; } for ( int x = 0 ; x < length ; x ++ ) { try { read ( handle , EEPROM_ADDRESS , Block . I2C , buffer ) ; data [ x ] = buffer . get ( ) ; buffer . rewind ( ) ; } catch ( Exception e ) { mLog . error ( "error while reading eeprom byte [" + x + "/" + length + "] aborting eeprom read and returning partially " + "filled descriptor byte array" , e ) ; x = length ; } } return data ; }
target:  Returns contents of the 256-byte EEPROM.  The contents are as follows: 256-byte EEPROM (in hex): 00/01 - 2832 Signature 03/02 - 0BDA Vendor ID 05/04 - 2832 Product ID 06 - A5 (has serial id?) 07 - 16 (bit field - bit 0 = remote wakeup, bit 1 = IR enabled 08 - 02 or 12 10/09 0310 ETX(0x03) plus label length (includes length and ETX bytes) 12/11 First UTF-16 character 14/13 Second UTF-16 character ... Label 1: vendor Label 2: product Label 3: serial Label 4,5 ... (user defined)