Re: Com ports & environment space

new topic     » goto parent     » topic index » view thread      » older message » newer message

> Many users have no idea what com port their modem is on.  I would
> like my installer to be able to look for a modem (issue an ati
> command and see if there is a response).  The E. doc for open
> says I can open COM1 (I presume I can open COM 2 3 & 4).
> I am looking for any hints on how to get started.  Can I just
> puts and gets to & from a COM port, or do I have to worry about
> single spacing the characters.  Can I work with the IRQs?

Hi John

Yes, you can open COM2-COM4 as well.

You can determine what COMx ports are open by simply issuing an open()
first and seeing if you get a -1 returned for a failed open. To see what
COMx port the modem is set, simply issuing an ATZ to any of the
COMx ports that return a positive file handle number and reading back an
OK string will work. I recommend you open the com port as a binary
file, using both a combination of strings and single character output.

Hope this helps.

David

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu