Moxa Technologies EM-1240-LX User Manual

Browse online or download User Manual for Networking Moxa Technologies EM-1240-LX. Moxa Technologies EM-1240-LX User`s manual

  • Download
  • Add to my manuals
  • Print

Summary of Contents

Page 1 - EM-1240-LX User’s Manual

EM-1240-LX User’s Manual Fourth Edition, September 2008 www.moxa.com/product © 2008 Moxa Inc., All rights reserved. Reproduction without permision i

Page 2

EM-1240-LX User’s Manual Introduction EM-1240 Embedded Module EM-1240 Development Kit 1-6

Page 3 - Table of Contents

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

Page 4

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

Page 5 - Introduction

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

Page 6 - Product Features

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

Page 7 - Product Specifications

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

Page 8 - Software Specifications

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

Page 9 - Appearance

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

Page 10 - EM-1240 Development Kit

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

Page 11 - Installing the EM-1240-LX

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

Page 12 - Wiring Requirements

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

Page 13 - Grounding the EM-1240-LX

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

Page 14 - Serial Console Port

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

Page 15 - Additional Functions

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

Page 16 - Real-time Clock

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

Page 17 - Getting Started

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

Page 18 - Powering on the EM-1240-LX

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: #

Page 19

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

Page 20

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

Page 21

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

Page 22 - Compiler

EM-1240-LX User’s Manual Software Package Flash Context Flash Address Size Access control Boot loader 0 – 0x3ffff 256 K Read ONLY Kernet &

Page 23 - Compiling Hello.c

Table of Contents Chapter 1 Introduction ...1-1 Overv

Page 24

EM-1240-LX User’s Manual Software Package 3-4EM-1240-LX Software Package bin dev upkernel passwd -> tinylogin login -> tinylogin tinylogin

Page 25

EM-1240-LX User’s Manual Software Package bin dev ptyp0 ppp pio rtc ram1 ram0 null kmem mem cua0 console tty 3-5

Page 26 - Make File Example Code

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

Page 27 - Software Package

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

Page 28

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

Page 29

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

Page 30

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

Page 31

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

Page 32 - Configuring the EM-1240-LX

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

Page 33

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

Page 34 - IPTABLES

Enabling NAT at Bootup... 4-7 Configuring Dial-in/Dial-out

Page 35

EM-1240-LX User’s Manual Configuring the EM-1240-LX <ETHERNET_INTERFACE>: Ethernet card connected to ADSL modem, for example, eth0 <USER_NAM

Page 36

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

Page 37 - Append or delete rules:

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

Page 38 - Enabling NAT at Bootup

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

Page 39 - Configuring PPPoE

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 “

Page 40

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

Page 41 - Upgrading the Kernel

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

Page 42

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

Page 43 - Loading Factory Defaults

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.

Page 44

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

Page 45 - EM-1240-LX Device API

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

Page 46 - UART Interface

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

Page 47 - API List

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

Page 48 - How to use the GPIO

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

Page 49 - GPIO Library Source Code

AA Appendix A System Commands busybox: µClinux normal command utility collection File manager cp copy file ls list file ln make symbolic link file

Page 50

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

Page 51

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

Page 52

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

Page 53 - System Commands

EM-1240-LX User’s Manual SNMP Agent with MIB II & RS-232 Like Group B-3snmp MIB snmpInPkts snmpOutPkts snmpInBadVersions snmpInBadCommunityNames

Page 54 - Moxa Special Utilities

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

Page 55

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

Page 56

EM-1240-LX User’s Manual Introduction Product Specifications Hardware Specifications Model EM-1240 Embedded Module CPU Moxa ART ARM9 32-bit 192 MHz

Page 57

EM-1240-LX User’s Manual Introduction Software Specifications Kernel µClinux Kernel 2.6.9 Supports dynamic driver module load / unload Protocol Stack

Page 58 - EM-1240-LX FAQ

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

No comments