You are not logged in.

#1 2014-01-12 10:14:13

xvedejas
Member
Registered: 2008-11-19
Posts: 18

USB RFID reader with Qemu

I'm trying to use a USB omnikey RFID reader:

$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 8087:07dc Intel Corp. 
Bus 003 Device 008: ID 076b:532a OmniKey AG 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I need to access it in a virtual machine (Qemu). Both host and guest are running archlinux. Here is the command I use to start qemu.

sudo qemu-system-x86_64 -hda rfid.img -usbdevice host:076b:532a -m 1024

Running lsusb on the guest only returns the following:

Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

It looks to me like maybe the guest can only see USB v1.1 devices? I don't know how to fix this.

Offline

#2 2014-01-12 13:09:03

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: USB RFID reader with Qemu

http://www.linux-kvm.org/page/USB wrote:

To be able to use USB at all, you need to start qemu with a USB controller. If you use the legacy -usb and -usbdevice options, you will automatically get a piix3-usb-uhci for PCs unless you specify something else. The new method works like this:

qemu-system-x86_64 -device piix3-usb-uhci

Use the qemu monitor to hot-add the device or use the proper additional options for your device

Offline

#3 2014-01-12 16:59:38

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: USB RFID reader with Qemu

You have to check which group the usb rfid reader gets assigned to. You might have to write an udev rule to change the group to kvm(1) so that you can access the reader as you normal unprivileged user.

(1) This assumes you added your user to the kvm group if you make use of kvm.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB