Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to get a compiler and debugger going that uses the parallel port to communicate with the on chip debugger on a microprocessor. When I run the program it tells me:
"Cannot open target interface. Parallel port is already in use."
Is it possible to find out what Linux thinks is using the parallel port and then freeing it up?
I'm not using the parallel port for printing (in fact I'm doing all my printing over the network) and before I ran this program I didn't have a parallel port setup and had to run mknod for parport0...
It happens to me in VMware if I have CUPS or a printer service setup. You can remove that module (I think lp) and try it again. You may want to set the parport to mode 666. Do not forget to load up lp module after you are done.
If you're using VMWare, then you may want to disable parallel port support the the client OS and use a share your printer as a network printer, and then use network printing (even though it's on the same machine). The problem, as I see it, is that both the host and the client OS are trying to access the parallel port and only one is allowed to do so. The answer: eliminate the problem.
At the risk of sounding ignorant (not so far from the truth) - what am I doing there by entering rmmod lp? I guess I'm removing a "module" - whatever that is - for lp (line printer?). Is a module a piece of code that allows the kernel to interface with hardware?
Bear in mind that I'm a programmer, and I'm not stupid, but all my experience is low level code - assembler and C for microcontrollers...
Oh, btw thanks to the other suggestions I'm running Mandrake 9.1, not VMware.
Originally posted by DiBosco Aussie, you beaut, that's it! Thanks!
Your welcome :-)
Quote:
Originally posted by DiBosco At the risk of sounding ignorant (not so far from the truth) - what am I doing there by entering rmmod lp? I guess I'm removing a "module" - whatever that is - for lp (line printer?).
Yes, if Mandrake uses hotplug you can stop it loading the lp module at boot by adding it to /etc/hotplug/blacklist.
Quote:
Originally posted by DiBosco Is a module a piece of code that allows the kernel to interface with hardware?
Yes, but thats not all a module can do, you can have filesystem support compiled as modules (but it's not a good idea to have your primary filesystem as a module) and iptables support is usually compiled as modules.
Quote:
Originally posted by DiBosco Bear in mind that I'm a programmer, and I'm not stupid, but all my experience is low level code - assembler and C for microcontrollers...
Oh, btw thanks to the other suggestions I'm running Mandrake 9.1, not VMware.
Many thanks!
Rob.
Have a look at file:/usr/src/linux/Documentation/modules.txt for more info on dynamically loadable kernel modules.
This problem has raised its ugly head again now I've installed Mandrake 10.
Initially I didn't have a parallel port listed at all, (and the application was telling me /dev/parport0 didn't exist) so I did:
modprobe parport_pc
which I saw recommended somewhere else here, but it seemed to do nothing, so I did:
modprobe parport
as well. This didn't quite work properly, it was still saying /dev/parport0 didn't exist, though the directory /dev/lp0 had suddenly appeared.
I did:
ln -s /dev/lp0 /dev/parport0
Which eventually stopped the message telling me /dev/partport0 didn't exist, but then told me:
"Can't open target interface, parallel port already in use"
So, I thought, no problem, I'll do:
rmmod lp
as I did last time. However, whenever I run the application, lp reappears in the lsmod listing.
I now have parport_pc, parport and lp0 in my lsmod. If I remove parport_pc, parport and lp an do lsmod, they all go. As soon as I try connecting to the parallel port with my application they all appear as below in lsmod
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.