Page 2 of 3

Re: USB Problems

Posted: 8. May 2009, 15:09
by hank_se
Thankyou markcynt for the response!

Do you have an HP Laserjet USB-connected on your system? If so I'm interrested to hear from you how that works with this solution, both in the guest and host system! Or maybe someone else could response on that.

Re: USB Problems

Posted: 8. May 2009, 15:51
by markcynt
No I have a Samsung printer, which I don't plan on using in VirtualBox. I can try to set it up if you like. I mainly needed USB enabled for my GPS. When my wife gets home from work I'm going to try it out.

Re: USB Problems

Posted: 8. May 2009, 16:24
by Sasquatch
hank_se wrote:Thankyou markcynt for the response!

Do you have an HP Laserjet USB-connected on your system? If so I'm interrested to hear from you how that works with this solution, both in the guest and host system! Or maybe someone else could response on that.
There are lots of posts here concerning USB printers and VB. Please search for them. Some have a printer working, while others have issues with a different one. It depends on the printer itself. Sharing it over the network is usually better.

Re: USB Problems

Posted: 8. May 2009, 17:55
by hank_se
Sasquatch wrote:
There are lots of posts here concerning USB printers and VB. Please search for them. Some have a printer working, while others have issues with a different one. It depends on the printer itself. Sharing it over the network is usually better.

Well I have a special reason to get feedback from openSUSE users with a USB laserjet, as the laserjets problems in VB 2.1.2 seems to have initiated the move of 60-vboxdrv.rules to 10-vboxdrv.rules in VB 2.1.4, something that caused a lot of confusion for openSUSE users. It's all here in this ticket:

http://www.virtualbox.org/ticket/3143

So I'm interested to know if my suggested 11-vboxdrv.rules will work with the laserjets.

You might also wonder why I'm not content with the various solutions using fstabs options and mounting them, well read this ticket:

http://www.virtualbox.org/ticket/3041

Here's an excerpt from it:
andyc: /proc/bus/usb is deprecated, and most people have already got rid of it. If VBox finds it mounted, it uses legacy code to handle USB. We do this to avoid breaking existing working setups. Otherwise we use newer, alternative code.
Something really worth to consider!

This isn't unique for VirtualBox, any fast developing software will have problems syncing manuals, howtos and FAQ's with the actual state of the software.

Re: USB Problems

Posted: 8. May 2009, 19:11
by markcynt
Well, setting up my printer was very easy. I just added the printer to VB and Windows picked it up as new hardware, installed the drivers for me, and it works fine. It is a laser USB printer, however, it's not an HP. It's a basic monochrome printer. Samsung ML-2510.

Re: USB Problems

Posted: 8. May 2009, 21:33
by markcynt
I figured I'd break it down for anyone that might be reading this thread.

I edited /etc/fstab like this:

In konsole

Code: Select all

kdesu kwrite /etc/fstab
Enter password, press enter

Then edit the USB entry to look like this. 1000 is my vbox group id.

Code: Select all

none                /sys/bus/usb/drivers  usbfs    devgid=1000,devmode=664 0 0
Save and close the editor.

Then I created the "/etc/udev/rules.d/11-vboxdrv.rules" file like this.

In konsole

Code: Select all

kdesu kwrite /etc/udev/rules.d/11-vboxdrv.rules
Enter password, press enter

Add this into the editor

Code: Select all

KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0664"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="VirtualBox/$env{BUSNUM}/$env{DEVNUM}", GROUP="vboxusers", MODE="0664"
Save and close the editor. I don't know if you need to reboot but I did.

Hope this helps someone. Cheers! :D

Re: USB Problems

Posted: 8. May 2009, 22:33
by hank_se
markcynt

Actually you don't need to modify fstab at all for this to work, the default fstab as installed by openSUSE will do, that's one of the points of my method!

Re: USB Problems

Posted: 8. May 2009, 22:39
by markcynt
Okay, I was wondering about that. Even easier! Thanks

Re: USB Problems

Posted: 8. May 2009, 23:15
by rolo
Hello I have an Acer Aspire running Ubuntu netbook remix 9.04 with a Win Xp SP3 guest. Installation went great, Win Xp has internet access through NAT/Bridge. However USB is a different story, as others have posted the devices are listed on the VB menu, but are grayed out. I have confirmed that USB is activated as is USB 2, and filters for the devices. (only item not filled out is port, does this need to be added?). I have attached various usb devices, usb stick, cell phone, with no success, and have even attached them before restarting the VM.

My question is this: does the procedure to modify fstab/11-vboxdrv.rules apply to a Host running Ubuntu 9.04 or only Opensolaris?

I have read other post that suggested that modifications to permissions (chmod) on various VBOX files would solve the problem as well, can anyone recommend the proper procedure to get USB up and running?

Re: USB Problems

Posted: 9. May 2009, 00:07
by hank_se
As for my openSUSE system port isn't needed to be filled in.
As for Ubuntu 9.04 I dont have it, but do give it a try, not much can happen, if it doesn't work just delete the file.
In any case I would be interested to hear about the result!

Re: USB Problems

Posted: 9. May 2009, 02:31
by rolo
hank_se I tried your procedure for /11-vboxdrv.rules exactly as you have it written with no success, the usb devices are still grayed out without the option to activate them. I have read the thread, should i leave /10-vboxdrv.rules and place /11-vboxdrv.rules in the folder as well or just one of them, does this make the difference?

Are there any other steps I'm missing?

Re: USB Problems

Posted: 9. May 2009, 04:16
by markcynt
rolo wrote:hank_se I tried your procedure for /11-vboxdrv.rules exactly as you have it written with no success, the usb devices are still grayed out without the option to activate them. I have read the thread, should i leave /10-vboxdrv.rules and place /11-vboxdrv.rules in the folder as well or just one of them, does this make the difference?

Are there any other steps I'm missing?
Do you have the right version of VB installed? You need to have the one from the VirtualBox download site, not the one from Synaptic.

Re: USB Problems

Posted: 9. May 2009, 12:37
by markcynt
There is a simple way to get USB working in VB with Ubuntu 9.04 as the host.

Go to System>Administration>Users and Groups> Click on your user account, then Unlock>Properties> then click on the User Privileges tab> then scroll down to Use VirtualBox and place a checkmark in the box>Reboot (Don't logoff, a reboot is needed).

I found this here ( http://ubuntuforums.org/showthread.php? ... ualbox+usb ) but modified it slightly to make the instructions clearer. The OP in that thread said to click on the highlighted item but root was highlighted when I went there.

I just used this method and it was very easy.

Re: USB Problems

Posted: 9. May 2009, 13:59
by hank_se
Markcynt.
I just installed Ubuntu 9.04, and yes properly setup theres no need for any additional udev-rules.
The reason Ubuntu works without mods is found in the file /lib/udev/rules.d/50-udev-default.rules, in openSUSE USB is set up like this:
# libusb device nodes
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
Ubuntu sets it up this way:
# libusb device nodes
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664"
Only difference is the value for MODE.
Unfortuanatly it's not a good idea to edit this file, as it might be overwritten by an update and your changes willl be lost.
But you might keep an eye on it in the future, once openSUSE changes it you can remove 11-vboxdrv.rules.

Re: USB Problems

Posted: 9. May 2009, 19:49
by rolo
Hank_se and Mark thanks for the help, usb is now working on Ubuntu netbook (host) with win xp (guest). I took your advice and removed the fstab modifications and just used the changes to the user permissions, which does work. Should I remove the changes to 11-vboxdrv.rules that you originally recommended, is it still required?

Well now on to the next step of the Win xp setup, I need to figure out how to get PPP working for Dial-up. The project is to have my ubuntu netbook connect to my blackberry through usb, and have the BB act as a modem. Ubuntu doesn't recognize the BB so I installed Win Xp under VB. Now that I have usb, I have proceeded to setup dial up so Win Xp will connect thru usb thru VB to the BB and then get on the net. Main problem right now, is that only SLIP connection works for DUN thru VB, PPP doesn't thru USB. Anyone manage to get this to work?