Linux and the Parallel Port
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Linux and the Parallel Port




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Linux and the Parallel Port  
Jason Curl


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-16-07 06:18 PM

Hello,

I'm trying to write a userspace driver under Linux to read data from the
parallel port. It doesn't need any IEEE modes, it just needs to monitor
inputs at arbitrary times to sense state of a particular hardware device
(e.g. when a user presses a button).

Reading a single byte from the Status Register, writing an individual
byte to the Control Register and writing to the Data Register all work
when using ioctl().

However, using (from ppdev) the PPDATADIR ioctl() doesn't seem to work
and the Data register appears to be still driving an output. Writing
directly to the control register also doesn't seem to work.

The parallel port should support bidirectional communications, although
I'm trying to figure out how to confirm that.

Is there a more specific newsgroup I should ask, or can someone else
here also give me ideas?

Thanks & Best Regards,
Jason.





[ Post a follow-up to this message ]



    Re: Linux and the Parallel Port  
David T. Ashley


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-18-07 12:28 AM

"Jason Curl" <j_dot_curl@motorola.com> wrote in message
news:eoilcn$8rk$1@engnntp2.cig.mot.com...
> Hello,
>
> I'm trying to write a userspace driver under Linux to read data from the
> parallel port. It doesn't need any IEEE modes, it just needs to monitor
> inputs at arbitrary times to sense state of a particular hardware device
> (e.g. when a user presses a button).
>
> Reading a single byte from the Status Register, writing an individual byte
> to the Control Register and writing to the Data Register all work when
> using ioctl().
>
> However, using (from ppdev) the PPDATADIR ioctl() doesn't seem to work and
> the Data register appears to be still driving an output. Writing directly
> to the control register also doesn't seem to work.
>
> The parallel port should support bidirectional communications, although
> I'm trying to figure out how to confirm that.
>
> Is there a more specific newsgroup I should ask, or can someone else here
> also give me ideas?

If nothing gets you closer, you might try contacting Donald Becker (linked
to at the page below), and see if he has any suggestions for you.

Him who writes network card drivers may know those who write parallel port
drivers, and associated newsgroups.

http://www.tux.org/pub/net/donald-becker/

--
David T. Ashley              (dta@e3ft.com)
http://www.e3ft.com          (Consulting Home Page)
http://www.dtashley.com      (Personal Home Page)
http://gpl.e3ft.com          (GPL Publications and Projects)







[ Post a follow-up to this message ]



    Re: Linux and the Parallel Port  
Jason Curl


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-18-07 06:17 PM

David T. Ashley wrote:
> "Jason Curl" <j_dot_curl@motorola.com> wrote in message
> news:eoilcn$8rk$1@engnntp2.cig.mot.com... 
>
> If nothing gets you closer, you might try contacting Donald Becker (linked
> to at the page below), and see if he has any suggestions for you.
>
> Him who writes network card drivers may know those who write parallel port
> drivers, and associated newsgroups.

Thanks - I'll try posting first to the linux.parport newsgroup (e.g.
from gmane) and wait for an answer there, before contacting anybody
directly. I figured out that the features linux supports for this
particular PCMCIA parallel port (delock) is only PCSPP, missing the
TRISTATE feature to get this to work (although the website says otherwise).

>
> http://www.tux.org/pub/net/donald-becker/
>





[ Post a follow-up to this message ]



    Re: Linux and the Parallel Port  
A. W. Dunstan


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-21-07 12:25 AM

Jason Curl wrote:

> Hello,
>
> I'm trying to write a userspace driver under Linux to read data from the
> parallel port. It doesn't need any IEEE modes, it just needs to monitor
> inputs at arbitrary times to sense state of a particular hardware device
> (e.g. when a user presses a button).
>
> Reading a single byte from the Status Register, writing an individual
> byte to the Control Register and writing to the Data Register all work
> when using ioctl().
>
> However, using (from ppdev) the PPDATADIR ioctl() doesn't seem to work
> and the Data register appears to be still driving an output. Writing
> directly to the control register also doesn't seem to work.
>
> The parallel port should support bidirectional communications, although
> I'm trying to figure out how to confirm that.
>
> Is there a more specific newsgroup I should ask, or can someone else
> here also give me ideas?
>
> Thanks & Best Regards,
> Jason.

The book "Linux Device Drivers" (by Alessandro Rubini & Jonathan Corbet)
develops a parallel port driver to teach you about writing device drivers.
It's not userspace, but it might have enough information on the parallel
port to get you going.  The 2nd edition is available online -
http://www.xml.com/ldd/chapter/book/.  I think the parallel port stuff
starts in chapter 8.

awd








[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:04 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register