Install qmp-shell
pip3 install qmp.qmp
This should have added the qemu-shell
command to your shell.
You need to connect then to the qemu qmp socket. If you are starting the qemu vm yourself add this to your qemu launch command:
-chardev socket,id=char-qmp,path=PATH_TO_YOUR_QMP_SOCKET,server=on,wait=off -qmp chardev:char-qmp
If you are using lima/colima or other tools do:
ps -A | grep qmp
and pick the path of the qmp socket.
now connect to the socket using qmp-shell and hmp protocol:
qmp-shell -H PATH_TO_YOUR_QMP_SOCKET
then add a device:
device_add usb-host,vendorid=0x534d,productid=0x2109
Checkout the qemu docs for different ways of selecting a device.