USB With QUEMU
Moderators: Cat_7, Ronald P. Regensburg
-
- Student Driver
- Posts: 13
- Joined: Sun Jul 16, 2017 8:57 am
USB With QUEMU
Dear all,
I want USB support in my OS 9.2 where i got Archicad 6.5 on installed. This USB is a dongle with the license on it for archicad. i have found this command line on the forum:
-device usb-mouse -device usb-host,vendorid=0x04b9,productid=0x0300
Does this work for my situation, how can i find the vendorid and productid?
hope someone can help me out.
Gr.
I want USB support in my OS 9.2 where i got Archicad 6.5 on installed. This USB is a dongle with the license on it for archicad. i have found this command line on the forum:
-device usb-mouse -device usb-host,vendorid=0x04b9,productid=0x0300
Does this work for my situation, how can i find the vendorid and productid?
hope someone can help me out.
Gr.
- adespoton
- Forum All-Star
- Posts: 4227
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: USB With QUEMU
What is your host OS? Under OS X, you can open the System Information app, click on USB, and select the device when it's plugged in, and those details will be provided. Under Windows, you need to go to the device management plugin, I believe. Under Linux, I think it's in /dev/usb/
Re: USB With QUEMU
You can use the device manager in Windows and roughly follow the steps described here:
https://support.shippingeasy.com/hc/en- ... tegration-
(click to open the windows 7 guidelines)
Best,
cat_7
https://support.shippingeasy.com/hc/en- ... tegration-
(click to open the windows 7 guidelines)
Best,
cat_7
-
- Student Driver
- Posts: 13
- Joined: Sun Jul 16, 2017 8:57 am
Re: USB With QUEMU
i am emulating OS9.2 host os is windows 10
-
- Student Driver
- Posts: 13
- Joined: Sun Jul 16, 2017 8:57 am
Re: USB With QUEMU
(1) You told QEMU to execute a kernel for the wrong machine type, and it crashed on startup (eg trying to run a raspberry pi kernel on a versatilepb QEMU machine)
(2) You didn't give QEMU a kernel or BIOS filename at all, and QEMU executed a ROM full of no-op instructions until it fell off the end
(3) Your guest kernel has a bug and crashed by jumping off into nowhere
This is almost always one of the first two, so check your command line and that you are using the right type of kernel for this machine.
If you think option (3) is likely then you can try debugging your guest with the -d debug options; in particular -d guest_errors will cause the log to include a dump of the guest register state at this point.
Execution cannot continue; stopping here.
tryed using the id's and archicad created a different error then usual, so i think it worked. But i gues that this dongle can't be installed on this version of os9.2. resulting in the error above?
(2) You didn't give QEMU a kernel or BIOS filename at all, and QEMU executed a ROM full of no-op instructions until it fell off the end
(3) Your guest kernel has a bug and crashed by jumping off into nowhere
This is almost always one of the first two, so check your command line and that you are using the right type of kernel for this machine.
If you think option (3) is likely then you can try debugging your guest with the -d debug options; in particular -d guest_errors will cause the log to include a dump of the guest register state at this point.
Execution cannot continue; stopping here.
tryed using the id's and archicad created a different error then usual, so i think it worked. But i gues that this dongle can't be installed on this version of os9.2. resulting in the error above?
Re: USB With QUEMU
I know that, and I gave you a link to a generic method of finding the vendor/dev id's of a usb device in windows. Windows 10 doesn't differ much from Windows 7 in finding the information:
insert your usb stick, find it in the device manager (apparaatbeheer if you windows version is in Dutch, as I assume), and follow the appropriate steps in that guide.
Best,
Cat_7
insert your usb stick, find it in the device manager (apparaatbeheer if you windows version is in Dutch, as I assume), and follow the appropriate steps in that guide.
Best,
Cat_7
Re: USB With QUEMU
You cannot use just some values for vendor/device. You need to find the correct data to pass through to Qemu and Mac OS 9.2
-
- Student Driver
- Posts: 13
- Joined: Sun Jul 16, 2017 8:57 am
Re: USB With QUEMU
i think i found the VID and PID of the usb. underneath is the code i used.
-device usb-host,vendorid=0x064F,productid=0x0BD7
Now it doesn't crash and archicad still says it can't find the hardware key.
Is it possible to acces the USB in OS 9.2 like i did in windows 10 trough a mac version of device manager?
i have my windows 10 on english.
-device usb-host,vendorid=0x064F,productid=0x0BD7
Now it doesn't crash and archicad still says it can't find the hardware key.
Is it possible to acces the USB in OS 9.2 like i did in windows 10 trough a mac version of device manager?
i have my windows 10 on english.
Re: USB With QUEMU
Does the usb device show up in the system profiler in Mac OS 9.2?
Best,
Cat_7
Best,
Cat_7
Re: USB With QUEMU
I tried usb passthough with a simple 2Gb USB stick and couldn´t get it to work in Windows. The documentation says it only works on Linux as host. I tried that, but also failed. If passthrough doesn´t work, you're out of luck with both SheepShaver and Qemu.
Best,
Cat_7
Best,
Cat_7
- adespoton
- Forum All-Star
- Posts: 4227
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: USB With QUEMU
Hmm... I wonder how passthrough works in the VirtualBox code; it could be there's something there that could be forward-ported to modern qemu. If they're doing it all on the virtualization side though, it's probably not going to be of much help.
-
- Student Driver
- Posts: 13
- Joined: Sun Jul 16, 2017 8:57 am
Re: USB With QUEMU
thank you all for helping, i will keep looking and trying but we also bought a powermac g4 so we can run the required software on a real pc.
again thank you all for the effort put into helping me!
again thank you all for the effort put into helping me!
-
- Mac Mechanic
- Posts: 178
- Joined: Sun Feb 07, 2016 4:40 pm
Re: USB With QUEMU
USB passthrough works on OS X, but you have to compile QEMU with it's dependancies for USB support, lsusb or something. I've done it before, it works fine.
Re: USB With QUEMU
Yeah, I presume that's libusb. I see support for Windows is now available too: http://libusb.info/. Normally if the headers/libraries are in the right place then it should automatically get detected by QEMU's configure script.darthnvader wrote:USB passthrough works on OS X, but you have to compile QEMU with it's dependancies for USB support, lsusb or something. I've done it before, it works fine.
Re: USB With QUEMU
All builds provided here are compiled with libusb and usbredirect support.
But it seems mounting some standard (non-driver) devices require additional rights on the host, which OSX doesn't provide:
https://github.com/libusb/libusb/wiki/F ... the_device
Best,
Cat_7
But it seems mounting some standard (non-driver) devices require additional rights on the host, which OSX doesn't provide:
https://github.com/libusb/libusb/wiki/F ... the_device
How can I run libusb applications under Mac OS X if there is already a kernel extension installed for the device?
If there is no existing kernel extension installed for the device, libusb will run out of the box, you do not even need to have root privilege and there is no need to set up udev rules like Linux. However, if there is an existing kernel extension installed for the device, then it is more troublesome. There are ways to get libusb working and they all require some interventions as root.
1) You can use kextunload to unload the kernel extension. You need to run the command as root. Take note this may not be possible for drivers like USB HID since it may be used by other USB HID device. Take note that the kextunload command will lose its effect in the next boot.
Best,
Cat_7
- adespoton
- Forum All-Star
- Posts: 4227
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: USB With QUEMU
That seems to imply that you should be able to pass dongles through for example by listing loaded usb drivers before/after inserting the device, diffing the results, and then kextunloading the kext for the dongle.
VirtualBox allows for automatic capture that unloads the USB device from the host -- seems like we should also be able to use that method here...?
VirtualBox allows for automatic capture that unloads the USB device from the host -- seems like we should also be able to use that method here...?
-
- Mac Mechanic
- Posts: 178
- Joined: Sun Feb 07, 2016 4:40 pm
Re: USB With QUEMU
Yes, that was it, libusb.mcayland wrote:Yeah, I presume that's libusb. I see support for Windows is now available too: http://libusb.info/. Normally if the headers/libraries are in the right place then it should automatically get detected by QEMU's configure script.darthnvader wrote:USB passthrough works on OS X, but you have to compile QEMU with it's dependancies for USB support, lsusb or something. I've done it before, it works fine.
Re: USB With QUEMU
Hi guys, I’m running Mac OS 9.2 on QEMU 3.0.0 downloaded from Homebrew. I’m on macOS 10.14 Mojave. I need to pass through a USB scanner to the guest machine. How Can I do?
Re: USB With QUEMU
Qemu needs to be compiled with libusb support. I don't know about the brew version, but the version you can download from this site has that enabled.
Next, you need to find the vendor and product IDs. You can find them through the system info application in OSX after you plugged in the scanner.
You need to use -device usb-host in your command line like this:
-device usb-host,vendorid=0x064F,productid=0x0BD7 (adjust to the ids you found)
You can then see if the system profiler in 9.2 shows the scanner.
This still does not guarantee that it will work in OSX host. See my message above in this thread about OSX support.
Best,
Cat_7
Next, you need to find the vendor and product IDs. You can find them through the system info application in OSX after you plugged in the scanner.
You need to use -device usb-host in your command line like this:
-device usb-host,vendorid=0x064F,productid=0x0BD7 (adjust to the ids you found)
You can then see if the system profiler in 9.2 shows the scanner.
This still does not guarantee that it will work in OSX host. See my message above in this thread about OSX support.
Best,
Cat_7
Re: USB With QUEMU
Thank you. I’ll try.
Do you know if there is a way to check if my QEMU installation was made with or without libusb support?
Also I don’t know if I’m using Qemu correctly, I simply have made a copy paste of the qemu-system-ppc file in a folder with the hdd image and the .command file. (Instead the folder I downloaded from here was full of stuff, folder, files).
Checking the brew formula it shows that `libsub` is a dependency, so it should mean that the Homebrew version is build with libusb support.
https://formulae.brew.sh/formula/qemu
UPDATE:
I downloaded the fresh new build from here. QEMU 3.1 and it works like a charm!
On Mac OS 9.2 it recognize the Scanner. It’s great. But it blocked when I tried to scan.
Now I’m testing using Mac OS X Tiger. Always with this build.
Q: In my .command file I wrote `-usb -device usb-host, etc.` is it correct? Or I have to omit the `-usb` option?
II UPDATE:
I’m getting this in the Terminal Window while using the Scanner software:
Do you know if there is a way to check if my QEMU installation was made with or without libusb support?
Also I don’t know if I’m using Qemu correctly, I simply have made a copy paste of the qemu-system-ppc file in a folder with the hdd image and the .command file. (Instead the folder I downloaded from here was full of stuff, folder, files).
Checking the brew formula it shows that `libsub` is a dependency, so it should mean that the Homebrew version is build with libusb support.
https://formulae.brew.sh/formula/qemu
UPDATE:
I downloaded the fresh new build from here. QEMU 3.1 and it works like a charm!
On Mac OS 9.2 it recognize the Scanner. It’s great. But it blocked when I tried to scan.
Now I’m testing using Mac OS X Tiger. Always with this build.
Q: In my .command file I wrote `-usb -device usb-host, etc.` is it correct? Or I have to omit the `-usb` option?
II UPDATE:
I’m getting this in the Terminal Window while using the Scanner software:
Code: Select all
libusb: warning [darwin_transfer_status] transfer error: device not responding (value = 0xe00002ed)
libusb: warning [darwin_release_interface] USBInterfaceClose: no connection to an IOService
libusb: warning [darwin_close] USBDeviceClose: no connection to an IOService
libusb: warning [darwin_transfer_status] transfer error: timed out
libusb: warning [darwin_transfer_status] transfer error: timed out
Last edited by mePy2 on Wed Dec 26, 2018 1:25 pm, edited 2 times in total.
Re: USB With QUEMU
Another question...
1. Is it possible, and if yes, how, to connect a disk/image to QEMU while it is running. Using the compact monitor? Like a pendrive. connect it, use it, remove it.
1. Is it possible, and if yes, how, to connect a disk/image to QEMU while it is running. Using the compact monitor? Like a pendrive. connect it, use it, remove it.
Re: USB With QUEMU
about -usb: it creates an additional usb bus.
I have no idea whether/how many Mac OS 9.2 can handle, and whether you would need to tell qemu which bus to use.
And as said above, if (in your case) the scanner is recognised by a driver in OSX, it might be that the OSX host cannot release the device for use in Mac OS 9.2.
best,
Cat_7
I have no idea whether/how many Mac OS 9.2 can handle, and whether you would need to tell qemu which bus to use.
And as said above, if (in your case) the scanner is recognised by a driver in OSX, it might be that the OSX host cannot release the device for use in Mac OS 9.2.
best,
Cat_7
- adespoton
- Forum All-Star
- Posts: 4227
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: USB With QUEMU
That said, if you can figure out which driver is being used with the device in OS X (for example, suing lsof), you can manually tear down the driver and then QEMU should be able to grab the device.
I seem to recall problems with some USB hubs and Mac OS 9.2; I'd recommend attempting without -usb at first and only adding it if you need to.
I seem to recall problems with some USB hubs and Mac OS 9.2; I'd recommend attempting without -usb at first and only adding it if you need to.
Re: USB With QUEMU
Hi adespoton, do you have a solution for the darwin problem about the driver?
I had a similar problem using libusb with sane-backends (scanimage). “libusb: warning [darwin_open] USBDeviceOpen: another process has device opened for exclusive access”
I think it could be the same problem. Also QEMU usb uses libusb.
Have a nice day and a happy new year,
mePy2
I had a similar problem using libusb with sane-backends (scanimage). “libusb: warning [darwin_open] USBDeviceOpen: another process has device opened for exclusive access”
I think it could be the same problem. Also QEMU usb uses libusb.
Have a nice day and a happy new year,
mePy2
Last edited by mePy2 on Mon Dec 31, 2018 1:16 pm, edited 1 time in total.
Re: USB With QUEMU
About the USB problem...
Just to recap:
It works. (I removed the -usb option remaining only the -device option with vendor and product ids). The Scanner appears in System Profiler and it is recognized by the HP Software.
When I try to actually do a scan, everything freezes! Not only the HP Software but also Mac OS! When I unplug the USB from the Mac, all is freed again. Only the scanner itself remains unusable (I have to unplug the power supply).
So I was wondering if there is some kind of debug to know what happen during this phase.
I have a Parallels Desktop Lite Ubuntu VM and the Scanner works with Simple Scan, so it’s a software problem; I mean, the Scanner works.
Just to recap:
It works. (I removed the -usb option remaining only the -device option with vendor and product ids). The Scanner appears in System Profiler and it is recognized by the HP Software.
When I try to actually do a scan, everything freezes! Not only the HP Software but also Mac OS! When I unplug the USB from the Mac, all is freed again. Only the scanner itself remains unusable (I have to unplug the power supply).
So I was wondering if there is some kind of debug to know what happen during this phase.
I have a Parallels Desktop Lite Ubuntu VM and the Scanner works with Simple Scan, so it’s a software problem; I mean, the Scanner works.