Issue
146 September 2002
Internet
Enabling Made Easy
by
Fred Eady
2124 MODEM
Take a look at the
2124 modem in Figure 2. The heart of the 2124 modem
is an integrated V.22bis 2400-bps modem, which is supported
by a DAA. The DAA allows the integrated modem to attach
directly to the Public Switched Telephone Network (PSTN)
using a standard RJ-11 interface.
 |
| Figure 2—The most important feature
of the 2124 modem, with the exception of the modem
circuitry itself, is the network protocol stack.
If you’ve ever done any projects that require TCP/IP
or PPP firmware, you know that implementing the
protocols is not a trivial task. |
The 2124 modem’s
internal electronics can also communicate with external
serial devices using its standard V.24 5-V interface.
All of the standard modem control and data signals are
available on this interface, and they’re offered at
standard TTL logic levels. The TTL logic-level-compatible
V.24 interface allows the 2124 modem to interface directly
with a local external microcontroller without the need
for additional RS-232 voltage conversion.
As a rule, PC serial
ports expect RS-232 levels, which is one of the reasons
why it’s useful to have RS-232 conversion circuitry
native to the 2124 evaluation board. Most single board
computers also want to see a true RS-232 signal. So,
when designing your 2124 modem system hardware, be sure
to take notice and include some RS-232 conversion circuitry
if your external SBC or microprocessor complex requires
it.
In addition to the
V.24 interface, the V.22bis modem can be reset using
a TTL logic-level signal applied to its RST pin. An
analog output is also provided by the V.22bis modem
to allow call progress to be monitored by external analog
circuitry. The 2124 eval board uses an LM386 audio amplifier
IC for audible call progress monitoring.
In addition to the
integrated V.22bis modem, the 2124 modem includes an
internal microprocessor that interfaces to a large block
of internal flash memory. The internal microprocessor
controls the actions of the V.22bis modem and processes
I/O signals from the V.24 and input sense interfaces.
As you guessed, the 2124’s internal microprocessor is
also responsible for manipulating the TCP/IP stack logic
and reporting the status of e-mail transfers. Data necessary
to the modem’s e-mail application is held in the flash
memory.
If you take a closer
look at the Network Protocols box inside the microprocessor
box in Figure 2, you’ll see five small boxes organized
in a flowchart manner. These small boxes represent the
major functional areas of a typical TCP/IP stack implementation.
Don’t confuse this with the Open System Interconnection
(OSI) model, which is made up of seven layers. The major
TCP/IP functional areas fit into the overall OSI model,
but aren’t totally related as they are depicted here.
Post Office Protocol
(POP3) and Simple Mail Transfer Protocol (SMTP) are
used directly by Internet applications. POP3 is simply
a way to retrieve mail from a POP3 server. SMTP uses
a set of standard commands that use the e-mail address
information contained in the 2124 modem flash memory
to transfer e-mail between the modem and the ISP’s SMTP
server.
The POP3 server
is usually your incoming mail server, and the SMTP server
is your outgoing mail server. The SMTP language is quite
simple. You can actually use an uncomplicated terminal
session to talk to any SMTP server with abbreviated
human language commands like HELO and QUIT.
Before any TCP/IP
activity can occur in most dial-up connections, PPP
must pave the way. PPP is invoked after the 2124 modem
dials the ISP’s phone number. The remote ISP system
and PPP component of the 2124 modem’s firmware decide
how to send and receive the e-mail data or any other
data that will be transferred. This is called PPP negotiation,
which consists of things like what terminal type is
being used and how big the data blocks will be. During
this process, PPP also passes your password and user
ID to the remote system for verification.
After the ISP’s
server has accepted your password and user ID and the
PPP negotiations are finished, PPP passes control to
TCP/IP, POP3, and SMTP-based applications. At this point,
the 2124 modem’s internal microcontroller can send or
receive e-mail by using the communications path that
has been cleared by PPP and TCP/IP. In addition, it
can report the status of the transfer by way of the
2124 modem’s external interfaces.
When the e-mail
transfer is complete, the applications inform the TCP
that they are finished. Then, the TCP unplugs the socket
it made to the ISP mail server and drops the physical
(phone line) and logical (TCP/IP) connections.
If your 2124 modem
never had to change the ISP phone number, ISP IP address,
destination e-mail address, or e-mail message, this
entire process could have been done using only the 2124
modem, a switch closure or trigger to activate the SEND
E-MAIL pin, a phone line, and a source of +5-VDC power.
The trigger could be a minimal external microcontroller
implementation or a reed switch inside a float assembly
monitoring the level of fluid in a holding tank. The
2124 modem has two TTL-level external inputs that can
be sensed with their status being reported by a nonvolatile
flash memory resident e-mail message.