Home
Sony KDL-52WL135 Flat Panel Television User Manual
Contents
1. 12345 RS 485 RS 485 Pin RS 232 RS 422 vive o wire 1 DCD TxDA TxDAC 2 2 RxD TxDB TxDB E 3 TxD RxDB RxDB DataB 4 4 DTR RxDA RxDAC DataA 6789 5 GND GND GND GND 6 DSR m 7 RTS 8 CTS EM 1240 LX User s Manual Introduction Serial Console Port The serial console port is a 4 pin pin header RS 232 port It is designed for serial console terminals which are useful for identifying the EM 1240 L X boot up message Serial Console Port amp Pinouts Serial Console Cable Pin Signal 1 TxD 2 RxD ap 3 NC s i 4 GND m Internal SD Socket The EM 1240 LX provides an internal SD socket for storage expansion It allows users to plug in a Secure Digital SD memory card compliant with the SD 1 0 standard for up to 1 GB of additional memory space To install an additional SD card you must first remove the EM 1240 LX s outer cover to access the slot The internal SD socket is located at the backside of the EM 1240 LX bottom board you can find the SD plug in slot at the right of the EM 1240 L X lower than the cover screw Plug the SD card into the socket directly and remember to press the SD card first if you want to take it out Please note that the SD function shares the same chipset with DIO If you would like to enable SD function the DIO must be disabled If you would like to enable DIO the SD function
2. EM 1240 LX User s Manual Software Package EM 1240 LX Software Package bin dev upkernel mtdblock1 passwd gt tinylogin mtdr1 login gt tinylogin mtd1 tinylogin mtdblock0 telnetd mtdr0 snmpd mtd0 mail cuml sh cum0 routed ttyMI netstat ttyMO arp urandom chat random pppd Zero portmap ttypf ntpdate ttype necid ttypd eraseall ttypc kversion ttypb init ttypa expand ttyp9 inetd ttyp8 hwclock ttyp7 ftpd ttyp6 ftp ttyp5 mke2fs ttyp4 e2fsck ttyp3 discard ttyp2 dheped ttypl cpu ttyp0 busybox ttySO boa tty3 bf tty2 backupfs ttyl downramdisk ttyO upramdisk roml rom0 ptypf ptype ptypd ptypc ptypb ptypa ptyp9 ptyp8 ptyp7 ptyp ptyp ptyp4 ptyp3 ptyp2 ptypl 3 4 EM 1240 LX User s Manual Software Package bin dev ptypO Ppp pio rtc raml ram0 null kmem mem cua console tty 3 5 4 Configuring the EM 1240 LX In this chapter we describe how to configure the EM 1240 LX Series products The following topics are covered in this chapter DOCU m DODCODCDOOCUOCOULD Enabling and Disabling Daemons Adding a Web Page IPTABLES NAT gt NAT Example Enabling NAT at Bootp Configuring Dial in Dial out Service gt Dial out Service gt Daial in Service Configuring PPPoE How to Mount a Remote NFS Server Dynamic Driver Module Load Unload Upgrading the Kernel Upgrading the Root File System amp User Directory U
3. FAQI1 Answer 1 FAQ2 Answer 2 FAQ3 Answer 3 Why can I only use vfork and am unable to use fork uClinux only supports vfork It does not support fork Note that when using vfork the parent process will hang until the child process calls an exec group API or exits When using a pthread group API why cannot I use SIGUSRI and SIGUSR2 Since a pthread group API uses SIGUSRI and SIGUSR2 to do a pthread control suspend restart exit function we cannot use the SIGUSRI and SIGUSR2 signals You will get the same result if you link the pthread This means that you cannot use 1pthread to add an option to the linker What is the correct format for linking to an API arm elf gcc W1 elf2flt In this example the API converts elf format to flat format D Service Information This appendix shows you how to contact Moxa for information about this and other products and how to report problems In this appendix we cover the following topics U Moxa Internet Services Q Problem Report Form U Product Return Procedure EM 1240 LX User s Manual Service Information Moxa Internet Services Customer satisfaction 1s our primary concern To ensure that customers receive the full benefit of our products Moxa Internet Services has been set up to provide technical support driver updates product information and user s manual updates The following services are provided E mail for technical suppor
4. MOXA_SET_OP_MODE int mode mode which mode you want to set int ioctl fd MOXA SET OP MODE amp mode Description Sets the interface mod 2 Function MOXA GET OP MOD LH int mode int ioctl fd MOXA GET OP MODE amp mode Description Gets the interface mod 6 UC Finder The EM 1240 LX comes with a UC Finder utility which has the sole purpose of searching the LAN or intranet for the EM 1240 LX units For most of the applications it is not easy to remember the IP addresses of Universal Communicators connected to the LAN This is especially true for some problem solving and testing in the field The UC Finder utility broadcasts messages over the LAN to search for IP addresses of Universal Communicators connected to the LAN UC Finder searches for the class of MAC addresses assigned to Universal Communicators The EM 1240 LX supports the GUI style Windows UC Finder and a command line utility for Linux environments In this chapter we discuss the following UC Finder topics LJ Windows UC Finder L Linux UC Finder EM 1240 LX User s Manual UC Finder Windows UC Finder The following steps describe how to install UC Finder on a Windows PC 1 Double click the UC Finder installation program Setup exe to start the installation 2 When the Welcome to the UC Finder Setup Wizard window opens click Next to continue 15 xl Welcome to the UC Finder Setup Wizard i Setup UC Find
5. on the Embedded Module must be matched with the Pin marked JP4 on the Development Kit Be careful when inserting the module to avoid damaging the product LED Indicators The following table explains the function of the five LED indicators located on the EM 1240 LX s top panel LED Name LED Color LED Function Ready Green Power is on and functioning normally P1 P2 Tx Green Serial port 1 or 2 is transmitting data Off Serial port 1 or 2 is not transmitting data P1 P2 Rx Yellow Serial port 1 or 2 is receiving data Off Serial port 1 or 2 is not receiving data Wiring Requirements This section describes how to connect the EM 1240 LX to serial devices You should heed the following common safety precautions before proceeding with the installation of any electronic device e Use separate paths to route wiring for power and devices If power wiring and device wiring paths must cross make sure the wires are perpendicular at the intersection point NOTE Do not run signal or communication wiring and power wiring in the same wire conduit To avoid interference wires with different signal characteristics should be routed separately Usethe type of signal transmitted through a wire to determine which wires should be kept separate The rule of thumb is that wiring that shares similar electrical characteristics can be bundled together e Keep input wiring and output wiring separate e tis advis
6. 255 255 0 Telnet can be used locally by using a crossover Ethernet cable to connect your computer to the EM 1240 LX or over a LAN or the Internet The default IP addresses and netmasks are shown above To login type the Login name and password as requested The defaults are Login root Password root e Telnet 192 168 3 127 oxa con tw login root Password lelcone to Product EM 1240 Serie For further information check http www noxa con tu BusyBox v1 88 2885 12 88 87 21 0888805 Built in shell neh Enter help for a list of built in commands Once you open the msh command shell you can proceed to configure the EM 1240 LX s network settings as described in the next section LY ENTION e Serial Console Reminder Remember to choose VT100 as the terminal type Use the CBL RJ45F9 150 cable that comes with the EM 1240 LX to connect to the serial console port If you are not able to conect on the first try unplug and then re plug the EM 1240 LX s power cord Telnet Reminder When connecting to the EM 1240 LX over a LAN you must configure your PC s Ethernet card to be on the same subnet as the EM 1240 LX you wish to contact 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 EM 1240 LX s network settings 1 Change directories by issuing the command cd etc Product EM 1240 Series For f
7. PC to compile Hello c cd tmp mkdir example cp r mnt cdrom example tmp example Go to the Hello subdirectory and then issue the command EM 1240 LX User s Manual Getting Started make to compile Hello c Finally execute the program to generate hello and hello gdb alhost helloj ls al root r 1f2f1t ld Uploading Hello to the EM 1240 LX To use FTP to upload hello to the EM 1240 LX issue the following commands on the PC ftp 192 168 3 127 ftp cd home ftp bin ftp put hello ftp quit telnet 192 168 3 127 ORE RE RPP RP RR 1 0 10 1 er complete WD command successful pud mnt home is current directory 2 10 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 chmod 755 hello hello The words hello world are printed on the screen cx Telnet 192 168 3127 Ht HHH fH HH HH E HHH it HHHHHH EIL ME EMEILIEIDLIMEIL nat ion check ATTENTION Be sure to calculate the amount of Flash Memory used by the User File System in the Flash ROM Use one of the following two commands to determine the amount of memory being used df k or 4 df lk blocks Used Available Use Mounted on 1525 1825 0 100 1525 1525 0 100 4096 688 3408 17 If the flash memory is full you will no longer be able to save data in Flash ROM To free up some memory
8. SG wire to an appropriate grounded metal surface Connecting Data Transmission Cables This section describes how to connect the EM 1240 LX to the network serial devices and serial COM terminal EM 1240 LX User s Manual Introduction Connecting to the Network Connect one end of the Ethernet cable to the EM 1240 LX s 10 100M Ethernet port and the other end of the cable to the Ethernet network If the cable is properly connected the EM 1240 LX will indicate a valid connection to the Ethernet in the following ways e Thetop right LED on the connector glows a solid green when connected to a 100 Mbps Ethernet network e Thetop left LED on the connector glows a solid orange when connected to a 10 Mbps Ethernet network e The LEDs will flash when Ethernet packets are being transmitted or received The 10 100 Mbps Ethernet LAN 1 and LAN 2 ports use 8 pin RJ45 connectors Pinouts for these ports are given in the following diagram 8 pin RJ45 10 Mbps 100 Mbps Pin Signal indicator indicator 1 ETx 3 i 2 ETx 3 ERx 4 m 5 ew 1 8 6 ERx 7 8 EE Connecting to a Serial Device Connect the serial cable between the EM 1240 LX and the serial device s Serial ports P1 and P2 use male DB9 connectors and can be configured for RS 232 422 485 by software The pin assignments are shown in the following table RS 232 422 485 Pinouts DB9 Male Port
9. Specifies the target of the rules i e how to handle matched packets For example ACCEPT the packet DROP the packet or LOG the packet Example 1 Accept all packets from lo interface iptables A INPUT i lo j ACCEPT Example 2 Accept TCP packets from 192 168 0 1 iptables A INPUT i eth0 p tcp s 192 168 0 1 j ACCEPT Example 3 Accept TCP packets from Class C network 192 168 1 0 24 iptables A INPUT i eth0 p tcp s 192 168 1 0 24 j ACCEPT Example 4 Drop TCP packets from 192 168 1 25 iptables A INPUT i eth0 p tcp s 192 168 1 25 j DROP Example 5 Drop TCP packets addressed for port 21 iptables A INPUT i eth0 p tcp dport 21 j DROP Example 6 Accept TCP packets from 192 168 0 24 to the EM 1240 LX s port 137 138 139 iptables A INPUT i ethO p tcp s 192 168 0 24 dport 137 139 j ACCEPT Example 7 Drop all packets from MAC address 01 02 03 04 05 06 iptables A INPUT i eth0 p all m mac mac source 01 02 03 04 05 06 j DROP EM 1240 LX User s Manual Configuring EM 1240 LX NAT NAT Network Address Translation protocol translates IP addresses used on one network into different IP addresses used on another network One network is designated the inside network and the other is the outside network Typically the EM 1240 LX connects several devices on a network and maps local inside network addresses to one or more global outside IP addresses and remaps the global IP addresses on incoming p
10. V Formating disk t Erased 2560 Kibyte 0 100 complete Format OK Now update the root filesystem Please wait Update the root file system OK Please push the reset button User Directory Backup EM 1240 LX to PC To enable the RAM disk use the following command gt upramdisk gt cd ramdisk Use the backupfs command to backup the file system ramdisk gt backupfs ramdisk usrdisk backup backupfs ramdisk usrdisk backup Sync the file system ow backup the user directory Please wait ackup the user directory CK l l The file system will be backed up Use ftp commands to transfer the usrdisk backup to the FTP server on the PC EM 1240 LX User s Manual Configuring EM 1240 LX cd ramdisk ramdisk 1s al 0 4194304 usrdisk backup ramdisk ftp 2 168 3 Conne asm S 220 TYPSoft FIP Server 1 10 ready Name 192 168 3 11 root root 331 Password required for root Password 230 User root logged in usrdisk backup 150 Cpening data connection for usrdisk backup 226 File received complete 4195224 bytes sent in 37 secs 113 Kbytes sec ftp v Loading Factory Defaults The easiest way to Load Factory Defaults is with the Upgrade User directory operation Refer to the previous section How to Upgrade User Directory for an introduction You may also press the RESET button for more than 5 seconds to load the factory default configuration or input
11. eee td ed eee ode e er RE HET Hen 4 3 NUT order 0s Mi lace cies us on MNT PM el E A 4 7 Chapter 5 Chapter 6 Appendix A Appendix B Appendix C Appendix D Enabling NAT t Boot p ibus gie id p e de URN atus 4 7 Configuring Dial in Dial out Service esses eene 4 8 Dial ut Service nisnin BAB teen eite ate ene nie etel aste a ober 4 8 Dial in Service eo sciet ete ne e tee ed 4 8 Configuring PPPOE nn te rep eet tee es leer ep m etes 4 8 How to Mount a Remote NFS Server cccceecceeseeceseeeeseeceseeeeseeceeeseneeceeeeaeceeeeeesaeceereeeaaeesees 4 9 Dynamic Driver Module Load Unload sese 4 9 Upgrading the Kernel eee eee etnies i fee iHd ded OS 4 10 Upgrading the Root File System amp User Directory sesssssseseeeeeee 4 11 User Directory Backup EM 1240 LX to PC sese enne 4 12 Loading Factory Defaults 4 oues aee Ie PR eee UR tU EXER elt ene ae 4 13 Mirroring the Application Program and Configuration eese 4 13 Autostarting User Applications on Bootup ccccesscesscessceseceseceseccenaecsaecaeecaeeeaeesaeenseeereees 4 13 Checking the Kernel and Root File System Versions sss 4 13 EM 1240 LX Device API 5 2 cere erc iced eere cr o cocos rere cones 5 1 RTC Realtime Clock eee etra de reet cae Ea ee eene rM CIS 5 2 vac 5 2 UART Intetface ooi e
12. install Also choose a few installation parameters Root Directory cue Browse Install For r Default Text File Type All Users Recommend C DOS C Just Me Unis Recommend lt t RH EM 1240 LX User s Manual Getting Started Step 3 Click Next to select the local package files directory and then click Browse to select where your installation source is The default path is the location of the setup exe file B Moxa EM 12xx serial Tool Chain Setup Select Local Package Directory r Select Local Package Directory Select the directory where the package files of Tool Chain exist m Local Package Directory Browse 11 indows toolchaintoolchain sourceM oxalUlti lt t Biti Step 4 Click Next to begin the package installation You will see a progress bar that appears to check the MDS status of each software package Click Next to let the installer finish the installation ATTENTION You can download the Tool Chain from Moxa s website go to the EM 1240 LX product page click the Documentation amp Drivers link and then click Go under Driver amp Software Downloads Compiling Hello c The Tool Chain path is PATH usr local arm elf bin PATH The EM 1240 LX CD includes several example programs We use Hello c to illustrate how to compile and run applications Issue the following commands from your
13. listed ma Searching EM 1240 DOSOESOR0083 192 168 4127 7 When the search is complete the Broadcast Search window closes and the Model MAC Address and IP Address of all Universal Communicators that were located will be listed in the UC Finder window 00 90 E8 00 00 83 192 168 4127 6 4 EM 1240 LX User s Manual UC Finder ATTENTION UC finder is designed solely to find IP addresses of networked Universal Communicators It cannot be used to configure Universal Communicators over the network If you need to configure UC s IP address or other parameters connect to UC s console utility by Telnet over the network or serial console using the serial console cable that came with the product The next time you need to run UC Finder double click the UC Finder icon located on your PC s desktop to launch this utility 9 UC Finder Linux UC Finder To use the Linux ucfinder utility copy ucfinder from the CD ROM to your Linux PC and then use the following command to start ucfinder The ucfinder utility will automatically broadcast a message over your LAN network to find the IP addresses of all UC s connected to the LAN ucfinder A System Commands busybox uClinux normal command utility collection File manager Editor cp copy file Is list file In make symbolic l
14. the command Idfactory in telnet console to restore the factory defaults Mirroring the Application Program and Configuration For some applications you may need to Mirror or sometimes Ghost one EM 1240 LX s user directory and duplicate it to other EM 1240 LXs To do this use the following recommended procedure 1 Backup the user directory to a PC Refer to the previous topic User Directory Backup EM 1240 LX to a PC Hint ramdisk gt backupfs ramdisk lt user defined file name gt 2 Download the backed up user directory to the other EM 1240 LX Refer to the previous topic Upgrading the User Directory Hint ramdisk bf ramdisk User directory file name Autostarting User Applications on Bootup Edit the etc rc file by adding your application program E g ap directory ap program amp Checking the Kernel and Root File System Versions Use the following commands to check the version of the kernel and root file system To check the kernel version gt kversion EM 1240 LX User s Manual Configuring EM 1240 LX To check the root file system firmware version of the EM 1240 L X type gt fsversion You may also check the user directory version of the EM 1240 LX by using the following command gt cat etc version 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 func
15. use the console cable to connect to the EM 1240 LX s serial console terminal and then delete files from the Flash ROM EM 1240 LX User s Manual Getting Started Make File Example Code The following Make File example codes are copied from the Hello example on the EM 1240 LX s CD ROM srcdir LIBS CFLAGS LDFLAGS Wl elf2flt CC arm elf gcc CPP arm elf gcc all hello hello CC o 8 S CFLAGS clean rm f OBJS hello core gdb Change these if necessary LDFLAGS e 3 Software Package This chapter includes information about the software that is used with EM 1240 L X Series products In this chapter we cover the following topics QO EM 1240 LX Software Architecture gt Journaling Flash File System JFFS2 CL EM 1240 LX Software Package EM 1240 LX User s Manual Software Package EM 1240 LX Software Architecture The pre installed uClinux Operating System used by the EM 1240 LX follows the standard uClinux architecture making programs that follow the POSIX standard easily ported to the EM 1240 LX by using the GNU Tool Chain provided by www uClinux org In addition to the Standard POSIX API device drivers for the buzzer and UART for the serial ports are also included User Application API Application Interface POSIX Socket Factory Default Configuration etc home Protected System Configuration rc amp boot parameters IP Co
16. AdEntBcastAddr ipAdEntReasmMaxSize ipRouteTable ipRouteDest ipRoutelfIndex ipRouteMetricl ipRouteMetric2 ipRouteMetric3 ipRouteMetric4 ipRouteNextHop ipRouteType ipRouteProto ipRouteAge ipRouteMask ipRouteMetric5 ipRouteInfo ipNetToMediaTable ipNetToMedialfIndex ipNetToMediaPhysA ddress ipNetToMediaNetA ddress ipNetToMediaType ipRoutingDiscards EM 1240 LX User s Manual SNMP Agent with MIB Il amp RS 232 Like Group snmp MIB snmpInPkts snmpOutPkts snmpInBad Versions snmpInBadCommunityNames snmpInBadCommunity Uses snmpInASNParseErrs snmpInTooBigs snmpInNoSuchNames snmpInBad Values snmpInReadOnlys snmpInGenErrs snmpInTotalReq Vars snmpInTotalSetVars snmpInGetRequests snmpInGetNexts snmpInSetRequests snmpInGetResponses snmpInTraps snmpOutTooBigs snmpOutNoSuchNames snmpOutBadValues snmpOutGenErrs snmpOutGetRequests snmpOutGetNexts snmpOutSetRequests snmpOutTraps snmpEnableAuthenTraps RFC1317 RS 232 like group supported variables rs232 MIB rs232Number rs232PortTable rs232PortIndex rs232PortType rs232PortInSigNumber rs232PortOutSigNumber rs232PortInSpeed rs232PortOutSpeed rs232AsyncPortTable rs232AsyncPortIndex rs232AsyncPortBits rs232AsyncPortStopBits rs232AsyncPortParity rs232InSigTable rs232InSigPortIndex rs232InSigName rs232InSigState rs232OutSigTable rs232OutSigPortIndex rs2320utSigName rs232OutSigState C EM 1240 LX FAQ
17. EM 1240 LX User s Manual www moxa com product First Edition November 2006 Moxa Systems Co Ltd Tel 886 2 8919 1711 Fax 886 2 8919 1722 Web www moxa com Moxa Technical Support Worldwide support moxa com The Americas support usa moxa com 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 terms of that agreement Copyright Notice Copyright 2006 Moxa Systems Co Ltd All rights reserved Reproduction without permission is prohibited Trademarks Moxa is a registered trademark of The Moxa Group All other trademarks or registered marks in this manual belong to their respective manufacturers Disclaimer Information in this document is subject to change without notice and does not represent a commitment on the part of Moxa Moxa provides this document as is without warranty of any kind either expressed or implied including but not limited to its particular purpose Moxa reserves the right to make improvements and or changes to this manual or to the products and or the programs described in this manual at any time Information provided in this manual is intended to be accurate and reliable However Moxa assumes no responsibility for its use or for any infringements on the rights of third parties that may result from its use This product might include unintentional technical or typographical errors C
18. IX standard C library Windows Tool Chain UC Finder Arm elf gec V2 95 3 C C PC Cross Compiler uClibc V0 9 26 POSIX standard C library UC s LAN IP broadcast searching utility for Windows and Linux EM 1240 LX User s Manual Introduction Hardware Block Diagram Serial Console Debug Pot Serial Port 0 Serial Port 1 Serial Port 2 Serial Port 3 Appearance EM 1240 Embedded Module Development Kit EM 1240 EM 1240 Development Kit Embedded Module 1 5 EM 1240 LX User s Manual Introduction EM 1240 Embedded Module MOXA ART ARM9 Communication Processor PH163112G YCL 0606 onboard 16 MB RAM EM 1240 Development Kit JP4 Power LED Indictors 1 4 PIN Header Ready DNE Serial Port 1 10 100 Mbps JP6 PIN Header LAN Port x 2 Power Input Power Switch Serial Port 2 Power Input GPIO PIN Headr SD Socket Console Port Serial Port 4 Serial Port 3 EM 1240 LX User s Manual Introduction Dimensions EM 1240 Embedded Module EM 1240 Development Kit EM 1240 LX User s Manual Introduction Installing the EM 1240 LX If you would like to use the EM 1240 Embedded Module and the EM 1240 Development Kit insert the EM 1240 Embedded Module vertically onto the Development Kit Note that the pin marked JP4 on the Embedded Module must be matched with the pin marked JP6 on the Development Kit and the Pin marked JP3
19. T FORWARD PREROUTING OUTPUT POSTROUTING ACCEPT DROP P INPUT OUTPUT FORWARD PREROUTING To alter packets as soon as they come in POSTROUTING To alter packets as they are about to be sent out Examples iptables iptables iptables iptables iptables iptables p P P mi t t Set the policy for the chain to the given target For packets coming into the EM 1240 LX For locally generated packets For packets routed out through the EM 1240 LX INPUT DROP OUTPUT ACCEPT FORWARD ACCEPT nat P PREROUTING ACCEPT nat P OUTPUT ACCEPT nat P POSTROUTING ACCEPT In this example the policy accepts outgoing packets and denies incoming packets Append or delete rules Usage iptables t table AI INPUT OUTPUT FORWARD io interface p tcp udp icmp all s IP network sport ports d IP network dport ports j ACCEPT DROP A I zi 0 p sport d dport J Examples Append one or more rules to the end of the selected chain Insert one or more rules in the selected chain as the given rule number Name of an interface via which a packet is going to be received Name of an interface via which a packet is going to be sent The protocol of the rule or of the packet to check Source address network name host name network IP address or plain IP address Source port number Destination address Destination port number Jump target
20. able to label the wiring to all devices in the system EM 1240 LX User s Manual Introduction ATTENTION Safety First Be sure to disconnect the power cord before installing and or wiring your EM 1240 LX Wiring Caution Calculate the maximum possible current in each power wire and common wire Observe all electrical codes dictating the maximum current allowable for each wire size If the current goes above the maximum ratings the wiring could overheat causing serious damage to your equipment Temperature Caution Be careful when handling the EM 1240 LX When plugged in the EM 1240 LX s internal components generate heat and consequently the outer casing may feel hot to the touch Connecting the Power Connect the live wire end of the 12 48 VDC power adapter to the EM 1240 LX s terminal block If the power is properly supplied the Ready LED will glow a solid green after a 25 to 30 second delay Grounding the EM 1240 LX Grounding and wire routing help limit the effects of noise due to electromagnetic interference EMI Run the ground wire from the ground screw to the grounding surface prior to connecting devices ATTENTION This product should be mounted to a well grounded mounting surface such as a metal panel SG l SG The Shielded Ground sometimes called Protected Ground contact is the left most contact of the 3 pin power terminal block connector when viewed from the angle shown here Connect the
21. access We recommend using the Serial Console to set up IPTABLES Click on the following links for more information about iptables http www linuxguruz com iptables http www netfilter org documentation HOW TO packet filtering HOW TO html Since the IPTABLES command is very complex to illustrate the IPTABLES syntax we have divided our discussion of the various rules into three categories Observe and erase chain rules Define policy rules and Append or delete rules Observe and erase chain rules Usage iptables t tables L n t tables Table to manipulate default filter example nat or filter L chain List List all rules in selected chains If no chain is selected all chains are listed n Numeric output of addresses and ports iptables t tables FXZ F Flush the selected chain all the chains in the table if none is listed X Delete the specified user defined chain Z Set the packet and byte counters in all chains to zero Examples iptables L n In this example since we do not use the t parameter the system uses the default filter table Three chains are included INPUT OUTPUT and FORWARD INPUT chains are accepted automatically and all connections are accepted without being filtered iptables F iptables X iptables Z EM 1240 LX User s Manual Configuring EM 1240 LX Define policy for chain rules Usage iptables t tables P INPUT OUTPU
22. ackets back into local IP addresses NOTE Click the following link for more information about iptables and NAT http www netfilter org documentation HOWTO NAT HOWTO html NAT Example The IP addresses of all packets leaving LANI are changed to 192 168 3 127 you will need to load the module ipt MASQUERADE IP Netmask 192 168 3 100 24 Gateway 192 168 3 127 PCI Linux or Windows LANI eth 192 168 3 127 24 UcC 710 LAN2 ethl 192 168 4 127 24 PC2 Linux or Windows IP Netmask 192 1 68 4 100 24 Gateway 192 168 4 127 NAT Area Private IP 1 echo 1 gt proc sys net ipv4 ip forward 2 iptables t nat A POSTROUTING o eth0 j SNAT to source 192 168 3 127 or 3 iptables t nat A POSTROUTING o eth0 j MASQUERADE Enabling NAT at Bootup In most real world situations you should use a simple shell script to enable NAT when the EM 1240 LX boots up as indicated by the following setting iptables iptables save gt home xxx file xxx file is the user defined file name vi etc rc Append echo 1 gt proc sys net ipvA ip forward Append iptables restore home xxx file xxx file is the user defined file name tom Ur par EM 1240 LX User s Manual Configuring EM 1240 LX Configuring Dial in Dial out Service Dial out Service Direct cable connection e Without username and password use gt pppd connect chat v dev ttyMO 38400 crtscts amp e With username and pas
23. ain Debian 3 0R Woody Redhat 7 3 8 0 and compatible versions are recommended The Tool Chain requires about 100 MB of hard disk space on your PC The EM 1240 LX Tool Chain can be found on the EM 1240 LX CD To install the Tool Chain insert the CD into your PC and then issue the following command Cross Compiler r mount t iso9660 dev cdrom mnt cdrom Next run the following script as root to install the compilers linkers and libraries in the usr local directory sh mnt cdrom tool chain linux installer arm elf moxa toolchain 1 1 sh The Tool Chain installation will take a few minutes to complete Windows In addition to the Linux Tool Chain the Windows Tool Chain for the EM 1240 LX is in the official EM 1240 LX CD Please refer to the following installation procedure to install the EM 1240 LX Windows Tool Chain EM 1240 LX User s Manual Getting Started Step 1 Double click the tool chain windows setup exe on the EM 1240 LX CD to begin the installation then click Next F5 Moxa EM 12xx serial Tool Chain Setup Welcome Moxa Universal Communicator Tool Chain 1 0 Thank you for selecting Moxa Universal Communicator Tool Chain 1 0 Moxa Universal Communicator Tool Chain Copyright 2004 Moxa Technologies Co Ltd http www moxa com BE Moxa EM 12xx serial Tool Chain Setup Choose Installation Directory Select Root Install Directory Select the directory where you want to
24. board 16 MB RAM 8 MB Flash ROM e 4software selectable RS 232 422 485 serial ports e 210 100 Mbps Ethernet e RS 232 console full signal and PPP supported e Ready to run wCLinux Kernel 2 6 9 communication platform e SD signal supported EM 1240 LX User s Manual Introduction Product Specifications Hardware Specifications Model EM 1240 Embedded Module CPU MOXA ART ARMO 32 bit 192 MHz processor RAM 16 MB Flash 8 MB LAN Auto sensing 10 100 Mbps x 2 LAN Protection Built in 1 5 KV magnetic isolation Serial Port Four serial ports supporting RS 232 422 485 signals RS 232 signals TxD RxD DTR DSR RTS CTS DCD GND RS 422 signals TxD TxD RxD RxD GND 4 wire RS 485 signals TxD TxD RxD RxD GND 2 wire RS 485 signals Data Data GND Serial Protection 15 KV ESD for all signals Data bits 5 6 7 8 Stop bits 1 1 5 2 Parity None even odd space mark Flow Control RTC CTS XON XOFF Speed 50 bps to 921 6 Kbps support Any Baudrate Serial Console RS 232 x 1 TxD RxD DTR DSR RTS CTS DCD GND Storage Expansion SD signals for external Secure Digital SD socket connection GPIO GPIO x 10 to enable GPIO SD must be disabled Real time Clock Yes Watchdog Timer Yes Buzzer Signals Buzzer signals reserved for external buzzer connection LED Signals LAN 10 100 x 2 on LAN Connector Reserve signals for the followi
25. e te ope eco e Rete a E settore go 1 11 Additional Functions x nie I pet a et udi i NH URDU teas 1 11 Reset Button i e eie de pite dre tet iet ite Ei ase 1 11 Real time Clock 4e nto t oai d etd 1 12 Getting Started onere epe iuit ERU 2 1 Powering on the EM 1240 DX iei he eoe t dee eee Eee ale dte agn 2 2 Connecting the EM 1240 LX to a PC eene nnne 2 2 UI RE 2 2 PO CE d Pp 2 3 Configuring the Ethernet Interface sssesesesseseeeee eene enne 2 4 Installing a Secure Digital SD Memory Card sess 2 6 Developing Your Applications eerta ete Te E n RIEN TESTEN SIENNA UNEE US 2 7 Installing the EM 1240 LX Tool Chain eese 2 7 Gompiline Hello c 3x5 nei fet eroe ga n i I RE 2 9 Uploading Hello to the EM 1240 LX sess ener 2 10 Running Hello on the EM 1240 LX sess 2 11 Make File Example Code sse eere eene 2 12 Software Package octets teen nein Ls 3 1 EM 1240 LX Software Architecture ssssssssesesseeeen eene nnne 3 2 Journaling Flash File System JFFS2 essssseseseeeeeeeenee nenne 3 3 EM 1240 LX Software Package sese 3 4 Configuring the EM 1240 LX eeeeeeeeeeeeeeeeeeeeenen enne 4 1 Enabling and Disabling Daemons eeessesseseeeee enne 4 2 Adding Web Page esse ego DOPO a UE die 4 3 IPTABEES 5 eene eee e e aere ade
26. ent out one or both ifconfig lines and then add the setting about the dhcpcd into the rc file as below dhepcd p a eth amp dhepcd p a eth1 amp Note that the EM 1240 LX will send out DHCP broadcast packets and then get the IP addresses from the first DHCP server that responds E COM8 19200 None 8 1 V T190 bin sh um hostname moxa com tw org cat etc motd ars ifconfig ie 127 0 0 1 ethO 192 168 3 127 netmask 255 255 255 0 ethl 192 168 4 127 netmask 255 255 255 0 dhcped p a ethO amp tif you want DHCE please set this dhcpcd p a ethl amp if you want DHCE please set this route add default gw 192 168 3 254 dev ethO rtc clock to system clock lhwclock s nfs portmep IDortmap amp factory amp broadcast version necid amp simple snmp daemon isnmpd amp Loading your driver here uart driver for dev ttyMO dev ttyM1 insmod lib modules 2 6 9 MoXaRt kernel drivers char mxser ko etc rc modified line 1 of 36 2 State OPEN ers Dee Il loco Issue the vi write command to save the file and then reboot Since the EM 1240 LX only reads the rc file when booting up you must reboot e g by issuing the vi reboot command for the changes to take affect 2 5 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 expansion To access this socket perform
27. er This will install UC Finder on your computer It is recommended that you close all other applications before continuing Click Next to continue or Cancel to exit Setup 3 Select the Create a desktop icon option and then click Next to continue i Setup UC Finder iol xj Select Additional Tasks hy Which additional tasks should be performed Q INE Select the additional tasks you would like Setup to perform while installing UC Finder then click Next Additional icons lt Back Cancel 6 2 EM 1240 LX User s Manual UC Finder 4 Select the Launch UC Finder option to use UC Finder immediately after the installation has 5 finished and then click Next to complete the installation e Setup UC Finder Completing the UC Finder Setup Wizard Setup has finished installing UC Finder on your computer The application may be launched by selecting the installed icons Click Finish to exit Setup When the UC Finder window opens click Broadcast Search to search for all Universal Communicators connected to the LAN 2101x File Function About Broadcast Search No Model MAC Address IP Address Search Result 0 LiC s 7 EM 1240 LX User s Manual UC Finder 6 TheSearching window will show the Universal Communicators that have been located You can click Stop as soon as the Universal Communicator you are looking for is
28. es are defined with each table containing built in chains and user defined chains Each chain is a list of rules that apply to a certain type of packet Each rule specifies the action to be taken with a matching packet A rule such as a jump to a user defined chain in the same table is called a target The EM 1240 LX supports three types of IPTABLES tables Filter tables NAT tables and Mangle tables A Filter Table includes three chains INPUT chain OUTPUT chain FORWARD chain B NAT Table includes three chains PREROUTING chain transfers the destination IP address DNAT POSTROUTING chain works after the routing process and before the Ethernet device process to transfer the source IP address SNAT OUTPUT chain produces local packets sub tables Source NAT SNAT changes the first source packet IP address 4 3 EM 1240 LX User s Manual Configuring EM 1240 LX Destination NAT DNAT changes the first destination packet IP address MASQUERADE a special form for SNAT If one host can connect to the Internet then other computers that connect to this host can connect to the Internet when the computer does not have an actual IP address REDIRECT a special form of DNAT that re sends packets to a local host independent of the destination IP address C Mangle Table includes two chains PREROUTING chain pre processes packets before the routing process OUTPUT chain processes packets after the
29. hanges are periodically made to the information herein to correct such errors and these changes are incorporated into new editions of the publication Chapter 1 Chapter 2 Chapter 3 Chapter 4 Table of Contents Introductio Bep 1 1 OVet VIEW sitione Hive ist O A oa atl iin a ern oe a 1 2 Package Check list ecrit eee et oco et ser tds 1 2 Product Eeatutes ugue e ER e pee eit eesti E eese Elena ak 1 2 Product Speeificatiohs eese neben ptgis e et edis 1 3 Hardware Specifications eee e be ROG I ER S 1 3 Software Specifications ccceecccscessseeeceesceesceeeceseceseceaecaecsaecseecaeeesecaeecaeeeseeeeeeeeeeneeees 1 4 HardWare Block Di gram oi eR EUER ERREUR ERE ORE ER 1 5 ApDearanGe oie es Rise re Agen eee ure t aie e ueteri OR 1 5 Dit ensiotis ome Ie e rH Reese it aes Ue prestiti ete rel ede pops 1 7 Installing the EM 1240 LX eese enne eene trennt trennen enne nnns 1 8 BED Indicators et Ee Hee ocio pe Eeebe eto te a Pe ee pe top a 1 8 Wiring Requirements enne enne nennen enne erret nn nennen nennen nnne 1 8 Connecting the PoWet xus diete EA a 1 9 Grounding the EM 1240 LX esssssssssessesseeeeen ener nennen nnne 1 9 Connecting Data Transmission Cables ssssssseseeeeeeeeenee nennen eren 1 9 Connecting to the Network eren enne nnns 1 10 Connecting to a Serial Device e ee tei a e e sce 1 10 Serial Console POrt 5 2i tI C dee aT TE E aaa aS 1 11 Internal SD Sockets e e
30. he EM 1240 LX to a PC There are two ways to connect the EM 1240 LX to a PC Console Port The serial console port offers users a Serial Console Port Settings convenient means of connecting to the EM 1240 LX This method is particularly Baudrate 19200 bps useful when using the EM 1240 LX for the Parity None first time Since the communication is over a direct serial connection you do not need to Data bits 8 know either of the IP addresses in order to make contact Stop bits f Use the serial console port settings shown on Flow Control None the right Once the connection is established Terminal VT100 the following window will open MX iM BAO TUO WED HID Dias 213 2al l NET Registered protocol family 1 NET Registered protocol family 17 VFS Mounted root jffs2 filesystem Freeing init memory 56K BusyBox v1 00 2006 03 31 09 54 0000 e in shell msh Enter help for a list of built in commands Welcome to anne Product EM 1240 Serial For further information check http www moxa com tw ER 00 00 21 BEWA 192008 N 1 SCROLL CAPS NUM im PIED EM 1240 LX User s Manual Getting Started Telnet If you know at least one of the Default IP Address Default Netmask two IP addresses and netmasks then you can use Telnet to LAN 1 192 168 3 127 255 255 255 0 connect to the EM 1240 LX s console LAN 2 192 168 4 127 255
31. he file to the EM 1240 LX You can save this file to the EM 1240 LX s RAM disk and then upgrade the kernel The following is a step by step example To enable the RAM disk use the following command gt upramdisk After executing upramdisk you may use mount to find out if the new ramdisk is successfully created as shown upramdisk mount dev mtdblock2 on type jffs2 ro noatime prac on proc type proc rw nodiratime dev ram0 on var type ext2 rw dev mtdblock3 on var tmp type jf s2 rw noatime dev mtdblock3 on home type j s2 rw ncatime dev mtdblock3 on etc type jf f s2 rw noatime dev mtdblock3 on usr bin type j s2 rw noatime dev ram0 on ramdisk type ramf s rw t You can navigate to the device node using the following command cd ramdisk Use the built in FTP client to download the em1240 1 x bin file from the PC ramdisk gt ftp destination PC s IP Login Name xxxx Login Password xxxx ftp bin ftp get em1240 1 x bin Use the upkernel command to upgrade the kernel and root file system ramdisk gt upkernel em1240 1 x bin ramdisk gt reboot EM 1240 LX User s Manual Configuring EM 1240 LX upramdisk t upkernel EM 1240 1 0 bin To c P on contex The kernel source file is OK The version is 1 6 This step will destory your old kernel Do you want to continue it V N V Formating disk Erased 2048 Kibyte 0 100 complete F
32. ink file mount mount and check file system rm delete file chmod change file owner amp group amp user chown change file owner chgrp change file group sync sync file system save system file buffer to hardware mv move file pwd display active file directly df list active file system space du estimate file space usage mkdir make new directory rmdir delete directory head print the first 10 lines of each file to standard output tail print the last 10 lines of each file to standard output touch update the access and modification times of each file to the current time vi text editor cat dump file context grep print lines matching a pattern cut remove sections from each line of files find search for files in a directory hierarchy more dump file by one page test test if file exists or not echo echo string EM 1240 LX User s Manual System Commands Network Process Other ping ping to test network route routing table manager netstat display network status ifconfig set network IP address tracerout trace route tftp tftp protocol telnet user interface to TELNET protocol ftp file transfer protocol iptables restore restore iptables configuration file to network iptables iptables command iptables save save recent iptables configuration to file kill kill process killall kill process by
33. ith the PPP principles which apply to serial connections Create the Connection gt pppd pty pppoe I ETHERNET INTERFACE m 1412 user USER NAME password USER PASSWORD amp ETHERNET INTERFACE Ethernet card connected to ADSL modem for example ethO USER NAME User account for example moxa adsl net 4 8 EM 1240 LX User s Manual Configuring EM 1240 LX USER PASSWORD Password for user account To check if PPPOE is successfully connected use the command ifconfig pppO How to Mount a Remote NFS Server Currently the EM 1240 L X only supports NFS Network File System clients Users can open NFS service on a Linux PC to enable the EM 1240 LX to push data to it The EM 1240 LX can use NFS to mount a remote disk as a local disk for data or log purposes 1 First the NFS server must open an export directory and allow access to the IP address Edit the file etc exports on your Linux PC and then run the NFS daemon The following example gives one possibility refer to the NFS HOWTO document at http nfs sourceforge net nfs howto server html home usr 192 168 3 1 rw no root squash no all squash 2 The EM 1240 LX must run the portmap utility This program is enabled by default in the etc rc file Use the following command to mount the remote NFS server mount t nfs remote ip remote export directory local directory Dynamic Driver Module Load Unload Beside
34. must be disabled Additional Functions Reset Button Press the Reset button on the EM 1240 DK continuously for at least 5 seconds to load the factory default configuration After the factory default configuration has been loaded the system will reboot automatically We recommend that you only use this function if the software is not working properly and you want to load factory default settings To reset an embedded Linux system always use the software reboot command gt reboot to protect the integrity of data being transmitted or processed The Reset button is not designed to hard reboot the EM 1240 Development Kit EM 1240 LX User s Manual Introduction INT ENTION Resetting to factory defaults will not format the user directory and erase all of the user s data Loading factory defaults will only load the configuration file The files in the EM 1240 LX that will be replaced include etc boa conf etc hosts etc inittab etc password etc ramfs img etc resolv conf etc version so mono cp etc group etc inetd conf etc motd etc protocols pax oe Se etc rc etc services home httpd index html BB ATTENTION This function only takes effect when the user directory is working correctly If the user directory has crashed the kernel will automatically load the factory defaults Real time Clock The EM 1240 LX s real time clock is powered by a lithium battery We strongly recommend that you do
35. n ideal solution for embedded applications that use a lot of memory and must be housed in a small physical space without sacrificing performance This chapter covers the following topics DOCLUO DDDCOCUO Overview Package Checklist Product Features Product Specifications Hardware Specifications Software Specifications Hardware Block Diagram Appearance Dimensions Installing the EM 1240 LX LED Indicators Wiring Requirements Connecting the Power gt Grounding EM 1240 LX Connecting Data Transmission Cables Connecting to the Network Connecting to a Serial Device Serial Console Port Internal SD Socket Additional Functions gt Reset Button gt Real time Clock EM 1240 LX User s Manual Introduction Overview The EM 1240 LX Series of mini RISC based communication platforms are ideal for your embedded applications The EM 1240 LX comes with 4 RS 232 422 485 serial ports and dual 10 100 Mbps Ethernet LAN ports to provide users with a versatile communication platform The EM 1240 LX uses the MOXA ART ARMO RISC CPU Unlike the X86 CPU which uses a CISC design the ARM9 s RISC design architecture and modern semiconductor technology provide the EM 1240 LX with a powerful computing engine and communication functions but without generating too much heat The built in 8 MB NOR Flash ROM and 16 MB SDRAM give you enough storage capacity and an additional SD socket provides you with flexible sto
36. name ps report process status sleep suspend command on time dmesg dump kernel log message stty set serial port mknod make device node free display system memory usage date print or set the system date and time env run a program in a modified environment clear clear the terminal screen reboot reboot power off on the server halt halt the server gzip gunzip zcat_ compress or expand files hostname show system s host name tar tar archiving utility Moxa Special Utilities backupfs backup file system user directory bf build file system user directory cat etc version show user directory version upramdisk mount ramdisk downramdisk unmount ramdisk kversion show kernel version setinterface set UART interfaces program B SNMP Agent with MIB II amp RS 232 Like Group The EM 1240 LX has a built in SNMP Simple Network Management Protocol agent that supports RFC1317 RS 232 like group and RFC 1213 MIB II The following table lists the variable implementation for the EM 1240 LX The full SNMP object ID of the EM 1240 LX is iso 3 6 1 4 1 8691 12 7112 and is0 3 6 1 4 1 8691 12 1240 Note The EM 1240 LX does not support SNMP trap RFC1213 MIB II supported SNMP variables system MIB interface MIB at MIB icmp MIB sysDescr ifNumber atTable icmpInMsgs sysObjectID ifTable atIfIndex icmpInErrors sysUpTime ifIndex icmpInDestUnreachs sysContact ifDesc
37. nd hwclock w Visit http www ntp org for a recommended public NTP server list How to update the system time periodically via Network Time Protocol 1 Create a shell script file that includes the following description bin sh ntpdate ntp server ip hwclock w Sleep 100 The min time is 100ms 2 Saveand make this shell script executable by typing chmod 755 shell script name Edit the file etc inittab by adding the following line ntp unknown directory shell script name EM 1240 LX User s Manual Configuring EM 1240 LX Adding a Web Page Default Home Page address home httpd index html You may change the default home page directory by editing the web server s configuration file located at etc boa conf Type the following command to edit the boa conf file etc gt vi boa conf n A minimal config that makes the home page an unauthenticated CGI Alias fing HO T Auth cgi bin cgi demo etc config config lAddType text plain txt JAddTyne image gif gif lhddType text html html lhddType text html htm laddType text xml xml laddType image jpeg jpe laddType image jpeg jpeg laddType image jpeg jpg laddType image x icon ico To add your web page place your home page in the following directory home httpd IPTABLES IPTABLES is an administrative tool for setting up maintaining and inspecting the Linux kernel s IP packet filter rule tables Several different tabl
38. nfiguration Parameters Inittab inetd conf boa cont b n o 3 m e uL i gQ U a User Directory JFFS2 Read Write ARP ICMP IPV4 TCP UDP FTP Protocol Stack Telnet NTP SNMP V1 HTTP PPP Device Driver Ethernet UART RTC Buzzer GPIO Microkernel Memory control Schedule Process Hardware ARMS CPU SDRAM FlashROM RS 232 422 485 Ethernet The EM 1240 LX s Flash ROM has more than one smaller partition which contain the Boot Loader Linux Kernel amp Root File System Image and User Directory partitions OS Kernel amp Root File System ROMES Read ONLY For most applications users often spend a lot time maintaining the operating system and modifying the system configuration In order to save on the total cost of development and maintenance the EM 1240 LX is specially design to partition a User Directory for storing the user s system configuration parameters The EM 1240 LX has a built in mechanism that prevents system crashes helping preserve system reliability The procedure is as follows User AP User Directory Mini Root File System When the Linux kernel boots up the User Configuration Configuration kernel mounts the root file system and then enables services and daemons The configuration parameters via rc or inittab kernel also looks for the system Linux Kemel amp Root Normally the kernel uses the User Directory to boot up the system The Boo
39. ng LED connection System Ready x 1 Serial Port Status x 4 pairs TxD RxD 2 for each pair Reset Signal Reserve signal for external Reset to Default button connection Power Input Accept external 5 VDC through pin header Dimensions W x L 90 x 80 mm Operating temperature 10 to 60 C 14 to 141 F 5 to 95 RH Storage temperature 20 to 80 C 4 to 176 F 5 to 95 RH Module Interface Two 2 x 28 pin header pitch 1 27 x 1 27 mm EM 1240 LX User s Manual Introduction Software Specifications Kernel uClinux Kernel 2 6 9 Supports dynamic driver module load unload Protocol Stack ARP ICMP IPV4 TCP UDP FTP Telnet SNMP V1 V2c HTTP CHAP PAP DHCP NTP NFS V2 V3 SMTP Telnet FTP PPP PPPoE File System JFFS2 for Kernel Root File System Read Only and User Directory Read Write Msh Minix shell command pppd Dial in out over serial port daemon PPPoE Point to Point over Ethernet daemon snmpd SNMP V1 V2c Agent daemon busybox Linux normal command utility Tinylogin login and user manager utility Telnetd Telnet server daemon telnet Telnet client program inetd TCP server manager program ftpd FTP server program ftp FTP client program boa Web server daemon ntpdate Network Time Protocol client utility Tool Chain Linux Tool Chain Arm elf gec V2 95 3 C C PC Cross Compiler uClibc V0 9 26 POS
40. not replace the lithium battery without the help of Moxa s support team If the battery needs to be changed contact the Moxa RMA service team for RMA service ATTENTION The battery may explode if replaced by an incorrect type To avoid this potential danger always be sure to use the correct type of battery 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 chapter we cover the following topics Q Powering on the EM 1240 LX Q Connecting the EM 1240 LX to a PC gt Console Port gt Telnet Configuring the Ethernet Interface Installing a Secure Digital SD Memory Card Developing Your Applications Installing the EM 1240 LX Tool Chain Compiling Hello c Uploading Hello to the EM 1240 LX Running Hello on the EM 1240 LX Make File Sample Code Ooo VVVV V 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 the EM 1240 L X and then power on the EM 1240 LX by connecting the power adaptor It takes about 16 seconds for the system to boot up Once the system is ready the Ready LED will light up ATTENTION After connecting the EM 1240 LX to the power supply it will take about 16 seconds for the operating system to boot up The green Ready LED will not turn on until the operating system is ready Connecting t
41. ormat OK Now update the kernel Please wait Update the kernel OK Please restart system u Upgrading the Root File System amp User Directory The EM 1240 LX uses JFFS2 for root file system and user directory By default the root file system is pre set to READ only The EM 1240 LX provides a read write user s directory in the JFFS2 file system By using this user s directory the system configuration file and user s program can be stored on this disk Search the EM 1240 LX s CD ROM for the latest user directory file or download the file from www moxa com The format is em1240 1 x dsk You must download this file to a PC first and then use Console Terminal or Telnet Console to copy the file to the EM 1240 LX You can save this file to the EM 1240 LX s RAM disk and then upgrade the user directory The following is a step by step example To enable the RAM disk use the following command gt upramdisk cd ramdisk Use the built in FTP client to download the em1240 1 x dsk file from the PC ramdisk gt ftp destination PC s IP Login Name xxxx Login Password xxxx ftp bin ftp get em1240 1 x dsk ftp gt quit ramdisk gt upkernel ramdisk em1240 1 x dsk reboot EM 1240 LX User s Manual Configuring EM 1240 LX upkernel EM 1240 1 0 dsk To check the source file context The firmware source file is OK The version is 1 0 This step will destory your old kernel Do you want to continue it V N
42. r atPhysAddress icmpInTimeExcds sysName ifType atNetAddress icmpInParmProbs sysLocation ifMtu icmpInSrcQuenchs sysServices ifSpeed icmpInRedirects ifPhysA ddress icmpInEchos ifAdminStatus icmpInEchoReps ifOperStatus icmpInTimestamps ifLastChange icmpInAddrMasks ifInOctets icmpInAddrMaskReps ifinUcastPkts icmpOutMsgs iflinNUcastPkts icmpOutErrors ifInDiscards icmpOutDestUnreachs ifinErrors icmpOutTimeExcds iflnUnknownProtos icmpOutParmProbs ifOutOctets icmpOutSrcQuenchs ifOutUcastPkts icmpOutRedirects ifOutNUcastPkts icmpOutEchos ifOutDiscards icmpOutEchoReps ifOutErrors icmpOutTimestamps ifOutQLen icmpOutAddrMasks ifSpecific icmpOutAddrmaskReps EM 1240 LX User s Manual SNMP Agent with MIB Il amp RS 232 Like Group ip MIB tcp MIB udp MIB ipForwarding tcpRtoAlgorithm udpInDatagrams ipDefaultTTL tcpRtoMin udpNoPorts ipInReceives tcpRtoMax udpInErrors ipInHdrErrors tepMaxConn udpOutDatagrams ipInAddrErrors tcpActiveOpens udpTable ipForwDatagrams tcpPassiveOpens udpLocalAddress ipInUnknownProtos tcpAttemptFails udpLocalPort ipInDiscards tcpEstabResets ipInDelivers tepCurrEstab ipOutRequests tcpInSegs ipOutDiscards tcpOutSegs ipOutNoRoutes tcpRetransSegs ipReasmTimeout tepConnTable ipReasmReqds tcpConnState ipReasmFails tcpConnLocalA ddress ipFragOKs tcpConnLocalPort ipFragFails tcpConnRemA ddress ipFragCreates tcepConnRemPort ipAddrTable tcpInErrs ipAdEntAddr tcpOutRsts ipAdEntlIfIndex ipAdEntNetMask ip
43. rage expansion to run applications The dual LAN ports built into the ARM9 make the EM 1240 LX an ideal communication platform for some of the simple data acquisition and protocol conversion applications and the two RS 232 422 485 serial ports allow you to connect a variety of serial devices The pre installed uClinux operating system provides an open software operating system for software program development Software written for desktop PCs is easily ported to the EM 1240 LX by using a GNU cross complier so that you will not need to spend time modifying existing software code The operating system device drivers and your own software can all be stored in the EM 1240 LX s Flash memory Package Checklist EM 1240 LX Mini RISC based ready to run embedded computer with 4 serial ports dual Ethernet SD uClinux OS EM 1240 LX Series products are shipped with the following items e EM 1240 embedded module e EM 1240 Development Kit optional e Quick Installation Guide e Document amp Software CD e Cross over Ethernet cable e CBL RJ45M9 150 150 cm 8 pin RJ45 to male DB9 serial port cable e CBL RJASF9 150 150 cm 8 pin RJ45 to female DB9 console port cable e Power cord e Product Warranty Statement NOTE Notify your sales representative if any of the above items are missing or damaged Product Features EM 1240 LX Series products have the following features e MOXA ART ARM 32 bit 192 MHz communication processor e On
44. routing process It has three extensions TTL MARK TOS The following figure shows the IPTABLES hierarchy Incoming Packets Mangle Table PREROUTING Chain NAT Table PREROUTING Chain Other Host Packets Mangle Table FORWARD Chain Filter Table FORWARD Chain Mangle Table POSTROUTING Chain Local Host Packets Mangle Table INPUT Chain Filter Table INPUT Chain Local Process Mangle Table OUTPUT Chain NAT Table OUTPUT Chain Filter Table OUTPUT Chain NAT Table POSTROUTING Chain Outgoing Packets 4 4 EM 1240 LX User s Manual Configuring EM 1240 LX The EM 1240 LX supports the following sub modules Be sure to use the module that matches your application ip conntrack ipt MARK ipt ah ipt state ip conntrack ftp ipt MASQUERADE ipt esp ipt tcpmss ipt conntrack irc ipt MIRROT ipt length ipt tos ip nat ftp ipt REDIRECT ipt limit ipt ttl ip nat irc ipt REJECT ipt mac ipt unclean ip nat snmp basic ipt TCPMSS ipt mark ip queue ipt TOS ipt multiport ipt owner NOTE The EM 1240 LX does NOT support IPV6 and ipchains Use iptables iptables restore iptables save to maintain the database NOTE IPTABLES supports packet filtering or NAT Take care when setting up the IPTABLES rules If the rules are not correct remote hosts that connect via a LAN or PPP may be denied
45. s supporting traditional static drivers the EM 1240 L X also supports the dynamic driver module load unload mechanism It allows user to load a special driver into the kernel to enable hardware features for specific applications To load unload dynamic driver module use the following commands Load module insmod module directory module file name For example to load the UART driver type the following command insmod lib modules 2 6 9 MoXaRt kernel drivers char mxser ko Show module list gt 1smod Unload module rmmod module name listed by lsmod command For example to unload the UART driver type the following command rmmod mxser For the EM 1240 LX the factory default is to load the UART driver mxser ko The additional driver module to control SD MMC memory card is loaded for the EM 1240 LX Please see the following information below to know the location and file name for these driver modules UART lib modules 2 6 9 MoXaRt kernel drivers char mxser ko SD MMC lib modules 2 6 9 MoXaRt kernel drivers mmc mmc core ko lib modules 2 6 9 MoXaRt kernel drivers mmc mmc block ko lib modules 2 6 9 MoXaRt kernel drivers mmc moxasd ko 4 9 EM 1240 LX User s Manual Configuring EM 1240 LX Upgrading the Kernel The EM 1240 LX kernel is em1240 1 x bin which can be downloaded from www moxa com You must first download this file to your PC and then use Console Terminal or Telnet Console to copy t
46. ser Directory Backup EM 1240 LX to PC Loading Factory Defaults Mirroring the Application Program and Configuration Autostarting User Applications on Bootup Checking the Kernel and User Directory Versions EM 1240 LX User s Manual Configuring EM 1240 LX Enabling and Disabling Daemons The following daemons are enabled when the EM 1240 LX boots up for the first time e SNMP Agent daemon snmpd e Telnet Server Client daemon telnetd Internet Daemons inetd e FTP Server Client daemon ftpd e WWW Server daemon boa ATTENTION How to enable disable telnet ftp server a Edit the file etc inetd conf Example default enable discard dgram udp wait root bin discard discard stream tcp nowait root bin discard telnet stream tcp nowait root bin telnetd ftp stream tcp nowait root bin ftpd 1 b Disable the daemon by typing in front of the first character of the row How to enable disable etc inittab www server a Edit the file etc inittab b Disable the www service by typing in front of the first character of the row How to enable Network Time Protocol ntpdate is a time adjusting client utility The EM 1240 LX plays the role of Time client and sends requests to the Network Time Server to request the correct time Set the time server address for adjusting the system time with the command gt ntpdate ntp_server_ip Save the system time to the hardware s real time clock with the comma
47. sword use gt pppd connect chat v user xxxxx password xxxxx dev ttyMO 38400 crtscts amp Connect Using a Modem e Use gt pppd connect chat v ATDT phone number CONNECT user xxxxx password xxxxx dev ttyMO 38400 crtscts amp 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 e Use either of the following gt pppd Local IP Address Remote IP Address dev ttyM1 38400 local crtscts or gt pppd Local IP Address Remote IP Address dev ttyM0 38400 local crtscts login auth Connect Using a Modem e Use gt pppd connect chat v AT CONNECT lt local_IP_Address gt lt Remote_IP_Address gt dev ttyMO 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 w
48. t support moxa com tw Website for product information tee http www moxa com EM 1240 LX User s Manual Service Information Problem Report Form Moxa EM 1240 LX Customer name 1 Moxa Product O EM 1240 LX 2 Serial Number Problem Description Please describe the symptoms of the problem as clearly as possible including any error messages you see A clearly written description of the problem will allow us to reproduce the symptoms and expedite the repair of your product EM 1240 LX User s Manual Service Information Product Return Procedure For product repair exchange or refund the customer must Provide evidence of original purchase Obtain a Product Return Agreement PRA from the sales representative or dealer Fill out the Problem Report Form PRF Include as much detail as possible for a shorter product repair time Carefully pack the product in an anti static package and send it pre paid to the dealer The PRA should be visible on the outside of the package and include a description of the problem along with the return address and telephone number of a technical contact
49. t Loader kernel will only use the default HW configuration etc amp home when the User Directory crashes The EM 1240 LX uses ROMFS for the Linux kernel image Root File System and Protected configuration and uses JFFS2 for the User Directory 3 2 EM 1240 LX User s Manual Software Package The partition sizes are hard coded into the kernel binary You must rebuild the kernel to change the partition sizes The flash memory map is shown in the following table Flash Context Flash Address Size Access control Boot loader 0 Ox3ffff 256K Read ONLY Kernet amp 0x40000 0x3 fffff 4M Read ONLY Root File System JFFS2 User Directory 0x400000 Ox7fffff 4M 256K Read Write JFFS2 Developers write their own programs only on partition etc home tmp and usr bin It is advised the executed file be put in usr bin as this will allow developers to use hotkeys In addition to the flash file systems a RAM based file system is mounted on var Journaling Flash File System JFFS2 The flash User Directory 1s formatted by the Journaling Flash File System JFFS2 which places a compressed file system on the flash transparent to the user Axis Communications in Sweden developed the Journaling Flash File System JFFS2 JFFS2 provides a file system directly on flash rather than emulating a block device designed for use on flash ROM chips It recognizes flash ROM chips special write requiremen
50. te uU RRORIR RU RIRs 5 2 exl gm cR 6 1 Windows UG Finder eee ceo etu Ere nina ames 6 2 Linux UC Fini eri ied etu iiten ten pep Ute RR 6 5 System Comimarids 255 octet i htec oe ime eth en che ies redet fer eee A 1 busybox uClinux normal command utility collection essere A 1 File manager idee E A R E REA GU een A 1 UCP s aec tete thts hoe eta Ted Motus dr E A e os A 1 Netwotlk z 2c eoe Sin e e bec n e P e DH ete ED E Beaten A 2 ProCeSS 5a sacas S b ei nU berto SA eee enin us A 2 Other i ie i red ST ER P Te d ERE OR nee A 2 Moxa Special Utilities unie te ORE HE de RU Ce ne ER quot A 2 SNMP Agent with MIB Il amp RS 232 Like Group B 1 EM 1240 EX FAG niece oes coiere eoe cec oco C 1 Service IntorifiallOl ce perire peer etate ec Droite ei Daci ne cer pore ees D 1 Moxa Internet Services a mee on wath eter A heehee o a Gane eas D 2 Problem Report Form 2 need e RTI PR ERU To PER Ue dE En D 3 Product Ret rn Procedures 22 eee re REED ER GE AU eres D 4 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 four RS 232 422 485 serial ports in a built in uClinux ARM9 module In addition EM 1240 LX provides SD memory card for storage expansion offers high performance communication and unlimited storage in a super compact palm size module EM 1240 LX is a
51. the following steps to install the SD memory card Step 1 Find the exact location of the SD socket Step 2 Insert the SD card into the socket Make sure you insert with the right direction Step 3 Push the SD card inward Push Inward Step 4 Before using the SD card check the ete re file to ensure that the driver module for SD card control is loaded The loading sequence should be as follows insmod lib modules 2 6 9 MoXaRt kernel drivers mmc mmc core ko insmod lib modules 2 6 9 MoXaRt kernel drivers mmc mmc_block ko insmod lib modules 2 6 9 MoXaRt kernel drivers mmc moxasd ko Step 5 To take out the SD memory card press the SD card again The care will pops out part way after which you can pull it out directly EM 1240 LX User s Manual Getting Started Developing Your Applications Step 1 Connect the EM 1240 LX to a Linux PC Step 2 Install Tool Chain GNU Cross Compiler amp uClibc Step 3 Configure cross compiler and uClibc environment variables Step 4 Code amp compile your program Step 5 Download program to the EM 1240 LX via FTP or NFS Step 6 Debug the program If the program is OK proceed to Step 7 If the program needs to be modified go back to Step 4 Step 7 Back up the user directory and distribute the code to additional EM 1240 LX units Installing the EM 1240 LX Tool Chain Linux The PC must have the Linux Operating System pre installed to install the EM 1240 LX Linux GNU Tool Ch
52. tions 0 RTC Real time Clock L Buzzer U UART Interface 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 uClinux standard simple RTC control You must include 1inux rtc h to use these functions 1 Function RTC RD TIME int ioctl fd RTC RD TIME struct rtc time time Description Reads time information from RTC 2 Function RTC SET TIME int ioctl fd RTC SET TIME struct rtc time time Description Sets RTC time Buzzer The device node is located at dev console The EM 1240 LX supports uClinux standard buzzer control The EM 1240 LX s buzzer runs at a fixed frequency of 100 Hz You must include sys kd h to use these functions 1 Function KDMKTON LH ioctl fd KDMKTONE unsigned int arg Description Buzzer will beep as stipulated by the function arguments UART Interface The normal tty device node is located at dev ttyM0 ttyM1 and modem tty device node is located at dev com0 com1 The EM 1240 LX Series supports wClinux standard termios control Moxa UART Device API supports the configuration of ttyMO to ttyM1 as RS 232 422 485 To use these functions after the Tool Chain package is installed include moxadevice h in your application define RS232 MODE 0 define RS485 2WIRE MODE 1 define RS422 MODE 2 define RS485_4WIRE_MODE 3 Function
53. ts does wear leveling to extend flash life keeps the flash directory structure in RAM at all times and implements a log structured file system that is always consistent even if the system crashes or unexpectedly powers down It does not require fsck on boot up JFFS2 the next version of JFFS provides improved wear leveling and garbage collection performance improved RAM footprint and response to system memory pressure improved concurrency and support for suspending flash erases marking of bad sectors with continued use of the remaining good sectors thus enhancing the write life of the devices native data compression inside the file system design and support for hard links Key features of JFFS2 are e Directly targeted to Flash ROM Robust Consistent across power failure No integrity scan fsck is required at boot time after normal or abnormal shutdown Explicit wear leveling Transparent compression Although JFFS2 is a journaling file system this does not preclude the loss of data The file system will remain in a consistent state across power failures and will always be mountable However if the board is powered down during a write then the incomplete write will be rolled back on the next boot Any writes that were already completed will not be affected Additional information about JFFS2 is available at http sources redhat com jffs2 jffs2 pdf http developer axis com software jffs http www linux mtd infradead org
54. urther information check ttp www moxa cam tw cd etc E StateOPEN m m 2 Type the command vi rc to use the VI Editor to edit the configuration file The IP addresses for the EM 1240 LX s LANI and LAN2 are given as ifconfig eth0 192 168 3 127 ifconfig ethl 192 168 4 127 as shown in the following figure Edit these two lines to modify the static IP addresses E COM8 19200 None 8 1 T100 bin sh hostname moxa com org cat etc motd ars i contia ifconfig ethO 192 netmask 255 255 255 0 ifconfig ethi 192 a P netmask 255 255 255 0 gw 192 168 3 254 dev ethO rtc clock to system clock loading your driver here uart driver for dev ttyMO dev ttyM1 insmod lib modules 2 6 9 MoXaRt kernel drivers char mxser set the serial port interface now default set to RS232 if you want to change then you need modify following rc tine 1 of 34 254 mm mm mm mm Got Break Signa 2 4 EM 1240 LX User s Manual Getting Started ATTENTION You may reset the IP address immediately by issuing the command ifconfig eth0 192 168 5 127 This will change the IP address of LAN1 Issuing this command will however NOT update the re file in the EM 1240 LX s flash memory so the next time you reboot the IP address will revert to its previous value You may also configure the EM 1240 LX to request IP addresses from a DHCP server In this case use the sharp sign to comm
Download Pdf Manuals
Related Search
Related Contents
Anleitung - LR-Cal Manual - Security Bulgaria BP10 10-3-2015 BigPod BE Mode d`emploi simplifié BLS et BXPro [Mode de - Voyages-sncf Hitachi NV 45AE(S) Nail Gun User Manual KING 3 KING 4 - inShop.hu webáruház Copyright © All rights reserved.
Failed to retrieve file