delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/27/12:12:54

Date: Sun, 27 Jul 1997 09:10:58 -0700 (PDT)
Message-Id: <199707271610.JAA16852@adit.ap.net>
Mime-Version: 1.0
To: bennett AT btinternet DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Dialing up a remote computer
Cc: djgpp AT delorie DOT com

You wrote:
>Simply, I'd like to dial up a remote computer and
>send and recieve information, like how a dos
>multiplayer game works (which is what I'd like
>to eventually write).
>
>However, I've no idea how to do this in djgpp... or
>even DOS itself.. :(
>
>Does anyone know of any source code or libs that
>would show me how it's done?

Well, for starters you have to talk to the serial ports. For that I
recommend Bill Currie's BCSIO (sorry about any misspellings). Basically, you
start by setting up the connection with commands to the modems, which are
text strings followed by CR's.
First send the modems the string "ATZ" to reset them. They should reply with
"OK". Send any initialization string the user says to use. Then send the
calling modem "ATDT555-1212" to dial, change the phone number. The answerer
meanwhile should have done "ATS0=n" (notice that's a zero, and replace n
with number of rings to wait before answering). When the connection is made,
you'll get strings such as "CONNECT 9600". Then your programs can just talk
back and forth over the serial port.
To hang up, send "+++ATH" to the modems (the +++ makes it interpret data as
commands). Remember to reset them again when finished!
HTH and sorry this is a bit off topic.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019