Re: Writing to i/o at a lower level

From: Alexandre Jasmin (alex.jasmin_at_sympatico.ca)
Date: 12/03/03


Date: Wed, 03 Dec 2003 01:59:11 GMT

Le Wed, 03 Dec 2003 00:19:18 +0000, Fletcher Glenn a écrit :

>
>
> Andrew Falanga wrote:
>> Hello,
>>
>> Sorry for the earlier posting. I was able to get some help from a
>> knowledgable person here. I wasn't setting my file to setuid, and I
>> didn't have it owned by root. That problem is now taken care of.
>>
>> I'm wondering now about writing data to an I/O port, but at a lower
>> level than say, cat <somefile> > /dev/parallel. I'm writing a C
>> program to write to the parallel/serial devices at this level. The
>> Linux HOWTO I referenced earlier (in earlier posting) specifies using
>> ioperm()/iopl() to gain access to the io device, and then using
>> outb()/inb() macros for character io.
>>
>> I'm using these things as spelled out in the HOWTO, but nothing
>> appears to be happening. What are some things to look for?
>>
>> Thanks,
>> Andy
>
> Most I/O devices are owned by the device driver. This is certainly
> true for anything in /dev, and you can only do to a device what the
> driver will let you do. Now for the most part, unless the driver
> supports a "raw" mode, you cannot do bytewise I/O. Even so, you cannot
> normally directly access a device's hardware ports unless you are
> running in kernel mode, something that an ordinary user (including
> root) cannot do. The main difficulty (if the device is memory
> mapped) is that you cannot manipulate the memory address translation map
> from userland.

Just had a quick look at theses Linux functions.. They don't seam to
have anything to do with /dev files. They deal with numbered I/O ports on
the PC and would let you put bit directly on the parallel port registers.
 
I did that kind of stuff once in DOS and Qbasic but I doubt that would help
you much ;-)
 
Are you working on an electronic project Andrew.



Relevant Pages

  • Re: using devcon or dpinst for serial driver install
    ... >Is there a way to install the driver for just one of the com ports? ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.development.device.drivers)
  • Re: Some icons are not getting print while using mirror driver
    ... This posting is provided "AS IS" with no warranties, ... No issues i found as I am getting with my driver. ... prclDst, prclSrc, iTransColor, ulReserved); ...
    (microsoft.public.development.device.drivers)
  • Re: TV-Out problem
    ... but apparently when posting from the ... > I have an ATI Radeon 9800 Pro which has been having problems with the TV-Out ... Now this happens whether I have any ATI specific driver ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: one-way trust not working
    ... Also, as stated in my posting, the same problem is ... credentials from the trusted domain. ... Download PortQryUI and from both sides to check to see if the ports are open ... In the trusted domain, branch.local, I set up the DNS server to use as ...
    (microsoft.public.windows.server.active_directory)
  • Re: VPN Ports
    ... Posting on MS newsgroup will benefit all readers and you may get more help. ... Networking, Internet, Routing, VPN, Anti-Virus, Tips & Troubleshooting on ... >> Which ports need to be opened for running VPN ... >> Networking, Internet, Routing, VPN, Anti-Virus, Tips & Troubleshooting on ...
    (microsoft.public.windows.server.networking)