News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Sending/receiving data via Phone line

Started by Farabi, March 23, 2007, 03:20:11 AM

Previous topic - Next topic

Farabi

I have 2 computer and each computer modem is connected to the phone line. Without using internet I want to transfer data between 2 computer. How can I do that? What Windows API should I use? Is there any tutorial to do that?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

u

Technically, to do that, your tel.line will have to stay open, and that's something most telephone companies detect, and suspend your account (and you have to go to the nearest office to submit a plead...). Also, you have to trick the company's server into not detecting the number dial (switch pulse to tone or vice-versa).
Then... you need some server-software for the TAPI - maybe the regular File Sharing of Windows can help...

In any case, you're in for a load of useless trouble for 56kbit/s.
The cheapest networking is done in 10Mbit/s, with two 100/1000MBit/s LAN cards (each $6, if not integrated into the mobo), a cable for $10, and a friend with clippers.
Please use a smaller graphic in your signature.

dsouza123

You can send a fax.
Using fax software, one computer dials the phone number of the other
the receiving computer fax/modem answers and the fax software receives the fax.

In the past there were bulletin board programs (DOS based).
One computer (client) with a bulletin board terminal program
would dial up the other computer (server) which would allow uploads/downloads/messages to be transfered.

OldTimer

You might like to investigate commercial software like pcAnywhere or LapLink, remembering that the software must be loaded and running on both machines and the modems set to "auto-answer".  Laplink for DOS is available for download on a few "Abandonware" sites but it's entirely possible that the download is for early DOS versions.

As this is an assembler language forum I should mention Ray Duncan's PCTALK.ASM published in his 1986 book Advanced MS DOS.   It worked for me, all those years ago.

Happy hunting.

Farabi

Is anyone here know how to initialize the modem and send the AT command string ?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Draakie

Probably another one of my Blonder moments but we use to in the olden days do
stuff like this with AT echo stuff:

echo at3xdt,[phone number] > com2
                     ^^^^^^^        ^^^
                      actual numerical       hardware com port

not that it's gonna help you probably....
Does this code make me look bloated ? (wink)

dsouza123

After much searching, the following options were found,
some require both PCs to be accessible by a dialup (each PC at a separate phone number).

  Under Windows NT there was RAS/DUN (Remote access server/Dialup Networking)
which allowed using dialup to connect to another PC or Network. 
Windows 98 also had DUN.

  A program called Argus, Argus version 3.210 source is in Delphi 5 and Tasm,
that will answer an incoming dialup connection.
Other software is run with it, a telnet server or BBS, to allow file transfer.

  Another option that may not be available, when using a dialup connection for internet access
there is a modem and some program(s) on the other end that complete the connection and
add some internet layers on top of the physical phone line connection using SLIP or PPP etc.
If a program/set of programs that do this could be located or written then a two PC intranet
could be formed and standard IP based utilities used for file transfer.

  Does anyone know of such software/source code for Windows ?
Something like it appears to exist for Linux.

===
  There is a commercial program WinXfer that can do transfers modem to modem
by dialup.  It can be used either as a GUI, a console program or by API calling a dll
that can be used by C, VB etc, there is a sample in VB. 
There is 5MB download version listed for 95,98,ME,NT,2000,XP

===
Faxing

Fax modems will work under windows to send or receive faxes from one PC to another.
Perhaps using FAX api calls, files could be transfered. Windows XP and 2000 has winfax.dll

In the past there were programs that would encode a file into a 2D image (tiff-fx) or printed
and it could be faxed with either a fax modem or fax machine and the image decoded
on the receiving end and turned back into a file.



==========================
No phone line versions, direct connect.

Connecting two modems directly with a phone cord and connecting using AT commands,
some sites claim it can be done, but it may not work with all modems.

Connecting two modems with a phone cord and a small circuit board that emulates
some characteristics of a phone line.
It uses terminal programs with the modems used as COMM ports
with the assistance of a small program, modem.zip, which sets the connection with AT commands.

Synfire

Farabi,

You can use the CreateFile, ReadFile, WriteFile, and CloseFile API's to interface with your modem. Modems and other serial devices are treated almost the same as files; to interface with them is really not that difficult. There are programs out there, and extended API's like RAS that will make this much easier, but if you want to do it manually (which is how I would probably do it being used to working with old tools like Procomm) then you can simply open the Modem like you would a file and send it AT commands to manage your session. If you decide to go this route, read "Controlling Your Modem With AT Commands" to familiarize yourself with the AT modem system (especially things like auto-answering, sending/receiving files, and setting communication parameters). To get an example of serial communication check out this thread.

Regards,
Bryant Keller

PS: If this was my project, I would write both a client and a server. I would have the server sit in Auto-Answering mode until a call came in. Once a call is received I would switch the connection to data mode for a _TIMEOUT_ amount of time. Once the timeout has been reached I would switch back to voice mode and play an audio WAV file over the line while I rang the outgoing circuit (remember, your modem has an ingoing and outgoing connector so you can connect your phone through your computer). Once the line has been picked up I stop the WAV file from playing. This would allow me to continue to accept phone calls even when the software was running. I would have the client software send a special data mode signal to the server within the timeout to let the server know that it's the client calling so that it never rings on the phone side and the computer can then send out a login prompt or a shell, or what-not. Just a few ideas for your development process. These are some things I took into consideration when I developed my first BBS software many years ago. Notably that was on DOS so things are going to be a lot different for you, but it's a rather fun project none the less.