Author Topic: Making Linux 'see' the parallel port.  (Read 2530 times)

0 Members and 1 Guest are viewing this topic.

Offline Tony Norton

  • Jr. Member
  • **
  • Posts: 78
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Making Linux 'see' the parallel port.
« on: November 21, 2012, 04:34:27 pm »
Hi all,

I've tried 4 different versions of Linux (Mint13 Cinnamon & Mate, Mandriva and Ubuntu) and decided that Mint Cinnamon is the one I prefer. Have also tried 3 different 'virtual' disks to run my Win applications (KVM, VB and Crossover) and prefer Crossover - yeah I know it's not free like most Linux apps, but I think it's most suited to my needs.

What I can't do is to get any of the 'virtual' apps to do is recognize my parallel port, where my dongle resides. I think this is more likely to be down to Linux than the 'virtual' apps, so my question is: -

Is there an equivalent to the WinXP "add an LPR port". The Windows help file on the subject includes the words "To add the LPR port, you need to install the optional networking component, Print Services for Unix." (WinXP's bold characters). Which makes me think that there is probably a Linux command to enable one to do this.

Any ideas?

Cheers

Tony N

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13460
  • Karma: 331
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Making Linux 'see' the parallel port.
« Reply #1 on: November 21, 2012, 08:19:02 pm »
The parallel port is probably already functional in Linux .. the problem is going to be passing it to Codeweavers Crossover.

OK, from what I gather Crossover is a proprietary version of WINE .. It *IS* possible to forward a parallel port in WINE, see 4.3.1 here:
http://www.winehq.org/docs/wineusr-guide/misc-things-to-configure

So first we need to see if the parallel port is configured in Linux .. send the output from:
Code: [Select]
lsmod | grep lp
and
Code: [Select]
ls -a /dev | grep lp

then we'll have to see if we can work out where Crossover keeps it's "dosdevices" directory .. so run:
Code: [Select]
sudo updatedb
then post the output from:
Code: [Select]
locate dosdevices
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1461
  • Karma: 119
  • Gender: Male
    • View Profile
    • Awards
Re: Making Linux 'see' the parallel port.
« Reply #2 on: November 21, 2012, 10:09:22 pm »
I would say that it is more the case that it does no know what to do with the Zuken Cadstar MSDOS dongle.
http://linuxforums.org.uk/index.php?topic=10541.msg79144#msg79144
Did you not needed to install the drivers in Windows to allow accessing it? You would need to do the same in Linux too.
If you have the drivers then it might be worth to try to install them in Crossover, failing that you can always ask Zuken for the Linux drivers.

Offline Tony Norton

  • Jr. Member
  • **
  • Posts: 78
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Re: Making Linux 'see' the parallel port.
« Reply #3 on: November 25, 2012, 10:49:04 am »
Hi Mark,

here follow the resultts of your instructions: -

The parallel port is probably already functional in Linux .. the problem is going to be passing it to Codeweavers Crossover.

OK, from what I gather Crossover is a proprietary version of WINE .. It *IS* possible to forward a parallel port in WINE, see 4.3.1 here:
http://www.winehq.org/docs/wineusr-guide/misc-things-to-configure


tony@Tonys-Bitsa ~ $ ln -s /dev/ttyS0 com1
tony@Tonys-Bitsa ~ $ ln -s /dev/lp0 lpt1

Done

Quote
So first we need to see if the parallel port is configured in Linux .. send the output from:
Code: [Select]
lsmod | grep lp


Output=

drm_kms_helper         46978  1 radeon
drm                   242038  5 radeon,ttm,drm_kms_helper
lp                     17799  0
parport                46562  3 ppdev,parport_pc,lp


Quote
and
Code: [Select]
ls -a /dev | grep lp


output=

lp0

Quote
then we'll have to see if we can work out where Crossover keeps it's "dosdevices" directory .. so run:
Code: [Select]
sudo updatedb


Done

Quote
then post the output from:
Code: [Select]
locate dosdevices


Output=

/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices
/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices/a::
/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices/c:
/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices/d::
/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices/e::
/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices/f::
/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices/g::
/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices/h::
/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices/y:
/home/tony/.cxoffice/CADSTAR70_Installation/dosdevices/z:
/home/tony/.cxoffice/Cadstar5.0/dosdevices
/home/tony/.cxoffice/Cadstar5.0/dosdevices/a::
/home/tony/.cxoffice/Cadstar5.0/dosdevices/c:
/home/tony/.cxoffice/Cadstar5.0/dosdevices/d::
/home/tony/.cxoffice/Cadstar5.0/dosdevices/e::
/home/tony/.cxoffice/Cadstar5.0/dosdevices/f::
/home/tony/.cxoffice/Cadstar5.0/dosdevices/g::
/home/tony/.cxoffice/Cadstar5.0/dosdevices/h::
/home/tony/.cxoffice/Cadstar5.0/dosdevices/y:
/home/tony/.cxoffice/Cadstar5.0/dosdevices/z:
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices/a::
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices/c:
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices/d::
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices/e::
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices/f::
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices/g::
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices/h::
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices/y:
/home/tony/.cxoffice/Microsoft Office 2007/dosdevices/z:


We've probably got so many drives because Crossover has logged and remembered all my internal HDDs(c: thru g:).
y: (marked by crossover as "/home.tony"), and z (marked as "/") are partitions I believe to be created by Crossover (?).

Although a load of HDDs are listed I cannot access any of them from within any program (Cadstar or any of the Office suite) running under Crossover except for c: (marked by Crossover as "drive_c") which has a limited amount of sub-directories ("Program Files", "Users" and "Windows") and is definitely not my XP64 C: drive.

I'm not sure whether or not the lpt reports above indicate that Linux is 'seeing' the parallel port as, when I check software key details in the Cadstar [help]/[about] it comes up blank, so I can only assume that even if Linux is 'seeing' it, Crossover isn't.. The first step in Cadstar installation is to install the Sentinel driver, which normally allows Cadstar to talk to the dongle. Not with my current setup though as it comes up with ".......operate in unlicensed mode....." message.

Once I can get this parallel port business sorted I have to get access to my other drives, but that's Crossover's problem, which they reckon I ought to be able to sort. I'm now going to have a go at the instructions they sent for this and will let you know, out of interest only, how it goes.

Thanks for your help Mark.

Tony N


Offline Tony Norton

  • Jr. Member
  • **
  • Posts: 78
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Re: Making Linux 'see' the parallel port.
« Reply #4 on: November 25, 2012, 11:09:07 am »
A further thought, I've been browsing around and found that there are Sentinel Driver available for Linux, e.g. at: _

http://uk.safenet-inc.com/support-downloads/sentinel-drivers/

The one I tried to install from the Cadstar Installation disk would have been, of course, a Windows one.

If I download the appropriate Sentinel Linux driver it comes down in an ".rpm" format. How do I install it?

Tony N

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1461
  • Karma: 119
  • Gender: Male
    • View Profile
    • Awards
Re: Making Linux 'see' the parallel port.
« Reply #5 on: November 25, 2012, 01:42:13 pm »
Quote
If I download the appropriate Sentinel Linux driver it comes down in an ".rpm" format. How do I install it?

You cannot install .rpm files as your system uses .deb however there is a tool called Alien,
which can convert RPM files to DEB files.
Install that from your repo:
Code: [Select]
sudo apt-get update
sudo apt-get install alien
To install a .rpm file, you need to convert it to .deb. Place your RPM file in your 'Home' folder,
otherwise you will have to CD into the directory of the .rpm file then covert it:
Code: [Select]
sudo alien -k name_of_rpm_file.rpm
Install your newly created .deb file:
Code: [Select]
sudo dpkg -i name_of_deb_file.deb
Link Alien

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13460
  • Karma: 331
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Making Linux 'see' the parallel port.
« Reply #6 on: November 25, 2012, 02:39:41 pm »
.rpm's are alien to Debian based systems .. so you need to use an application called .. oddly enough .. alien ;)

You can read about it here:
https://help.ubuntu.com/community/RPM/AlienHowto

BUT ..

a) If you're going to be running your app in WINE/Crossover I don't think you want a Linux driver .. I think you need the Windows one.
and
b) Those drivers are VERY old, and not for current kernels .. they DO include the source code, but it won't compile for current kernels
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Tony Norton

  • Jr. Member
  • **
  • Posts: 78
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Re: Making Linux 'see' the parallel port.
« Reply #7 on: November 26, 2012, 11:56:31 am »
Hi Mark,

a) If you're going to be running your app in WINE/Crossover I don't think you want a Linux driver .. I think you need the Windows one.

I would have thought that, but when I queried with the Crossover people the need for security I was told that additional security would not be necessary because although: -

"That's true of VirtualBox and any VM because you're actually running the windows OS, which means you're susceptible to windows viruses. This is not the case with Crossover or Wine. Windows viruses need a windows OS 'host body' to latch onto in order to function, and if you're only running Crossover/Wine you don't have the windows OS, or anything that looks like it from the virus' perspective. "

Which would seem to indicate to me that a Linux driver would be more appropriate. What do you reckon?

Quote
and
b) Those drivers are VERY old, and not for current kernels .. they DO include the source code, but it won't compile for current kernels

Yes, I guess you must be right there, because even though they may be described as for "32bit and X64" by the time you've unpacked the 'zip' or 'rar' file, and converted the 'rpm' to 'deb' if necessary, the end result is a file containing the 'i386' in its title.

Tony N



Offline Tony Norton

  • Jr. Member
  • **
  • Posts: 78
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Re: Making Linux 'see' the parallel port.
« Reply #8 on: November 26, 2012, 12:00:56 pm »
You cannot install .rpm files as your system uses .deb however there is a tool called Alien,
which can convert RPM files to DEB files.
Install that from your repo:
Code: [Select]
sudo apt-get update
sudo apt-get install alien
To install a .rpm file, you need to convert it to .deb. Place your RPM file in your 'Home' folder,
otherwise you will have to CD into the directory of the .rpm file then covert it:
Code: [Select]
sudo alien -k name_of_rpm_file.rpm
Install your newly created .deb file:
Code: [Select]
sudo dpkg -i name_of_deb_file.deb
Link <a href="http://joeyh.name/code/alien/">Alien [/url]


Thanks Sezo,

I downloaded, installed and used Alien without any problem.

Only problem is that all the Linux Sentinel drivers I found would not load on an x64 system.

I suppose I can only keep bashing my head against the wall until it really hurts too much!

Tony N

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13460
  • Karma: 331
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Making Linux 'see' the parallel port.
« Reply #9 on: November 26, 2012, 01:42:42 pm »
"That's true of VirtualBox and any VM because you're actually running the windows OS, which means you're susceptible to windows viruses. This is not the case with Crossover or Wine. Windows viruses need a windows OS 'host body' to latch onto in order to function, and if you're only running Crossover/Wine you don't have the windows OS, or anything that looks like it from the virus' perspective. "


Whoever told you that doesn't understand what WINE is and how it works .. Which is worrying if it's someone from Codeweavers  :o

Straight from the horses mouth:
http://wiki.winehq.org/FAQ#head-3cb8f054b33a63be30f98a1b6225d74e305a0459

WINE *is* a Windows environment, or at least tries to be as close as possible with open source backward engineered libraries (or actual Windows libs if you install them) .. if it can run a Windows executable, why wouldn't it be able to run a malicious executable ?

Windows executables are susceptible to viruses .. full stop .. doesn't matter how or on what they are run .. the only thing in question is how easily they could spread, particularly to the host OS (Linux).

It's less likely (though not impossible) that the host Linux OS could become infected (if somebody wrote malicious code designed to do infect Linux through WINE) .. but anything in the WINE (.wine) directory is open for infection.

Quote
Which would seem to indicate to me that a Linux driver would be more appropriate. What do you reckon?


It's a Windows application running in WINE, from what I gather parallel ports can be configured in WINE as direct passthrough .. so I'd expect your application running in what it considers to be Windows to look for the dongle "in Widows".

I would expect a Linux driver to make the dongle work (be available to) in Linux .. I wouldn't expect a Windows application to be able to make calls to the "Linux" driver.

My guess is you'd need the Windows driver also working in WINE, so the Windows application would be talking to a Windows driver .. which is talking directly to the dongle via parallel port passthrough.

But that's just the way I see it, and I could be wrong.



I still think this would be easier in a VM.

It *may* not be possible at all, in either a VM or WINE .. but if it will work and I had to bet, I'd put my money on finding a way to pass the parallel port to a VM ;)
« Last Edit: November 26, 2012, 02:06:52 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal