Hi,
I encounter a wierd problem when testing my cell-phone via usb-redirect.
Test environment:Client OS: win7-32bitVM OS: win7-32bit
Tool-chain:zadig-2.1 (use libusbk)usbredir-0.7spice-gtk-0.27 (use
gtk-2.0)virt-viewer-0.6 (use gtk-2.0)
Test device:IPhone 5sGoogle Nexus 3
Problem:It seems that almost all USB device can be redirected successfully
included cellphone. However, when my IPhoneappeared in the VM OS, I can double
click the phone icon, see its storage card. Then, I clicked 'Trust' button on
my phone. Then, the whole window of remote-viewer is stuck, and cannot be
closed normally( one way to close it is kill the process from task manager).The
same problem can be reproduced on Android phone, take my Nexus 3 as an example.
The phone screen is locked with pattern lock before redirect, and unlock it
after redirect. Then, remote-viewer is stuck.
Accidentally, I found a way to fix the bug. I add a printf in the beginning of
usbredir_handle_msg() function, as below:static void
usbredir_handle_msg(SpiceChannel *c, SpiceMsgIn *in){ SpiceUsbredirChannel
*channel = SPICE_USBREDIR_CHANNEL(c); SpiceUsbredirChannelPrivate *priv =
channel->priv; device_error_data data; int r, size; uint8_t *buf;
g_return_if_fail(priv->host != NULL);
/* No recursion allowed! */ g_return_if_fail(priv->read_buf == NULL);
buf = spice_msg_in_raw(in, &size); priv->read_buf = buf;
priv->read_buf_size = size;
printf("msg\n");
r = usbredirhost_read_guest_data(priv->host);
I don't know why it works. And I try to use sleep(0) to instead, it doesn't
work. Then, use sleep(1), it works, but decreased the performance of handling
usb message.
Br,Dean _______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel