Searching \ for 'Dial Up Adapter for PIC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Dial Up Adapter for PIC'.

Truncated match.
PICList Thread
'Dial Up Adapter for PIC'
1998\12\08@032844 by Justin Grimm

flavicon
face
Hi All
Im currently programming a dial up adapter for the pic74 and wanted to
verify
the procedure for talking to a modem-

1)
   Set DTR and RTS lines to high
2)
   Output through UART/RS232 port the ascii chars - "ATDTphonenumber"
       then "0x0d"(carriage return?)
3)
   Should receive from the modem the ascii chars - "CONNECTbaudrate"
4)
   Should then receive data from the dialled computer
5)
   To disconnect -
       Output "ATH" then "0x0d"(carriage return?) to the modem
6)
   Should receive "OK" from the modem
7)
   Reset DTR and RTS lines to low

1998\12\08@034909 by Mark Willis

flavicon
face
Some minor changes I'd add (Long day but these I *know* you'll need in
there!)

Justin Grimm wrote:
>
> Hi All
> Im currently programming a dial up adapter for the pic74 and wanted to
> verify
> the procedure for talking to a modem-
>
> 1)
>     Set DTR and RTS lines to high
> 2)
     Output through UART the char "+" (repeated 3 total times), then
delay a second or so {Some modems don't require this, but they SHOULD.}
     This tells the modem to go into command mode, so ATDT to follow
isn't ignored as being DATA!.  Then, sending ATZ, 0x0d, is a good idea;
then delay a half second or so to let the modem reset (make sure your
registers are all loaded right, just in case a power problem has messed
up the modem's registers!)  THEN,
>     Output through UART/RS232 port the ascii chars - "ATDTphonenumber"
>         then "0x0d"(carriage return?)
> 3)
>     Should receive from the modem the ascii chars - "CONNECTbaudrate"
> 4)
>     Should then receive data from the dialled computer
> 5)
>     To disconnect -
     Output through UART the char "+" (repeated 3 total times), then
delay a second or so, THEN, once you're again in command mode,
>         Output "ATH" then "0x0d"(carriage return?) to the modem
> 6)
>     Should receive "OK" from the modem
> 7)
>     Reset DTR and RTS lines to low

 That much I can help with, even tonight <G>

 Mark, spam_OUTmwillisTakeThisOuTspamnwlink.com, beyond tired just now.

1998\12\08@074135 by WF AUTOMACAO

flavicon
face
Justin Grimm wrote:
{Quote hidden}

Don't forget the HANG UP on modem...

1998\12\08@093832 by Andy Kunz

flavicon
face
>    Reset DTR and RTS lines to low

This will disconnect and hang up the phone for you.  I use this method to
disconnect undesired users as a security option.

Andy


==================================================================
 Andy Kunz - Montana Design - http://www.users.fast.net/~montana
==================================================================

1998\12\08@103117 by Engineering Department

flavicon
face
<Justin Grimm asks in part>

>Im currently programming a dial up adapter for the pic74 and wanted to
>verify the procedure for talking to a modem-
>
>1)   Set DTR and RTS lines to high

Assuming the modem follows the defacto "Hayes" standard it may pay to
reset the modem to some known state.  You never know how some other
software may have left the modem.  You can set auto-answer, hardware
handshaking and when it drops a line -- just to name a few parameters
that will come in handy.  When the modem is in a known state it is easier
to implement your PIC protocol.

>2)   Output through UART/RS232 port the ascii chars
        "ATDTphonenumber"  then "0x0d"(carriage return?)

Consider some leading pauses to let the dial tone come on.


>3)  Should receive from the modem the ascii chars -
         "CONNECTbaudrate"

Don't bet on it.  In some modems this is the "verbose" mode.  Stick
to the most basic Hayes commands to work with the most modems.

>4)  Should then receive data from the dialled computer

>5)  To disconnect -
>        Output "ATH" then "0x0d"(carriage return?) to the modem


You may want to reset and renormal the modem too.

>6)   Should receive "OK" from the modem


Again, it depends on the model of modem and how you have set it up.

>7)   Reset DTR and RTS lines to low


Take some time to look at the Hayes command set both for setting
the modem up and for managing a call.  It pays off.

Cheers,

Win Wiencke

1998\12\08@114327 by Peter L. Peres

picon face
On Tue, 8 Dec 1998, Andy Kunz wrote:

> >    Reset DTR and RTS lines to low
>
> This will disconnect and hang up the phone for you.  I use this method to
> disconnect undesired users as a security option.

Note: This only works if the modem is initialized to hangup on dropped
DTR. There is a '&' - Hayes command to be sent to achieve this. Most
modems come preconfigured to do this. Note that most Unix *gettys will
choke on a modem that hasn't got this feature enabled.

Peter

1998\12\08@125122 by Harold Hallikainen

picon face
On Tue, 8 Dec 1998 16:35:52 +0800 Justin Grimm <.....eclipseKILLspamspam@spam@ACCESSIN.COM.AU>
writes:
>Hi All
>Im currently programming a dial up adapter for the pic74 and wanted to
>verify
>the procedure for talking to a modem-
>
>1)
>    Set DTR and RTS lines to high

       I think I'd just leave DTR and RTS high all the time.

>2)
>    Output through UART/RS232 port the ascii chars - "ATDTphonenumber"
>        then "0x0d"(carriage return?)


       Looks good.

>3)
>    Should receive from the modem the ascii chars - "CONNECTbaudrate"


       I like just waiting for DCD to go true.  Unsolicited status
messages are too easy to miss.  Pretty hard to not see that DCD has gone
true.

>4)
>    Should then receive data from the dialled computer



>5)
>    To disconnect -
>        Output "ATH" then "0x0d"(carriage return?) to the modem

       Stop sending data.
       Wait (typically 1 second)
       Send +++ (some modems require delays between characters)
       Wait (typically 1 second... modem will anwer OK)
       Send ATH, 0x0d




>6)
>    Should receive "OK" from the modem
>7)
>    Reset DTR and RTS lines to low
>

       Again, I'd just leave them high...


Harold





Harold Hallikainen
haroldspamKILLspamhallikainen.com
Hallikainen & Friends, Inc.
See the FCC Rules at http://hallikainen.com/FccRules and comments filed
in LPFM proceeding at http://hallikainen.com/lpfm

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

1998\12\08@133739 by Lee Jones

flavicon
face
>> Im currently programming a dial up adapter for the pic74 and
>> wanted to verify the procedure for talking to a modem-
>>
>> 1) Set DTR and RTS lines to high
>> 2)

>    Output through UART the char "+" (repeated 3 total times), then
> delay a second or so {Some modems don't require this, but they SHOULD.}
>    This tells the modem to go into command mode, so ATDT to follow
> isn't ignored as being DATA!

The modem has a command mode (where it acts on AT commands)
and a data mode (where it passes every octet to the far end).

Hayes created an escape mechanism to switch from data mode back
into command mode.  They used 3 plus signs ("+++").  To prevent
a long string of plus signs embedded in a normal data stream from
inadvertantly switching the modem back into command mode, the
original specification required that the line be quiescent (no
characters) for a minimum of 1 second both before and after the
escape sequence.

Also, by default the escape character is a plus sign ("+")
character.  It can be reconfigured to any other character by
changing an S register value (ATSn=m).  If you're sharing the
modem with anything else, you might want to reprogram the
escape character to plus sign during initialization.


>>    Output through UART/RS232 port the ascii chars - "ATDTphonenumber"
>>         then "0x0d"(carriage return?)
>> 3) Should receive from the modem the ascii chars - "CONNECTbaudrate"
>> 4) Should then receive data from the dialled computer

By definition, the modem must now be in data mode.

>> 5) To disconnect -

>    Output through UART the char "+" (repeated 3 total times), then
> delay a second or so, THEN, once you're again in command mode,

Again, send no characters for 1 second or more, send 3 plus
("+") characters, and send no characters for 1 or more seconds.

>    Output "ATH" then "0x0d"(carriage return?) to the modem

Yes, 0x0D is ASCII carriage return (with either odd parity
or no parity).

> 6) Should receive "OK" from the modem

Given that parity can be configured every which way, I'd suggest
you mask each character with 0x7F (i.e. strip parity bit) when
looking for responses to commands you've send the modem.

> 7) Reset DTR and RTS lines to low

Some modems will hang up on DTR going low.  Some modems won't.
And some will or won't depending on configuration.

                                               Lee Jones

1998\12\08@232447 by keller

flavicon
face
I would set the modem to "Numeric Responses" instead of text messages.  This
would make it much easier to decode the responses back from the modem.  You
get numbers instead of text messages. (Example: 0 = OK, 1=Connect, 3=No
Carrier, 25 = CONNECT 14400, etc.)  They should be listed in the back of the
modem manual.

Just a thought

Steve


{Original Message removed}

1998\12\09@114157 by Justin Grimm

flavicon
face
So the DCD line goes HIGH when a carrier is detected or it is connected?
Thanks
Justin Grimm

Harold Hallikainen wrote:

{Quote hidden}

1998\12\09@122725 by William Chops Westfield

face picon face
It's much easier to configure your modem to hang up and reset to default
configuration whenever DTR is lowered, and then you can avoid timing-based
escape sequences and other problematic issues.

Here's a rather large cheat sheet we send to customers...

14-Apr-95  7:45:31-GMT,12181;000000000001
Received: from hubbub.cisco.com (hubbub.cisco.com [198.92.30.32]) by glare.cisco
.com (8.6.8+c/CISCO.SERVER.1.1) with ESMTP id AAA15699; Fri, 14 Apr 1995 00:45:
29 -0700
Received: (daemon@localhost) by hubbub.cisco.com (8.6.10/CISCO.GATE.1.1) id AAA2
7025 for cisco-news; Fri, 14 Apr 1995 00:44:50 -0700
Received: from norn.mailbase.ac.uk (daemonspamspam_OUTnorn.ncl.ac.uk [128.240.226.1]) by hu
bbub.cisco.com (8.6.10/CISCO.GATE.1.1) with ESMTP id AAA27003 for <incoming-cisc
@spam@oKILLspamspamcisco.com>; Fri, 14 Apr 1995 00:44:45 -0700
Received: by norn.mailbase.ac.uk id <KILLspamIAA13456KILLspamspamnorn.mailbase.ac.uk>
 (8.6.11/ for mailbase.ac.uk); Fri, 14 Apr 1995 08:39:01 +0100
Received: from spot.Colorado.EDU by norn.mailbase.ac.uk id <RemoveMEIAA13445TakeThisOuTspamnorn.mailba
se.ac.uk>
 (8.6.11/ for mailbase.ac.uk) with ESMTP; Fri, 14 Apr 1995 08:38:57 +0100
Received: (from root@localhost) by spot.Colorado.EDU (8.6.11/8.6.9/CNS-3.5) id A
AA20199 for cisco-ml4; Fri, 14 Apr 1995 00:24:10 -0600
Received: from on-tap.cisco.com (on-tap.cisco.com [171.68.225.179]) by spot.Colo
rado.EDU (8.6.11/8.6.9/CNS-3.5) with ESMTP id KAA15072 for <spamBeGoneciscospamBeGonespamspot.colorado.
edu>; Thu, 13 Apr 1995 10:46:11 -0600
Received: (from bpinsky@localhost) by on-tap.cisco.com (8.6.9/server/940815) id
JAA01725; Thu, 13 Apr 1995 09:45:40 -0700
Date: Thu, 13 Apr 1995 09:45:40 -0700
From: Bruce Pinsky <TakeThisOuTbepEraseMEspamspam_OUTcisco.com>
Message-Id: <RemoveME199504131645.JAA01725spamTakeThisOuTon-tap.cisco.com>> To: ciscoEraseMEspam.....spot.colorado.edu, EraseMEgcarterspampromega.com
Subject: Re: Maximum speed of Ports on 2511
X-List: RemoveMEciscoEraseMEspamEraseMEmailbase.ac.uk
Reply-To: Bruce Pinsky <RemoveMEbepspam_OUTspamKILLspamcisco.com>
Sender: RemoveMEcisco-requestTakeThisOuTspamspammailbase.ac.uk
Precedence: list

ggcarter writes:

==>
==>I got the documentation, and was surprised to find the errata sheets
==>that shipped with my 2511 almost as thick as the manuals.
==>
==>In any case, I got the thing running but I have yet to configure the
==>modems or the serial ports.
==>
==>Since I have 28.8 modems, I would like the ports configured for 115,200
==>for all 16 serial lines.
==>
==>The rather poor documentation only mentions rates up to 38.400 which
==>kinda sucks.
==>
==>Secondly, does anybody have a recommended modem setup string for a
==>bunch of Hayes V.34 28.8 modems I am connecting to this thing?
==>


The ports support up to 115.2K.

The attached modem guide prepared by a colleague may help on the Hayes.

+-------------------------+-----------------------+---------------------------+
+      ||        ||       +                       + Bruce Pinsky              +
+      ||        ||       + Cisco Systems, Inc.   + Sr. Internetwork Supt Engr+
+     ||||      ||||      + 170 West Tasman Drive + Phone: (800) 553-24HR     +
+ ..:||||||:..:||||||:..  + San Jose, CA  95134   + Fax:   (408) 526-8787     +
+   Cisco Systems Inc.    +                       + E-mail: EraseMEbepspamspamspamBeGonecisco.com     +
+-------------------------+-----------------------+---------------------------+
|                 ** The Science of Networking Networks **                    |
+-----------------------------------------------------------------------------+

===== Begin Included File =====
               MASTER MODEM CONFIGURATION CHART V0.7
                               or
       Modem configuration for people who hate modems (ie, everybody)
               Phillip A. Remaker, RemoveMEremakerKILLspamspamcisco.com

This document is designed to allow you to configure most popular modems
to work on the Cisco access server or on the console/aux port of our routers.

CONFIGURING THE CISCO SIDE
==========================

In general, the following line configuration works best:

line x          ! TTY #. Aux port is 1 on router, last_tty+1 on access server.
speed 38400     ! Set to highest speed in common between modem + port.
flow hard       ! RTS/CTS flowcontrol.  CTS only on ASM.
modem inout     ! Drop connection on loss of CD, Cycle DTR for connection close

What this does is it assumes that the modem will always talk to us at "speed"
(which is why you must LOCK SPEED on the modem), that the "CD" lead of the
modem reflects the real state of carrier, and that the modem will hang up
when we drop DTR.  Flowcontrol and modem control are NOT available on
pre-9.21 router aux ports.

Avoid autobaud if you can.  Modems are much better at it than we are.

Bitrate trivia:
38400  is the maximum speed for the 500-CS
57600  is the maximum speed for ASM, STS-10 and AUX ports
115200 is the maximum speed for the 25xx access servers

If flowcontrol is not available, it is advisable to stay at 9600 baud.

If you are *routing* over the aux port, note that each character generates a
processor interrupt.  Abnormally high CPU may be resolved by using a lower
AUX port speed.

CONFIGURING THE MODEM
=====================

*Always* issue the commands to the modem starting with "AT" and issue them
at the speed at which you wish the modem to talk to the Cisco.  This insures
that the modem will always talk to us at that speed we expect *regardless*
of the speed of any incoming modem connection (assuming that you set the modem
to lock on the DTE speed, which is required.  Required, required, required)

If possible, configure modems using reverse connection.  To make a reverse
connection,  issue the command:

telnet x.x.x.x 20yy

Where x.x.x.x is any active, connected and up interface on the Cisco
device and yy is the line number to which you want to connect.  Recall
that 01 is the aux port on a router. On an Access server, the AUX port
is the last_tty+1 - e.g. on a 16-port Access Server, the AUX port is
port 17.  You can issue this telnet command from anywhere on the
network that can ping x.x.x.x.

If you get a connection refused, this means that someone already has a
connection to that port or there is an exec (prompt) running on that port.
Clear the line from the console to try again.  If it still fails, make sure
that you have set modem inout for that line.  If you don't have modem control
(as in pre-9.21 aux ports), be either set "no exec" on the line before making
a reverse connection or configure the modem using an external terminal.

SOME HARD LEARNED LESSONS AND TIPS
==================================

If you connect and it appears hung, try "^U" (clear line) and "^Q" (XON) and a
few returns to try to wake it up.

If you type quit and the modem doesn't hang up, it is not watching DTR
or you have not set up modem control on the Cisco.

If you land in someone elses session when you dial in, the modem is not
dropping CD on disconnect or you have not set up modem control on the Cisco.

Regarding the previous two points, remember you cannot set up modem control
on pre-9.21 route aux ports.

If you issue a "+++" on the dialing modem, followed by an ATO and discover that
you are hung, this means the answering modem saw and interpreted the "+++"
when it was echoed to you.  This is a bug in the answering modem.  A lot of
modems have that.  There may be a switch to defeat that, but it varies
from modem to modem.

If you have autoselect turned on for the line (9.21 and after), a <CR> is
required to get you into exec.

If you elect to do Hardware Flow control (which is recommended), make sure the
Router/Access Server's line (DTE) and the modem (DCE) both have them turned on.
Having one on and the other one off will cause you to lose data.

If you have an MDCE, life would be a lot simpler if you turned it into an
MMOD by moving pin 6 to pin 8 since most modems use CD and not DSR to indicate
the presence of carrier.  If not, some modems can be programmed to sprocide
carrier info via DSR (see chart below).


HOW TO USE THIS CHART
=====================

Attach to the modem at the speed at which the Cisco port will be set.
Preferably, do this via a reverse telnet connection, which removes
all doubt about whether or not the modem line speed is the same as the
Cisco.

Issue the AT command built from the attached chart:

Start with "required for all" and add on the "EC/Compression" pair
(either "BEST," or "NO") that best suits your need.  This is the minimum
that you need to start.  For applications that are primarily file transfer,
the "BEST" pair is advisable.  For connections that are primarily ARA,
Xremote, or interactive packet-protocol (SLIP/PPP) traffic, the "NO" pair
is advisable.  Your mileage may vary, season to taste.

If you have an AUX port (or no modem control), add the "aux port"
section.  Remember to limit to 9600 bps if you have no flow control.

Add the "Plat Spec" ASM only for ASM platforms, and CAB-MDCE if
you have a 500-CS with a CAB-MDCE.

Finalize the string with a &W.

Example:  A Microcom with best error correction/compression with an ASM would be
:

AT&FS0=1&C1&D3\Q3\J0\N6%C1\Q2&W

LEGEND
======

- "*NA*" means option is not available on that modem.
- "-->" means that the command on the right will take care of that function.
- "<--" means that the command on the left will take care of that function.

"Aux port" parameters only required for pre-9.21 aux ports or any other port
without modem control set.

"Plat Spec" Are the platform specific parameters required for ASM (no RTS)
or 500-CS CAB-MCDCE (requires DSR to performs the CD function).

"Comments" alert you to modem-specific weirdness.



               --------Required for all----------  ------EC/Compression-----
MODEM BRAND     FD  AA  CD  DTR   RTS/CTS LOCK DTE  Best   Best   No     No
                           Hngp   Flow    Speed    Error  Comp   Error  Comp

Codex 3260      &F S0=1 &C1 &D3    *FL3     *SC1    *SM3   *DC1   *SM1   *DC0

USR Courier     &F S0=1 &C1 &D3   &H1&R2    &B1     &M4    &K1    &M0    &K0
USR Sportster

Global Village  &F S0=1 &C1 &D3    \Q3      \J0     \N7    %C1    \N0    %C0
Teleport Gold

Telebit         &F S0=1 &C1 &D3   S58=2     S51=255 S180=2 S190=1 S180=0 S190=0
T1600/T3000/WB                    S68=2             S181=1        S181=1

Telebit         &F S0=1 &C1 &D3   S58=2     S66=1   S95=2  S98=1  S95=0  S98=0
T2500 (ECM)                       S68=2                    S96=1         S96=0

AT&T Paradyne   &F S0=1 &C1 &D3    \Q3      --->    \N7    %C1    \N0    %C0
Dataport

Hayes modems    &F S0=1 &C1 &D3    &K3      &Q6     &Q5    &Q9    &Q6    <---
Accura/Optima

Microcom        &F S0=1 &C1 &D3    \Q3      \J0     \N6    %C1    \N0    %C0
QX4232 series

Motorola UDS    &F S0=1 &C1 &D3    \Q3      \J0     \N6    %C1    \N0    %C0   S
FastTalk II

Multitech       &F S0=1 &C1 &D3    &E4      $BA0    &E1    &E15   &E0    &E14
MT1432 MT932

Digicom         &F S0=1 &C1 &D3    *F3      *S1     *E9    <---   *E0    <---
Scout Plus

Digicom         &F S0=1 &C1 &D3    &K3      --->    \N5    %C1    \N0    %C0
SoftModem

Viva            &F S0=1 &C1 &D3    &K3      --->    \N3    %M3    \N0    %M0
14.4/9642c

ZyXel           &F S0=1 &C1 &D3    &H3      &B1     &K4    <---   &K0    <---
U-1496E

Supra           &F S0=1 &C1 &D3    &K3      --->    \N3    %C1    \N0    %C0
V.32bis/28.8

ZOOM            &F S0=1 &C1 &D3    &K3      --->    \N3    %C2    \N0    %C0
14.4

Intel           &F S0=1 &C1 &D3    \Q3      \J0     \N3   %C1"H3  \N0    %C0
External

Pratical        &F S0=1 &C1 &D3    &K3      --->    &Q5   &Q9     &Q6    <---
Peripherals

              -Aux port-  -Plat spec-
MODEM BRAND     No    No    ASM   CAB-  Write   Comments
               Echo  Res   only  MDCE  Memory

Codex 3260      E0    Q1    *NA*  &S1   &W

USR Courier     E0    Q1    &R1   *NA*  &W
USR Sportster

Global Village  E0    Q1    \Q2   *NA*  &W
Teleport Gold

Telebit         E0    Q1    S58=0 &S4   &W
T1600/T3000/WB

Telebit         E0    Q1    &R1   &S1   &W      Use "Enhanced" mode
T2500 (ECM)

AT&T Paradyne   E0    Q1    \Q2   *NA*  &W
Dataport

Hayes modems    E0    Q1    *NA*  *NA*  &W
Accura/Optima

Microcom        E0    Q1    \Q2   *NA*   &W     Almost all Microcom modems
QX4232 series                                   have similar config params.

Motorola UDS    E0    Q1    \Q2   *NA*   &W
FastTalk II

Multitech       E0    Q1    &E12  &S1   &W
MT1432 MT932

Digicom         E0    Q2    *NA*  &B2   &W
Scout Plus

Digicom         E0    Q1    *NA*  &S1   &W
SoftModem

Viva            E0    Q1    *NA*  &S1   &W
14.4/9642c

ZyXel           E0    Q1    *NA*  &S1   &W      Cool stuff on ftp.zyxel.com
U-1496E

Supra           E0    Q1    *NA*  &S1   &W
V.32bis/28.8

ZOOM            E0    Q1    *NA*  &S1   &W
14.4

Intel           E0    Q1    \Q2   *NA*  &W
External

Pratical        E0    Q1    *NA*  *NA*  &W      Based on PC288LCD.  May vary.
Peripherals

===== End of Included File =====

1998\12\09@160020 by Harold Hallikainen

picon face
On Thu, 10 Dec 1998 00:50:00 +0800 Justin Grimm <eclipseSTOPspamspamspam_OUTACCESSIN.COM.AU>
writes:
>So the DCD line goes HIGH when a carrier is detected or it is
>connected?
>Thanks
>Justin Grimm

       Yes.  DCD goes true (+12V) when carrier is detected when either
originating or answering a call.  This is the default setting on most
modems now (AT&C1).  The other choice (AT&C0) is for DCD to be true all
the time.  I think they originally used AT&C0 because terminals would not
talk when carrier was not present (DCD false), which disallowed people
from typing in AT commands when off line.  Again, I believe now that most
modems default to AT&C1 (I just checked several Hayes modems and found
this to be the case).


Harold



Harold Hallikainen
spamBeGoneharoldSTOPspamspamEraseMEhallikainen.com
Hallikainen & Friends, Inc.
See the FCC Rules at http://hallikainen.com/FccRules and comments filed
in LPFM proceeding at http://hallikainen.com/lpfm


___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...