I think in handle_get_descriptor(), vendorID and productID (and maybe some other things) need to have their endianness reversed.