MODEMDK Silicon Laboratories Inc, MODEMDK Datasheet - Page 9

KIT DEV EMBEDDED MODEM

MODEMDK

Manufacturer Part Number
MODEMDK
Description
KIT DEV EMBEDDED MODEM
Manufacturer
Silicon Laboratories Inc
Type
Network Controller & Processorr
Datasheet

Specifications of MODEMDK

Main Purpose
*
Embedded
*
Utilized Ic / Part
C8051F120
Primary Attributes
*
Secondary Attributes
*
Interface Type
RS-232, RJ-11, JTAG
Product
Modules
For Use With/related Products
C8051F120
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
336-1285
MODEM-DK
6. Example Source Code
Example source code, libraries, and register definition files are provided in the “SiLabs\MCU\Examples\Modem”
directory during IDE installation. These files may be used as a template for code development. Example
applications include an HTTP web server, SMTP mail client, TCP echo client/server, and UDP echo client/server.
See "Appendix A—Protocols Supported by the TCP/IP Configuration Wizard" on page 24 for a short description of
each protocol supported by the TCP/IP Configuration Wizard. Each of these examples were created using the
TCP/IP Configuration Wizard.
6.1. HTTP Web Server
The example project HTTP.wsp, located by default in the “SiLabs\MCU\Examples\Modem\HTTP” directory,
configures the embedded modem to act as an HTTP web server. The modem places an outgoing call and
establishes a PPP connection with the PC. The number that the modem dials is defined as MODEM_DIAL in
mn_userconst.h. The number must be in the format “ATDT#\r” (where ‘#’ is the phone number of the PC’s modem
with no spaces or dashes). The PC must be configured to accept incoming connections (See "Appendix B—
Connecting the Embedded Modem to a PC" on page 25). The user can specify the modem’s IP address
(IP_SRC_ADDR in mn_userconst.h) or the PC can be configured to assign an IP address to the modem. To
establish a PPP connection, the variables pap_user and pap_pwd in main.c must match the username and
password of one of the user profiles on the PC. Once the PPP connection has been established, the user can type
“http:\\XXX.XXX.XXX.XXX” (where XXX.XXX.XXX.XXX is the IP address of the modem) into a web browser to
view a “Hello World” HTML document served by the embedded modem.
Note: HTML files can be converted to C files using the HTML2C.exe utility located by default in the
“SiLabs\MCU\Utilities\HTML2C” directory.
6.2. SMTP Mail Client
The example project SMTP.wsp, located by default in the “SiLabs\MCU\Examples\Modem\SMTP” directory,
configures the embedded modem to act as an SMTP mail client. The modem places an outgoing call and
establishes a PPP connection with the PC. The number that the modem dials is defined as MODEM_DIAL in
mn_userconst.h. The number must be in the format “ATDT#\r” (where ‘#’ is the phone number of the PC’s modem
with no spaces or dashes). The PC must be configured to accept incoming connections (See "Appendix B—
Connecting the Embedded Modem to a PC" on page 25). The user can specify the modem’s IP address
(IP_SRC_ADDR in mn_userconst.h) or the PC can be configured to assign an IP address to the modem. To
establish a PPP connection, the variables pap_user and pap_pwd in main.c must match the username and
password of one of the user profiles on the PC. Once the PPP connection is established, the modem will send two
emails to the SMTP server at the address defined by IP_SMTP_ADDR in mn_userconst.h. The SMTP server will
then forward those emails to the email address defined by the variable to[] in main.c. One email has a text file
attached, and the other has no attachments.
6.3. TCP Echo Client/Server
The example project TCP.wsp, located by default in the “SiLabs\MCU\Examples\Modem\TCP\firmware” directory,
configures the embedded modem to act as either a TCP echo client or a TCP echo server. To place the modem in
server mode, change the value of variable SERVER_MODE to 1 in main.c. To place it in client mode, change
SERVER_MODE to 0. The user can specify the modem’s IP address (IP_SRC_ADDR in mn_userconst.h) or the PC
can be configured to assign an IP address to the modem. To establish a PPP connection, the variables pap_user
and pap_pwd in main.c must match the username and password of one of the user profiles on the PC.
Rev. 0.2
9

Related parts for MODEMDK