Moxa Technologies EM-1240-LX user manual Configuring Dial-in/Dial-out Service, Configuring PPPoE

Page 41

EM-1240-LX User’s Manual

Configuring EM-1240-LX

Configuring Dial-in/Dial-out Service

Dial-out Service

Direct cable connection:

yWithout username and password, use:

/>pppd connect ‘chat –v’ /dev/ttyM0 38400 crtscts&

yWith username and password, use:

/>pppd connect ‘chat –v’ user xxxxx password xxxxx /dev/ttyM0 38400 crtscts&

Connect Using a Modem:

yUse:

/>pppd connect ‘chat –v ATDT<phone_number> CONNECT’ user xxxxx password xxxxx /dev/ttyM0 38400 crtscts&

ATTENTION

If dial out fails, the pppd connection will be blocked, and the users will need to shut down pppd, and re-dial. Since the return value is always OK (regardless of whether or not the connection is blocked), the API must be set up to check the network status to determine if the connection is complete.

Dial-in Service

Direct cable connection:

yUse either of the following:

/>pppd <Local_IP_Address>:<Remote_IP_Address> /dev/ttyM1 38400 local crtscts

or

/>pppd <Local_IP_Address>:<Remote_IP_Address> /dev/ttyM0 38400 local crtscts login auth

Connect Using a Modem:

yUse:

/>pppd connect ‘chat –v AT CONNECT’ <local_IP_Address>:<Remote_IP_Address> /dev/ttyM0 38400 crtscts login auth

Configuring PPPoE

PPPoE relies on two widely accepted standards: PPP and Ethernet, which permits the use of PPPoE(Point-to-Point Over Ethernet).

PPPoE is a specification for connecting users on an Ethernet to the Internet through a common broadband medium, such as a single DSL line, wireless device or cable modem, used by many ADSL service providers. All users on the Ethernet share a common connection, so the Ethernet principles that support multiple users on a LAN combine with the PPP principles, which apply to serial connections.

yCreate the Connection:

/>pppd pty “pppoe -I <ETHERNET_INTERFACE> -m 1412” user <USER_NAME> password <USER_PASSWORD>&

<ETHERNET_INTERFACE>: Ethernet card connected to ADSL modem, for example, eth0

<USER_NAME>: User account, for example, moxa@adsl.net

4-8

Image 41
Contents First Edition, November EM-1240-LX User’s ManualCopyright Notice Table of Contents Chapter EM-1240-LX Device API Introduction Product Features Package ChecklistOverview EM-1240-LXHardware Specifications Product SpecificationsSoftware Specifications EM-1240 Development Kit Embedded Module Hardware Block Diagram AppearanceEM-1240 Embedded Module EM-1240 Development Kit Dimensions Wiring Requirements Installing the EM-1240-LXLED Indicators Grounding the EM-1240-LX Connecting Data Transmission CablesConnecting the Power Connecting to a Serial Device Connecting to the NetworkInternal SD Socket Reset ButtonAdditional Functions Serial Console PortReal-time Clock Getting Started Console Port Powering on the EM-1240-LXConnecting the EM-1240-LX to a PC Telnet Default IP Address Default Netmask192.168.3.127 255.255.255.0 192.168.4.127 255.255.255.0Configuring the Ethernet Interface Dhcpcd -p -a eth0 & dhcpcd -p -a eth1 Ifconfig eth0Installing a Secure Digital SD Memory Card Developing Your Applications Installing the EM-1240-LX Tool ChainStep #mount -t iso9660 /dev/cdrom /mnt/cdromEM-1240-LX User’s Manual PATH=/usr/local/arm-elf/bin$PATH Compiling Hello.c#make Uploading Hello to the EM-1240-LX# chmod 755 hello #./hello Running Hello on the EM-1240-LXCflags = Make File Example CodeSoftware Package EM-1240-LX Software Architecture Additional information about JFFS2 is available at Flash Context Flash Address Size Access controlJournaling Flash File System JFFS2 Bin Dev EM-1240-LX Software PackagePtyp0 Ppp Pio Rtc Ram1 Ram0 Null Kmem Mem Cua0 Console Tty ‰ Iptables ‰ NAT Configuring the EM-1240-LXEnabling and Disabling Daemons Example default enableAdding a Web Default Home Page addressLocal Host Packets Examples Define policy rules, and Append or delete rulesUsage Define policy for chain rules NAT Example Enabling NAT at BootupConfiguring PPPoE Configuring Dial-in/Dial-out ServiceDial-out Service Dial-in ServiceDynamic Driver Module Load/Unload How to Mount a Remote NFS ServerUpgrading the Kernel Ramdiskupkernel em1240-1.x.bin /ramdiskrebootUpramdisk Cd ramdiskUpramdisk Cd ramdisk Upgrading the Root File System & User DirectoryRamdiskbackupfs /ramdisk/usrdisk-backup User Directory Backup-EM-1240-LX to PCMirroring the Application Program and Configuration Loading Factory DefaultsAutostarting User Applications on Bootup Checking the Kernel and Root File System VersionsCat /etc/version FsversionEM-1240-LX Device API Uart Interface RTC Real-time ClockBuzzer UC Finder Windows UC Finder EM-1240-LX User’s Manual UC Finder EM-1240-LX User’s Manual UC Finder Linux UC Finder Busybox µClinux normal command utility collection System CommandsFile manager EditorProcess NetworkOther Moxa Special UtilitiesSnmp Agent with MIB II & RS-232 Like Group Ip MIB Tcp MIB Udp MIB Snmp Agent with MIB II & RS-232 Like GroupRFC1317 RS-232 like group supported variables Rs232 MIB Snmp MIBEM-1240-LX FAQ Service Information Following services are provided Moxa Internet ServicesMoxa Product † EM-1240-LX Serial Number Problem Report FormProduct Return Procedure