Page 1 of 1

Using Wireless Printer from XP Guest

Posted: 30. Sep 2014, 08:22
by Rosie
Host O/S: Windows 8.1
Guest O/S: XP-SP3
Physical NIC: Realtek RTL8188CU Wireless LAN 802.11n USB 2.0 Network Adapter
IP of Host: Dynamic (192.168.2.xxx)
Router: Linksys WRT54GL
Printer: Canon MG6200 Wireless


The Host prints to the wireless printer no problem, but so far I have been unable to print to the same printer from the Guest.

I have tried sharing the printer from the Host, but I don't think that makes sense anyway, because the Host doesn't "own" the printer – there is no physical connection between them.

The Host sees the wireless printer as being on a WSD port with a great long mixed alphanumeric name.

The printer is configured to get an IP address from the router, and from the configuration menu of the printer itself I can get:
Printer name: 871BE4000000
IP address: 192.168.2.102, which is consistent with the rest of the small home workgroup.

From the Guest I can ping the router, another wired workgroup PC, and the printers IP. I have proven that IP is valid for the printer by alternately pinging it with the printer ON (reply received) and OFF (timed out).

But I can't figure out where to go from here, so any pointers most welcome. As far as I can see there is next to nothing in the User Guide about printers, so I guess I must be missing something that should be blatantly obvious.

Thanks
- Rosie

Re: Using Wireless Printer from XP Guest

Posted: 30. Sep 2014, 13:35
by mpack
A VirtualBox VM doesn't have the option of a virtual wireless NIC. You would have to add an actual NIC in the form of a wireless dongle - or just print to PDF and save a tree! (or have the host print the PDF).

Re: Using Wireless Printer from XP Guest

Posted: 30. Sep 2014, 14:58
by Perryg
The network printer works by IP address and it really doesn't matter if it is wireless or wired. If the guest is in the same network segment it will print. For this you would need to be using Bridged mode in the guests network recipe.

Re: Using Wireless Printer from XP Guest

Posted: 30. Sep 2014, 15:26
by mpack
Really? That's easier than I expected. Maybe I should enable the wireless interface on my printer at home! :)

Re: Using Wireless Printer from XP Guest

Posted: 30. Sep 2014, 17:32
by socratis
Please let us know if it works, for future reference. I think that it should work as Perryg suggested, but it would be good to know for sure.

Re: Using Wireless Printer from XP Guest

Posted: 1. Oct 2014, 04:40
by Rosie
After a bit of trial and error… SUCCESS!

My Settings --> Network config for Adapter 1 is as follows:

Enable Network Adapter: CHECKED
Attached to: Bridged Adapter
Name: Realtek RTL8188CU Wireless LAN 802.11n USB 2.0 Network Adapter
(that's the real NIC in the Host and the system prompted me with that)
Adapter Type: PCnet-FAST III (Am79C973)
Promiscuous Mode: Allow All
MAC Address: This was provided by the system.
Cable Connected: CHECKED


Here is my layman's (womans?) explanation of how I got it to work...

Although the Host has no physical connection to the printer, it does know about the printer and how to connect to it, and it has the printer installed as the default. Since the Guest can't connect wirelessly it has to have some way of finding the printer, and as far as I can see the only way it can do that is by reference to the Host. So it seems that it was after all necessary to Share the printer installation on the Host. I gave it the name of MG6250.

From there on it was pretty straightforward. After getting caught out on one attempt due to "can't find drivers" I downloaded the Drivers Setup file from the Canon website, executed it within the Guest, and kicked off again with 'Add a Printer' in the 'Printers and Faxes' dialog. At the appropriate point in that process I allowed it to scan for a printer and to my great delight it found the shared MG6250.

Finally I held my breath while it printed a test page, and all was good.

Thank you very much for the pointers which set me on the right track.

- Rosie

Re: Using Wireless Printer from XP Guest

Posted: 1. Oct 2014, 08:27
by socratis
I'm glad that you got it working.
But, the bigger question was if it can be done wirelessly. The way that I think it should work is; if you have your VM setup with Bridged mode, then the following should happen (in theory):

Host  --> NIC --> WiFi Gateway --> Printer
Guest -----^

Since the VM shows up as another machine on the network, it should work out-of-the-box. That's I think what Perryg meant as well and mpack was willing to try.

Re: Using Wireless Printer from XP Guest

Posted: 1. Oct 2014, 09:18
by Rosie
socratis wrote:But, the bigger question was if it can be done wirelessly. The way that I think it should work is; if you have your VM setup with Bridged mode, then the following should happen (in theory):

Host  --> NIC --> WiFi Gateway --> Printer
Guest -----^

Since the VM shows up as another machine on the network, it should work out-of-the-box. That's I think what Perryg meant as well and mpack was willing to try.
Well this is all new to me, but if someone wants to explain exactly what to do I'm quite willing to try it.

Re: Using Wireless Printer from XP Guest

Posted: 1. Oct 2014, 11:42
by mpack
It should be simple in theory: the printer would just be another device on the network. If the VM is part of the same network, i.e. by bridging to whatever host NIC leads to that network, then the VM should be able to talk to the printer.

Unfortunately if the host is using wireless then that would mean bridging to a wireless NIC, which can sometimes be tricky.

Re: Using Wireless Printer from XP Guest

Posted: 1. Oct 2014, 13:23
by socratis
Rosie wrote:if someone wants to explain exactly what to do I'm quite willing to try it.
Well, I'll use a typical Bridged example in the 192.168.1.xxx with dynamic addresses given in the 192.168.1.100 - 192.168.1.254. Your IP addresses and/or setup might differ.
WiFi Router  : 192.168.1.1
Your host    : 192.168.1.100
Your printer : 192.168.1.101
Your VM      : 192.168.1.102
Then see if you can ping the router and printer from your host and your VM. That is the most important one and the one that VirtualBox cares. That's what mpack means by 'tricky'. There are some combinations of adapters and routers that work. Some that don't. You have to try it to see if it works. For example, with the same notebook and same VMs, at my office it doesn't work, at my home it does. Unfortunately, it is not a problem with VirtualBox. It's with the WiFi specification.

If successful, then take a look at the tutorial from Microsoft on how to add a TCP/IP printer.

Re: Using Wireless Printer from XP Guest

Posted: 2. Oct 2014, 08:56
by Rosie
socratis wrote:Well, I'll use a typical Bridged example in the 192.168.1.xxx with dynamic addresses given in the 192.168.1.100 - 192.168.1.254. Your IP addresses and/or setup might differ.
WiFi Router  : 192.168.1.1
Your host    : 192.168.1.100
Your printer : 192.168.1.101
Your VM      : 192.168.1.102
Then see if you can ping the router and printer from your host and your VM. That is the most important one and the one that VirtualBox cares. That's what mpack means by 'tricky'. There are some combinations of adapters and routers that work. Some that don't. You have to try it to see if it works. For example, with the same notebook and same VMs, at my office it doesn't work, at my home it does. Unfortunately, it is not a problem with VirtualBox. It's with the WiFi specification.

If successful, then take a look at the tutorial from Microsoft on how to add a TCP/IP printer.
I had already confirmed ping capability. I could ping both and printer and router from both Host and Guest. The part I wasn't aware of was how to add a TCP/IP printer. After following those instructions I can confirm that printing to a wireless printer from within the Guest works fine.

However the process was simplified for me by the fact that I had already installed the printer in the Guest the way I previously described. Thus the necessary printer files and drivers were already known to the Guest and so I was able to "use existing printer drivers" or whatever it says. Before settling for that I had located the Canon INF files on the HDD and tried pointing the printer installation process to them. Wasn't accepted. The Canon drivers installation is a .exe file so I couldn't point to where I had previously downloaded that. For me anyway things were considerably simplified by having previously installed the printer software, so anyone trying this might want to keep that in mind.

Again, thanks for the help. The next thing I have to tackle is getting direct access to a USB port from the Guest, but that's a story for another post.

Many thanks.

- Rosie

Re: Using Wireless Printer from XP Guest

Posted: 2. Oct 2014, 10:14
by socratis
Rosie,

Thank you very much for going through the exercise and confirming that it works! It's one thing to have a theoretical model and another to actually have "experimental" data.

As for getting direct access to a USB port, take a look at viewtopic.php?f=2&t=63907#p300319
But if you have any questions, as you said, that would be another topic, so that we don't pollute this one.

Again, thanks for your efforts.