EM-1240-LX User’s Manual Fourth Edition, September 2008 www.moxa.com/product © 2008 Moxa Inc., All rights reserved. Reproduction without permision i
EM-1240-LX User’s Manual Introduction EM-1240 Embedded Module EM-1240 Development Kit 1-6
EM-1240-LX User’s Manual Introduction Dimensions EM-1240 Embedded Module EM-1240 Development Kit Installing the EM-1240-LX If you would like to use
EM-1240-LX User’s Manual Introduction LED Indicators The following table explains the function of the five LED indicators located on the EM-1240-LX’s
EM-1240-LX User’s Manual Introduction Connecting the Power Connect the “live-wire” end of the 12-48 VDC power adaptor to the EM-1240-LX’s terminal bl
EM-1240-LX User’s Manual Introduction The 10/100 Mbps Ethernet LAN 1 and LAN 2 ports use 8-pin RJ45 connectors. Pinouts for these ports are given in
EM-1240-LX User’s Manual Introduction Internal SD Socket The EM-1240-LX provides an internal SD socket for storage expansion. It allows users to plug
EM-1240-LX User’s Manual Introduction Real-time Clock The EM-1240-LX’s real time clock is powered by a lithium battery. We strongly recommend that yo
22 Chapter 2 Getting Started In this chapter, we explain the basic procedure for getting the EM-1240-LX connected and ready for your needs. In this
EM-1240-LX User’s Manual Getting Started Powering on the EM-1240-LX Connect the SG wire to the Shielded Contact located on the upper left corner of t
EM-1240-LX User’s Manual Getting Started Telnet If you know at least one of the two IP addresses and netmasks, then you can use Telnet to connect to
EM-1240-LX User’s Manual The software described in this manual is furnished under a license agreement and may be used only in accordance with the ter
EM-1240-LX User’s Manual Getting Started Configuring the Ethernet Interface In this section, we use the serial console to explain how to modify the E
EM-1240-LX User’s Manual Getting Started 3. You may also configure the EM-1240-LX to request IP addresses from a DHCP server. In this case, use the
EM-1240-LX User’s Manual Getting Started Installing a Secure Digital (SD) Memory Card The EM-1240-LX provides an internal SD socket for storage expan
EM-1240-LX User’s Manual Getting Started Installing the EM-1240-LX Tool Chain Linux The PC must have the Linux Operating System pre-installed to inst
EM-1240-LX User’s Manual Getting Started Uploading “Hello” to the EM-1240-LX To use FTP to upload hello to the EM-1240-LX, issue the following comma
EM-1240-LX User’s Manual Getting Started Running “Hello” on the EM-1240-LX To run the Hello program issue the following commands on the EM-1240-LX: #
EM-1240-LX User’s Manual Getting Started 2-10Make File Example Code The following Make File example codes are copied from the Hello example on the E
33 Chapter 3 Software Package This chapter includes information about the software that is used with EM-1240-LX Series products. In this chapter, w
EM-1240-LX User’s Manual Software Package EM-1240-LX Software Architecture The pre-installed µClinux Operating System used by the EM-1240-LX follows
EM-1240-LX User’s Manual Software Package Flash Context Flash Address Size Access control Boot loader 0 – 0x3ffff 256 K Read ONLY Kernet &
Table of Contents Chapter 1 Introduction ...1-1 Overv
EM-1240-LX User’s Manual Software Package 3-4EM-1240-LX Software Package bin dev upkernel passwd -> tinylogin login -> tinylogin tinylogin
EM-1240-LX User’s Manual Software Package bin dev ptyp0 ppp pio rtc ram1 ram0 null kmem mem cua0 console tty 3-5
44 Chapter 4 Configuring the EM-1240-LX In this chapter, we describe how to configure the EM-1240-LX Series products. The following topics are cove
EM-1240-LX User’s Manual Configuring the EM-1240-LX Enabling and Disabling Daemons The following daemons are enabled when the EM-1240-LX boots up for
EM-1240-LX User’s Manual Configuring the EM-1240-LX Adding a Web Page Default Home Page address: /home/httpd/index.html You may change the default ho
EM-1240-LX User’s Manual Configuring the EM-1240-LX Source NAT (SNAT)—changes the first source packet IP address Destination NAT (DNAT)—changes the f
EM-1240-LX User’s Manual Configuring the EM-1240-LX The EM-1240-LX supports the following sub-modules. Be sure to use the module that matches your ap
EM-1240-LX User’s Manual Configuring the EM-1240-LX Examples: # iptables -L -n In this example, since we do not use the -t parameter, the system use
EM-1240-LX User’s Manual Configuring the EM-1240-LX Example 5: Drop TCP packets addressed for port 21. # iptables –A INPUT –i eth0 –p tcp --dport 21
EM-1240-LX User’s Manual Configuring the EM-1240-LX Configuring Dial-in/Dial-out Service Dial-out Service Direct cable connection: y Without usernam
Enabling NAT at Bootup... 4-7 Configuring Dial-in/Dial-out
EM-1240-LX User’s Manual Configuring the EM-1240-LX <ETHERNET_INTERFACE>: Ethernet card connected to ADSL modem, for example, eth0 <USER_NAM
EM-1240-LX User’s Manual Configuring the EM-1240-LX Upgrading the Kernel The EM-1240-LX kernel is em1240-1.x..bin, which can be downloaded from www.m
EM-1240-LX User’s Manual Configuring the EM-1240-LX Upgrading the Root File System & User Directory The EM-1240-LX uses JFFS2 for the root file s
EM-1240-LX User’s Manual Configuring the EM-1240-LX User Directory Backup—EM-1240-LX to PC To enable the RAM disk, use the following commands: />u
EM-1240-LX User’s Manual Configuring the EM-1240-LX 4-13Mirroring the Application Program and Configuration For some applications, you may need to “
55 Chapter 5 EM-1240-LX Device API In this chapter, we discuss the Device API for the EM-1240-LX Series. We introduce the APIs for the following fu
EM-1240-LX User’s Manual EM-1240-LX Device API RTC (Real-time Clock) The device node is located at /dev/rtc. The EM-1240-LX supports µClinux standard
EM-1240-LX User’s Manual EM-1240-LX Device API GPIO GPIO stands for General Purpose I/O. GPIOs are user-programmable, and can be used for either digi
EM-1240-LX User’s Manual EM-1240-LX Device API int set_gpio_mode(unsigned int pio, int mode) --to configure GPIO ports to be DI ports or DO ports.
EM-1240-LX User’s Manual EM-1240-LX Device API Limits 1. Both the SD card and GPIO share the same signals. To enable the GPIO, the SD card must be d
11 Chapter 1 Introduction The Moxa EM-1240-LX Series of Mini RISC-based Ready-to-Run Embedded Computer features dual 10/100 Mbps Ethernet ports and
EM-1240-LX User’s Manual EM-1240-LX Device API typedef struct gpio_set_struct { int io_number; int mode_data; } gpio_t; /* * To get the GPIO mo
EM-1240-LX User’s Manual EM-1240-LX Device API close(fd); return GPIO_ERROR; } close(fd); return pset.mode_data; } /* * To set the GPIO n
EM-1240-LX User’s Manual EM-1240-LX Device API 5-8 CHECK_GPIO_NO(gpio_no); CHECK_GPIO_DATA(data); fd = open(GPIO_DEVICE_NODE, O_RDWR); if ( fd
AA Appendix A System Commands busybox: µClinux normal command utility collection File manager cp copy file ls list file ln make symbolic link file
EM-1240-LX User’s Manual System Commands A-2Network ping ping to test network route routing table manager netstat display network status ifconfig se
BB Appendix B SNMP Agent with MIB II & RS-232 Like Group The EM-1240-LX has a built-in SNMP (Simple Network Management Protocol) agent that sup
EM-1240-LX User’s Manual SNMP Agent with MIB II & RS-232 Like Group ip MIB tcp MIB udp MIB ipForwarding ipDefaultTTL ipInReceives ipInHdrErrors
EM-1240-LX User’s Manual SNMP Agent with MIB II & RS-232 Like Group B-3snmp MIB snmpInPkts snmpOutPkts snmpInBadVersions snmpInBadCommunityNames
CC Appendix C EM-1240-LX FAQ FAQ 1 Why can I only use vfork( ),and am not able to use fork( )? Answer 1 μClinux only supports vfork( ). It does n
EM-1240-LX User’s Manual Introduction Overview The EM-1240-LX Series of mini RISC-based communication platforms are ideal for your embedded applicati
EM-1240-LX User’s Manual Introduction Product Specifications Hardware Specifications Model EM-1240 Embedded Module CPU Moxa ART ARM9 32-bit 192 MHz
EM-1240-LX User’s Manual Introduction Software Specifications Kernel µClinux Kernel 2.6.9 Supports dynamic driver module load / unload Protocol Stack
EM-1240-LX User’s Manual Introduction Hardware Block Diagram RS-23216 MBSDRAMMOXA ART CPU32-bit ARM9192 MHzLAN 1PHYMACLAN 2 PHYMACPowerCircuitWatchdo
Comments to this Manuals