function getDeviceString(deviceHandle, index, callback) {
  ioctl_read(deviceHandle, 'standard', 6, 0x0300 | index, 0, 256,
      function(resultCode, data) {
        if (resultCode) {
          var e = new Error('Error getting string descriptor: ' + resultCode);
          e.code = resultCode;
          callback(null, e);
          return;
        }

        // bLength / bDescriptorType / bString*
        var chars = new Array(data.length - 2);
        for (var n = 0; n < chars.length; n++) {
          chars[n] = data[n + 2];
        }
        var str = String.fromCharCode.apply(null, chars);
        str = str.trim();
        callback(str, undefined);
      });
}
Gets a device descriptor string.
@param {!Object} deviceHandle Chrome device handle.
@param {number} index String index.
@param {!function(string|null, Error=)} callback Callback that receives a
    string and an error object if the get failed.