Re: How to write and read serial or parallel port
| From: | Curtis Maurand | Date: | Thu, 26 Jul 2012 14:09:00 +0000 |
| Subject: | Re: How to write and read serial or parallel port | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-318568@lists.php.net to get a copy of this message | ||
Lester Caine wrote:
> viper wrote:
>> is it possible to
write and read data on a COM or LPT port?
>> is there any
function or class in PHP?
>>
>> anyone has already
done something similar?
>
> Talking in and out of the
serial port is not too difficult but is OS
> dependent,
>
so what are you wanting to run on? Most of the time you are just
copying
> files
> in and out, although one can use the
control signals as simple I/O if you
> only
> need a
couple of controls.
>
> Parallel port is a minefield on
Windows as access is specifically blocked
> in XP
>
onwards. You need a modified device driver to bypass the blocks windows
> puts in.
> I've not tried that with PHP as I'm normally
accessing the parallel port
> direct
> from other windows
programs.
>
> Linux is lot easier, and most of the
examples you will find via google are
> geared towards that. It
works like DOS used to :)
>
There is an example of a
serial port on php.net in the fopen function documentation.
--C