Parallel port... again...
-
- Posts: 16
- Joined: 8. Jan 2012, 23:43
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: Windows, RHEL, SuSE
Parallel port... again...
I know this has been hashed around, but has there been any news about virtualizing the LPT (parallel) port under Linux? I'd like to attach my eprom programmer (stop laughing) to a Windows guest under Fedora... indications are on the Windows host side that there may be some test code, however, none under Linux.
Thanks!
Thanks!
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Parallel port... again...
They are testing it now and if all goes right it should be included in version 4.2.*
-
- Posts: 16
- Joined: 8. Jan 2012, 23:43
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: Windows, RHEL, SuSE
Re: Parallel port... again...
Wow, great!!! Thanks so much! If they're looking for testers, pls let me know off-list.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Parallel port... again...
It has been available in Linux for a while (depending on your version). You just need to manually turn it on in the guests settings file. It more than likely will not survive a reboot though. Meaning you would need to edit it before you start the guest every time.
Or try
Make a backup of your guests control file first!
Or try
Code: Select all
VBoxManage modifyvm <uuid|name>
[--lpt<1-N> on|<I/O base> <IRQ>]
[--lptmode<1-N> <devicename>]
-
- Posts: 16
- Joined: 8. Jan 2012, 23:43
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: Windows, RHEL, SuSE
Re: Parallel port... again...
Thanks, Perry! I'll give that one a shot.
-
- Posts: 16
- Joined: 8. Jan 2012, 23:43
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: Windows, RHEL, SuSE
Re: Parallel port... again...
4.1.12 r77245 doesn't seem to have the lpt code in it at all. Will wait for 4.2.
Re: Parallel port... again...
The code for Linux host was in for a LONG time, and hasn't been modified much except the somewhat more recent adding of bidirectional printer port support (which isn't really tested, due to the lack of suitable hardware in today's PCs), there is just no official way to set it up in any version up to 4.1. One needs to manually hack the VM config (at your own risk, it's relatively obvious though), which should only be done when all VBox related processes are terminated and you double checked that there is no VBoxSVC process running for the current user.
The only reason why we decided to make it easier to enable is that in the current development version there is also host parallel port passthrough support for Windows, with a rather similar level of testing. Since we now cover the most widespread platforms it deserves an official way to configure it.
If you want to test drive things on Linux only you should be able to do this with any recent 4.1 version...
The only reason why we decided to make it easier to enable is that in the current development version there is also host parallel port passthrough support for Windows, with a rather similar level of testing. Since we now cover the most widespread platforms it deserves an official way to configure it.
If you want to test drive things on Linux only you should be able to do this with any recent 4.1 version...
-
- Posts: 16
- Joined: 8. Jan 2012, 23:43
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: Windows, RHEL, SuSE
Re: Parallel port... again...
I would love to test on Linux, but VBoxManage doesn't seem to recognize the option.
--------------------------------------------------------------
user@host:~> VBoxManage -v
4.1.12r77245
user@host:~> VBoxManage modifyvm 6bf6d8ab-126e-4211-9399-d8510ea83f20 --lpt1 on
Oracle VM VirtualBox Command Line Management Interface Version 4.1.12
(C) 2005-2012 Oracle Corporation
All rights reserved.
Usage:
VBoxManage modifyvm <uuid|name>
[--name <name>]
[--ostype <ostype>]
<... snip ...>
VBoxManage: error: Unknown option: --lpt1
-------------------------------------------------------------------------------------
Do I have the syntax wrong? Using the VM name vs. the GUID doesn't seem to make a difference, and I've tried other combinations of options; they all come back "unrecognized"...
Thanks!
--------------------------------------------------------------
user@host:~> VBoxManage -v
4.1.12r77245
user@host:~> VBoxManage modifyvm 6bf6d8ab-126e-4211-9399-d8510ea83f20 --lpt1 on
Oracle VM VirtualBox Command Line Management Interface Version 4.1.12
(C) 2005-2012 Oracle Corporation
All rights reserved.
Usage:
VBoxManage modifyvm <uuid|name>
[--name <name>]
[--ostype <ostype>]
<... snip ...>
VBoxManage: error: Unknown option: --lpt1
-------------------------------------------------------------------------------------
Do I have the syntax wrong? Using the VM name vs. the GUID doesn't seem to make a difference, and I've tried other combinations of options; they all come back "unrecognized"...
Thanks!
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Parallel port... again...
You need to edit the guests control file. Look for the entries below and change the enable bit to true. (only works with Linux hosts)
Code: Select all
<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="4"/>
<Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
</LPT>
-
- Posts: 16
- Joined: 8. Jan 2012, 23:43
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: Windows, RHEL, SuSE
Re: Parallel port... again...
That did the trick! Thanks a million... off to test the port operations.
-
- Posts: 16
- Joined: 8. Jan 2012, 23:43
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: Windows, RHEL, SuSE
Re: Parallel port... again...
Spoke too soon; after modifying the vbox file as above, starting the VM emits:
"Failed to open a session for the virtual machine Windows XP.
Parallel device 0 cannot attach to host driver (VERR_CFGM_VALUE_NOT_FOUND).
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Console
Interface: IConsole {1968b7d3-e3bf-4ceb-99e0-cb7c913317bb}"
Similar message for a Linux guest. This box is hosted on a Fedora 16 host...
"Failed to open a session for the virtual machine Windows XP.
Parallel device 0 cannot attach to host driver (VERR_CFGM_VALUE_NOT_FOUND).
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Console
Interface: IConsole {1968b7d3-e3bf-4ceb-99e0-cb7c913317bb}"
Similar message for a Linux guest. This box is hosted on a Fedora 16 host...
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Parallel port... again...
ISTM there ought to be a host port assignment in there. E.g. on Windows hosts you might map it to "LPT1", I don't know what naming Linux hosts use.
Here's what the UART assignment is on one of the (Windows host) VMs.
Note the last two fields. I think there ought to be something similar in the LPT line, particularly a path to a host device. However searching has not turned up precise details, and I'm not in a mood to search source code right now.
Here is a link to previous discussion of the xml syntax, but I don't see that it was ever settled.
Here's what the UART assignment is on one of the (Windows host) VMs.
Code: Select all
<Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" path="COM1:" hostMode="HostDevice"/>
Here is a link to previous discussion of the xml syntax, but I don't see that it was ever settled.
-
- Posts: 16
- Joined: 8. Jan 2012, 23:43
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: Windows, RHEL, SuSE
Re: Parallel port... again...
I see where you're going, but I thought the additions to the config file would cover that, though:
<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="4"/>
<Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
</LPT>
There's the LPT port (LPT1), the I/O port, and the IRQ line - I'd think they'd get passed on through as virtual HW for the guest to pick up. Perhaps the current error is more related to VB not actually being able to match up the LPT port to an emulation driver?
<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="4"/>
<Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
</LPT>
There's the LPT port (LPT1), the I/O port, and the IRQ line - I'd think they'd get passed on through as virtual HW for the guest to pick up. Perhaps the current error is more related to VB not actually being able to match up the LPT port to an emulation driver?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Parallel port... again...
Nope. The IRQ crap is for the emulation which the guest will see. Look again at the UART line I showed you. It has all that crap too (exactly) - but it also has a couple of host assignment fields.
-
- Posts: 16
- Joined: 8. Jan 2012, 23:43
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: Windows, RHEL, SuSE
Re: Parallel port... again...
Looks like there's a conflict between what the driver wants (DevicePath, in src/VBox/Devices/Parallel/DrvHostParallel.cpp, line 331) and what the config file can pass; I'm using
<Port slot="0" enabled="true" IOBase="0x378" IRQ="4" path="/dev/parport0"/>
I've tried DevicePath="/dev/parport0" without success, either. Really don't want to have to rebuild this all, but the SDK seems to indicate that it's supposed to be path, not DevicePath...
<Port slot="0" enabled="true" IOBase="0x378" IRQ="4" path="/dev/parport0"/>
I've tried DevicePath="/dev/parport0" without success, either. Really don't want to have to rebuild this all, but the SDK seems to indicate that it's supposed to be path, not DevicePath...