<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 21 nov 2022 alle ore 08:44 韩雪峰 <<a href="mailto:hanxuefeng@360.cn">hanxuefeng@360.cn</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7338333656256773154">
<div lang="ZH-CN">
<div class="m_7338333656256773154WordSection1">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:等线" lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:等线" lang="EN-US">Thanks for your reply. But If I want to support multiple channels for USB redirection when multiple clients connect to a same VM, do you know which project includes the code about
USB channels ? Spice ? or QEMU?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:等线" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks and Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:等线" lang="EN-US">Xuefeng<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:等线;color:rgb(31,73,125)" lang="EN-US"><u></u></span></p></div></div></div></blockquote><div><br></div><div>Channels are a SPICE thing. But you will find surprisingly few code in SPICE (at least the server). The reason is that SPICE in this case mostly forwards data from/to usbredir (which is another project). In details Qemu uses usbredir to handle a USB device for the guest. This device is attached to spice-server which handles SPICE channels. A spice client (like spice-gtk) connects to SPICE USB channels and forward data from either a physical device or an emulated device (currently spice-gtk handles an emulated CD/DVD device).</div><div>Currently each SPICE USB channel is bound to a single Qemu device (I doubt it makes sense to bind it to multiple devices but it could in theory not be bound to a device).</div><div>Note that spice-server currently only forward data (presented like a pipe/stream) to/from client to the device, the hard lifting is made by Qemu/usbredir.<br></div><div><br></div><div>Frediano<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7338333656256773154"><div lang="ZH-CN"><div class="m_7338333656256773154WordSection1"><p class="MsoNormal"><span style="font-size:10.5pt;font-family:等线;color:rgb(31,73,125)" lang="EN-US"> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:等线">发件人<span lang="EN-US">:</span></span></b><span style="font-size:11pt;font-family:等线" lang="EN-US"> Frediano Ziglio <<a href="mailto:freddy77@gmail.com" target="_blank">freddy77@gmail.com</a>>
<br>
</span><b><span style="font-size:11pt;font-family:等线">发送时间<span lang="EN-US">:</span></span></b><span style="font-size:11pt;font-family:等线" lang="EN-US"> 2022</span><span style="font-size:11pt;font-family:等线">年<span lang="EN-US">11</span>月<span lang="EN-US">18</span>日<span lang="EN-US">
20:52<br>
</span><b>收件人<span lang="EN-US">:</span></b><span lang="EN-US"> </span>韩雪峰<span lang="EN-US"> <<a href="mailto:hanxuefeng@360.cn" target="_blank">hanxuefeng@360.cn</a>><br>
</span><b>抄送<span lang="EN-US">:</span></b><span lang="EN-US"> <a href="mailto:spice-devel@lists.freedesktop.org" target="_blank">spice-devel@lists.freedesktop.org</a><br>
</span><b>主题<span lang="EN-US">:</span></b><span lang="EN-US"> Re: [Spice-devel] The second client cannot redirect USB<u></u><u></u></span></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Il giorno ven 18 nov 2022 alle ore 10:21 </span>
韩雪峰<span lang="EN-US"> <<a href="mailto:hanxuefeng@360.cn" target="_blank">hanxuefeng@360.cn</a>> ha scritto:<u></u><u></u></span></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> When I used two client to connect to a same one VM by spice with setting
</span>“<span lang="EN-US">SPICE_DEBUG_ALLOW_MC=1</span>”<span lang="EN-US">, the two clients worked, and the first client could redirect USB. However, the second client could not redirect USB device, It shows like the picture:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><img style="width: 4.9479in; height: 2.6145in;" id="m_7338333656256773154m_4874315976305516369图片_x0020_1" src="cid:1849a2e634a4cff311" width="475" height="251" border="0"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I</span>’<span lang="EN-US">m sure that there</span>’<span lang="EN-US">re enough channels for USB redirection.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Is this a problem? Or Is there any way that could resolve the second client</span>’<span lang="EN-US">s USB redirection problem?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks and Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Xuefeng<u></u><u></u></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Currently all character device channels (including USB one) do not support multiple channels, so the first client takes them all.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Frediano <u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div></blockquote></div></div>