ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Hola,
I need to make some C program under linux to make some scripts that can talk to my Server's Parallel port by sending some quare signal as high or low, so what i can do ???
Thanks in advance
Those are available device driver to be linked to your code, and faily easy to use. It includes a parallel port driver. And it is definitely easier than writing a device driver.
Your project can be accomplished either as a userspace application, or as a kernel driver. The method in each case will be quite different. If timing is critical, especially at higher speeds, then a kernel driver is most likely required, and even then it may be difficult to meet a tight spec. It is not obvious whether you are asking about the details of parallel port hardware functionality, or how to gain access to low-level hardware in general. The PC parallel port was a pretty standard piece of hardware, once upon a time (ISA bus era). These days, you often have to deal with PCI or USB to access the device, and this can make it difficult, maybe impossible, depending on your requirements.
It sounds like you probably intend to write a purely userspace application, so if you have a nice parallel port that is mapped into low IO address space, you can use either the combination of ioperm()/inb()/outb() family of functions, or the /dev/port interface.
More detail about your requirements and the type of hardware you have available will enable people to provide more detailed help.
--- rod.
hmmm wait .. if all you want is the ability to put a certain byte on the parallel-port data lines -- I already did that. It's a solution with a daemon and a client program: https://svn.home.palmen-it.de/viewvc/ppshot/trunk/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.