[comp.sys.apple2] Dialing a Modem

STEIN@UCONNVM.BITNET (Alan Stein) (02/13/91)

I added one line, InitTextDev(output);, to the program that sent data
to my screen rather than my  modem.  I found that it then accessed my
modem, but did not actually dial.  I'm still wondering what do I need to do to
dial through my modem?

#pragma keep "test"
#include <stdio.h>
#include <orca.h>
#include <stddef.h>
#include <stdlib.h>
#include <texttool.h>
main ()
{
DeviceRec       olddevicerec;
long modemslot=2;
olddevicerec = GetOutputDevice ();
SetOutputDevice (basicType,modemslot);
InitTextDev (output);
WriteCString ("+++atdp18009991234");
SetOutputDevice (olddevicerec);
}

 __________________________________________________________
|                                                          |
| Alan H. Stein              | stein@uconnvm.bitnet        |
| Department of Mathematics  |                             |
| University of Connecticut  | Compu$erve  71545,1500      |
| 32 Hillside Avenue         | GEnie       ah.stein        |
| Waterbury, CT 06710        | SNET        (203) 757-1231  |
|__________________________________________________________|

mhill@pnet91.cts.com (Martin Hill) (02/13/91)

The problem with your code is the string you sent to your modem. Remove the
+++ from the string. I assume your modem isn't on-line when you dial, so why
the +++? If you need the +++ string you have to pause before sending your dial
string.

UUCP: bkj386!pnet91!mhill
INET: mhill@pnet91.cts.com

bazyar@ernie (Jawaid Bazyar) (02/14/91)

In article <9102130734.AA17297@apple.com> STEIN@UCONNVM.BITNET (Alan Stein) writes:
>
>I added one line, InitTextDev(output);, to the program that sent data
>to my screen rather than my  modem.  I found that it then accessed my
>modem, but did not actually dial.  I'm still wondering what do I need to do to
>dial through my modem?

>WriteCString ("+++atdp18009991234");

  Stick a '\n' at the end of your dial string.  
  WriteCString ("+++atdp18009991234\n");

--
Jawaid Bazyar               | "I'm sure K&R have never heard of Mike." 
Senior/Computer Engineering |
bazyar@cs.uiuc.edu          | "That's okay. I'm sure Mike's never heard of K&R".
   Apple II Forever!        |  (discussion about Orca/C)

STEIN@UCONNVM.BITNET (Alan Stein) (02/16/91)

I want to thank everyone who responded to my query about dialing a modem
using Orca/C.  It turned out that I merely had to put a carriage return
at the end of each dialing command, eg

WriteCString("18005551212\r");

Unfortunately, I still have a problem.  I've found that in order to send
pulses or tones through my modem using texttools, I apparently need to
InitTextDev(output) before each attempt, or else interim actions mess things
up, but that initialization also hangs up the phone line.  I need to be able
to send tones through an open line without hanging up, so I think I need to
use FWEntry to use firmware routines.  The <misctool.h> file with Orca/C
conflicts with the operand description in Apple's Toolbox Reference, so I
wonder if anyone can send me an example of a call to FWEntry.  I need to
be able to put a specific value in the accumulator and call a routine at
a certain memory location.

 __________________________________________________________
|                                                          |
| Alan H. Stein              | stein@uconnvm.bitnet        |
| Department of Mathematics  |                             |
| University of Connecticut  | Compu$erve  71545,1500      |
| 32 Hillside Avenue         | GEnie       ah.stein        |
| Waterbury, CT 06710        | SNET        (203) 757-1231  |
|__________________________________________________________|

sysadmin@pnet91.cts.com (Matthew Montano) (02/17/91)

STEIN@UCONNVM.BITNET (Alan Stein) writes:
>I want to thank everyone who responded to my query about dialing a modem
>using Orca/C.  It turned out that I merely had to put a carriage return
>at the end of each dialing command, eg
>
>WriteCString("18005551212\r");
>
>Unfortunately, I still have a problem.  I've found that in order to send
>pulses or tones through my modem using texttools, I apparently need to
>InitTextDev(output) before each attempt, or else interim actions mess things
>up, but that initialization also hangs up the phone line.  I need to be able
>to send tones through an open line without hanging up, so I think I need to
>use FWEntry to use firmware routines.  The <misctool.h> file with Orca/C
>conflicts with the operand description in Apple's Toolbox Reference, so I
>wonder if anyone can send me an example of a call to FWEntry.  I need to
>be able to put a specific value in the accumulator and call a routine at
>a certain memory location.
>

I cannot emphasize how powerful and easy to use John Snow's CSERIO library was
to me in the development of the first version of GenericComm (a limited IIgs
specific comm program). CSERIO has routines such as SerialInit(MODEMSLOT); and
SerialWrite(char);.. as well as Firmware Interface routines to access the
firmware commands such as Drop DTR among others..

I have since evolved GenericComm since I used CSERIO, but it was invaluable
for what it allowed me to do.

Matthew
---
ventureTech Intelligence - We're trying to make computer easy, SOME HOW!
Email: sysadmin@pnet91.cts.com (most mailers won't barf on that..)
My comments aren't even worth a disclaimer...
pnet91 - 416-237-{1204|0308}. 2400bps only. 1200bps if you do hard breaks.
And the further I get from the things that I care about...
The less I care about how much further away I get   -   Robert Smith, 1989