Home

Moxa Technologies UC-7110 User's Manual

image

Contents

1. 6 1 Windows UC Findet 5 On Ro ance eris e indere ii e de m Rd 6 2 Lin x cfinder ec er a Eee UE ede RR Ee BE E ET ORT d 6 5 System Commands acataeiuac remedia ans kno A RR E x S duinne A 1 busybox V0 60 4 wClinux normal command utility collection esses A 1 File managet iie eR Ue EEEE E E RU REY Ree iUd A 1 EGIOE oe anan Eu ee eoe a e GE KN edd aye oe Aen oe A 1 Network ennn i ea E eene eec eo e Ie bee ees A 2 lun EE A 2 ur A 2 MOXA Special Utilities iter ee ep t te E ERE ee quos A 2 SNMP Agent with MIB II amp RS 232 Like Group sse B 1 FAQ for UC 7110 5 555 raaa a ch ree ete eren ere re ci da te Exe eine ct deris C 1 Service Information derer rere er retire iere n erar ane anyone area Enea aaa venae ea yan D 1 MOXA Internet SetvICes a testor Ren a ER Na pa a a NA a Ga NA a a ah a an a ag aa a ee D 2 Problem Report Form 2 edi eee a d e re e PER Pedo D 3 Product Return Procedures 32 utr he ee e E EGENT ened D 4 1 Introduction The MOXA UC 7110 Series of RISC based Communication Platforms features two RS 232 422 485 serial ports and dual 10 100 Mbps Ethernet ports making these products ideal for embedded OS applications This chapter covers the following topics D DO D D O DO DO O O UO Overview Package Checklist Product Features Product Specifications Har
2. iptables A INPUT i eth0 p all m mac mac source 01 02 03 04 05 06 j DROP 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 UC 7110 connects several devices on a network and maps local inside network addresses to one or more global outside IP addresses and un maps the global IP addresses on incoming packets back into local IP addresses NOTE Click on the following link for more information about iptables and NAT http www netfilter org documentation HOWTO NAT HOWTO html NAT Example The IP address of all packets leaving LANI are changed to 192 168 3 127 you will need to load 4 7 UC 7110 Series User s Manual Configuring UC 7110 the module ipt MASQUERADE IP Netmask 192 168 3 100 24 Gateway 192 168 3 127 PCI Linux or Windows LANI LANI ethO 192 168 3 127 24 UC 7110 LAN2 ethl 192 168 4 127 24 LAN2 PC2 Linux or Windows IP Netmask 192 168 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 she
3. e 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 advisable to label the wiring to all devices in the system ATTENTION Safety First Be sure to disconnect the power cord before installing and or wiring your UC 7110 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 UC 7110 When plugged in UC 7110 s internal components generate heat and consequently the outer casing may feel hot to the touch 1 8 UC 7110 Series User s Manual Introduction Connecting the Power Connect the live wire end of the 12 48 VDC power adaptor to UC 7110 s terminal block If the power is properly supplied the Ready LED will show a solid green color after a 25 to 30 second delay Grounding UC 7110 Grounding and wire routing helps 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 moun
4. 1 5 KV magnetic isolation The two RS 232 422 485 ports support RS 232 signals TxD RxD DTR DSR RTS CTS DCD GND Serial Ports 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 1152 Parity None even odd space mark Flow Control RTC CTS XON XOFF Speed 50 bps to 921 6 Kbps Real Time Clock Yes Buzzer Yes Console Port RS 232 3 wire Tx Rx GND 19200 n 8 1 Ready LEDs Serial Tx Rx 2 of each LAN 10 100 one on each LAN connector Gross Weight 190 g Power input 12 48 VDC Power Consumption 290 mA 12 VDC Operating temperature 10 to 60 C 14 to 140F 5 to 95 RH Storage temperature 20 to80 C 4 to 185F 5 to 95 RH EMC FCC Class A CE Class A Safety UL CUL TUV Warranty 5 years Regulatory Approvals UC 7110 Series User s Manual Introduction Software Specifications UC 7110 LX Kernel uClinux Kernel 2 4 22 ARP ICMP IPV4 TCP UDP FTP Telnet NTP SNMP V1 Protocol Stack HTTP PPP CHAP PAP NFS JFFS2 File System User Directory Read Write ROMFS Kernel Root File System Read Only Sash V1 1 1 Simple OS shell command Pppd V1 13 dial in out over serial port daemon snmpd SNMP V1 Agent daemon busybox V0 60
5. Format user directory Erased 4096 Ribyte 0 100 complete Format CK Now make the user directory Please wait Make user directory CK Please restart systen ramdisk User Directory Backup UC 7110 to PC To enable the RAM disk follow the commands given below gt upramdisk gt cd ramdisk And then use the backupfs command to backup the file system ramdisk backupfs ramdisk usrdisk backup backupfs rardisk usrdisk backup Sync the file system ow backup the user directory Please wait ackup the user directory CK Eam cam The file system will be backed up and you can use ftp commands to transfer the usrdisk backup to the FTP server on the PC gt cd ramdisk ramdisk ls al RE 10 0 4194304 usrdisk backup drwxr xr x 1 0 0 32 a drwxr x 1024 Connected Ei 220 TYPSoft FIP Server 1 10 ready Name 192 168 3 11 root root 331 Password required for root Password 23 bin ftp put usrdisk backup Ote 200 Port command successful 150 Cpening data connection for usrdisk backup 226 File received complete 4195224 bytes sent in 37 secs 113 Kbytes sec ftp usrdisk backup 4 13 K m UC 7110 Series User s Manual Configuring UC 7110 Loading Factory Defaults The easiest way to Load Factory Default is with Upgrade User directory Refer to the previous section How to Upgrade User Directory for an introduction Mi
6. Parameters Inittab inetd conf boa conf User Directory JFFS2 Read Write ARP ICMP IPV4 TCP UDP FTP Protocol Stack Teinet NTP SNMP V1 HTTP PPP Device Driver Ethernet UART RTC Buzzer GPIO Microkernel Memory control Schedule Process TER ARM CPU SDRAM FlashROM RS 232 422 485 Ethemet UC 7110 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 For most applications users often spend a lot time maintaining the operating system and modifying the system configuration In order to Peete save on the total cost of development and User Directory Mini Root File System maintenance UC 7110 is specially design to User Configuration Configuration partition a User Directory for storing the user s system configuration parameters UC 7110 has a built in mechanism that prevents system crashes helping preserve system reliability The procedure is described below Boot Loader HW Linux Kernel amp Root When the Linux kernel boots up the kernel mounts the root file system and then enables services and daemons The kernel also looks for the system configuration parameters via rc or inittab Normally the kernel uses the User Directory to boot up the system The kernel will only use the default configuration etc amp home when the User Directory crashes UC 7110 uses ROMFS for the Linux
7. cable between UC 7110 and the serial device s Serial ports Pl 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 DB9 Male Port RS 232 422 485 Pinouts 12345 RS 232 RS 422 RS 485 RS 485 4 wire 2 wire I 5 1 DCD TxDA TxDA 2 RxD TxDB TxDB 3 TxD RxDB RxDB DataB 4 DTR RxDA RxDA DataA 6789 5 GND GND GND GND 6 DSR um 7 RTS 8 CTS m 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 UC 7110 boot up message Serial Console Port amp Pinouts Serial Console Cable 4 Pin Signal 5 1 TxD 2 RxD j 3 NC 1 4 GND UC 7110 Series User s Manual Introduction Additional Functions Reset Button Press the RESET button continuously for more than 5 seconds to load the factory default configuration After loading the factory default the system will reboot automatically The System Ready LED will be blinking for the first 5 seconds We recommend that you only use this function if the software is not working properly To reset the uClinux system software always use the software reboot command gt reboot to protect the integrity of data in the process of being transmitted The reset bu
8. functions 1 Function RTC RD TIM Gl 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 UC 7110 supports uClinux standard buzzer control UC 7110 s buzzer runs at a fixed frequency of 100 Hz You must include lt sys kd h gt to use these functions 1 Function KDMKTON Li 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 cum0 cum1 UC 7110 Series supports uClinux 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 copy the file CDROM libuc7110 uc7110 h to the directory usr local arm elf include on your PC Linux and then include lt uc7110 h gt in your codes define RS232 MODE define RS485 2WIRE MODE 1 define RS422 MODE 2 define RS485 AWIRE MODE 3 tj C 1 Function MOXA SET OP MOD Gl int mode mode which mode you want to set int ioctl fd MOXA SET OP MODE amp mode Description Sets the in
9. gif gif lhddType text html html lhddType text html htm laddType text xml xml laddType image jpeg jre laddType image jpeg jreg laddType image jpeg jpg AddType 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 tables 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 what to do with a matching packet A rule such as a jump to a user defined chain in the same table is called a target UC 7110 supports 3 types of IPTABLES table 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 4 3 UC 7110 Series User s Manual Configuring UC 7110 OUTPUT chain produces local packets sub tables Source NAT SNAT changes the first source packet IP address Destination NAT DNAT changes the first destination packet IP address MASQUERADE a special form for SNAT If one host can connect to the I
10. to continue or Cancel to exit Setup 3 Eix Select Additional Tasks N Which additional tasks should be performed e Select the additional tasks you would like Setup to perform while installing UC Finder then click Next Additional icons 6 2 UC 7110 Series User s Manual UC Finder 4 Check the Launch UC Finder checkbox to use UC Finder immediately after the installation 5 has finished and then click on Next to complete the installation ixi 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 on Broadcast Search to search for all Universal Communicators connected to the LAN sini Eile Function About Broadcast Search No Model MAC Address IP Address Search Result 0 UC s LZ UC 7110 Series 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 6 7 The next time you need to run UC Finder double click on the UC Finder ic
11. y Format kernel and root file system disk rased 3840 Kibyte O 100 complete Format CK Now update the kernel and root file system Please wait Update the kernel and root file system CK Please restart system ramdisk reboot he system is going down NCW Sending SIGTERM to all processes v Upgrading the User Directory UC 7110 uses ROMFS ROM File System which is pre set to READ only for the kernel and root file system UC 7110 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 UC 7110 s CD ROM for the latest user directory file or download the file from www moxa com The format is usrdisk 1 x 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 UC 7110 You can save this file to UC 7110 s RAM disk and then upgrade the user directory In what follows we give a step by step example 4 11 UC 7110 Series User s Manual Configuring UC 7110 To enable the RAM disk use the commands given below gt upramdisk Command bin sh Command mke2fs dev rami ke2fs 1 25 20 Sep 2001 Filesystem label CS type Linux lock size 1024 10g 0 Fragment size 1024 10g 0 1152 inodes 4608 blocks 230 blocks 4 reserved for the super user First data block 1 1 block group 8192 blocks per group 81
12. 10 Series User s Manual Introduction Installing UC 7110 Top End View Reset Button Terminal Block Power Input RJ45 10 100 Mbps Ethernet Ports Nameplate View DSO V V RESET LAN1 2 48V DIN Rail screw hole UC 7110 Universal Communicator Wallmount screw hole r RS 232 422 485 3 P1 P2 DB9 male Serial Ports 1 7 UC 7110 Series User s Manual Introduction LED Indicators The following table explains the function of the five LED indicators located on UC 7110 s top panel LED Name LED Color LED Function Ready Green Power is on and functioning normally Green Serial port 1 2 is transmitting data P1 P2 Tx Off Serial port 1 2 is not transmitting data Yellow Serial port 1 2 is receiving data P1 P2 Rx Off Serial port 1 2 is not receiving data Wiring Requirements This section describes how to connect UC 7110 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
13. 100 Oj x a 27 Command cat etc motd sgg ggg EEEE EE SSSSSSS SSSSSS Lili 888 Lil sss 888 gygy sss ggg Lili Lll sgy sss Lil sss Lll Lil 888 ggg 58 8 88 sss ggg fg 5 ss gg 888 sss 88 saggy ss 9898 S8 S9 FF Ilii sis 858 S9 ss HHH EEE EEEE s FF ggg 88 Sisi ss 888 g 888 HHH gus HHH ggg ss 8s ss ggg Lil 8s 888 8s 8s 8s 8 ggg 8s S SSSS F SESSSS EEEE EEEE SESSSSS SSSSSSSISSS SISSSS For further information check ttp www moxa com Execution Finished Exiting Sash command shell version 1 1 1 i gt StateOPEN m m m Ready 2 2 UC 7110 Series 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 vou cam use Telneldo LAN1 192 168 3 127 255 255 255 0 connect to UC 7110 s console y Aw 192 168 4 127 255 255 255 0 Telnet can be used locally by using a cross over Ethernet cable to connect your computer to UC 7110 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 cX Telnet 192 168 4 127 UC7110 login root Password HHHH HHHH HHH HHHHHHHE HAHAHA HH Hitt THEE HAH HAH HAH HHHH Hitt HHH HHH Hitt HHH Hitt Hit Hitt HHH HHHH Hit Hit HHH HAHA HAHA H HH HHH WAH HHH Hit HH HH HH HH H Hit HHH H
14. 127 0 0 1 eg add ne OO 0 nermask ethO 192 168 3 127 ethl 192 168 4 127 a ethO if you want DHCP please set this a ethl amp f if you want DHCP please set this mnt etc vi rc State OPEN 88 m m Ready 4 Issue the vi write command to save the file and then reboot Since UC 7110 only reads the re file when booting up you must reboot e g by issuing the vi reboot command for the changes to take affect ifconfig ethO 192 168 5 127 This will change the IP address of LANI Issuing this command will NOT however update the re file in UC 7110 s flash memory so the next time you reboot the IP address will revert to its previous value 2 5 UC 7110 Series User s Manual Getting Started Developing Your Applications Step 1 Connect UC 7110 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 UC 7110 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 UC 7110 units Cross Compiler Installing the UC 7110 Tool Chain ATTENTION You can download the Tool Chain from Moxa s website go to the UC 7110 product page click The PC must have the
15. 27 as shown in the following figure Edit these two lines to modify the static IP addresses E COM2 19200 None 8 1 T100 um hostname UC7110 bin hwclock hctosys or bin expand etc ramfs img dev ram0 Em t proc proc proc t ramfs dev ramO var var config var tmp var log var run var lock m var empty ifconfig lo 127 0 0 1 ifconfig ethO 192 168 3 127 ifconfig ethl 192 168 4 127 fdhcpcd p a ethO amp f if you want DHCP please set this dheped p a ethl amp f if you want DHCP please set this mecid amp c cat etc motd Int etc Innt etc nnt etc rnt etc vi rc rc lina l of 19 5 StateOPEN S em m am Ready mask 255 255 255 0 lo UC 7110 Series User s Manual Getting Started ATTENTION You may reset the IP address immediately by issuing the command 3 You may also configure UC 7110 to request IP addresses from a DHCP server In this case use the sharp sign to comment out one or both ifconfig lines and then delete the sharp sign in front of the dhcpcd lines as shown below Note that UC 7110 will send out DHCP broadcast packets and then get the IP addresses from the first DHCP server that responds E COM2 19200 None 8 1 T100 e x e hostname UC7110 bin hwclock hctosys org bin expand etc ramfs imqg dev ram0 ma t proc proc proc t ramfs dev ramO0 var var configq var tmp var logq var run var lock m var empty ifconfig lo
16. 4 Linux normal command utility Tinylogin V0 80 login and user manager utility Telnetd V1 9 Telnet server daemon telnet busybox V0 60 4 Telnet client program inetd Distributed 20030522 TCP server manager program ftpd V8 5 FTP server program ftp V0 16 FTP client program boa Web server daemon ntpdate V4 1 1 Network Time Protocol client utility Tool Chain Arm elf gcc V2 95 3 C C PC Cross Compiler uClib V0 9 19 POSIX standard library UC Finder UC s LAN IP broadcast searching utility for Windows and Linux UC 7110 Series User s Manual Introduction Hardware Block Diagram Ethernet RS 232 422 485 Appearance Ethernet x 2 10 100BaseTx 12 48 VDC e 288 p rh V RESET LANA 1248V RS 232 Console Terminal UC 7110 Universal Communicator r RS 232 422 485 3 P1 P2 Serial Port 1 Serial Port 2 RS 232 422 485 RS 232 422 485 1 5 UC 7110 Series User s Manual Introduction Dimensions 6 0 24 4 0 16 12 5 0 49 UC 7110 Universal Communicator 111 4 31 7 0 28 RS 232 422 485 3 4 P I 47 3 1 56 S 26 1 02 EE NENNEN NEN 77 3 03 88 3 46 100 4 18 4 unit mm inch 1 6 UC 71
17. 7110 to a PC a Configuring the Ethernet Interface a Developing Your Applications Installing the UC 7110 Tool Chain Compiling Hello c Uploading Hello to UC 7110 Running Hello on UC 7110 Make File Sample Code UC 7110 Series User s Manual Getting Started Powering on UC 7110 Connect the SG wire to the Shielded Contact located on the upper left corner of the UC 7110 and then power on UC 7110 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 UC 7110 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 UC 7110 to a PC There are two ways to connect UC 7110 to a PC Console Port The serial console port offers users with a Serial Console Port Settings convenient mean of connecting to UC 7110 This method is particularly useful when Baud rate 19200 bps using UC 7110 for first time Since the communication is over a direct serial connection you do not need to know either Data bits 8 of the IP addresses in order to make contact Parity None Stop bits 1 Use serial console port settings shown at the right Once the connection is established the Flow Control None following window will open Terminal VT100 E COM2 19200 None 8 1 T
18. 92 fragments per group 1152 inodes per group riting inode tables done riting superblocks and filesystem accounting information done his filesystem will be automatically checked every 25 mounts or 180 00 days whichever comes first Use tune2fs c or i to override Command mount dev rami ramdisk ext3 No journal on filesystem on ramdisk 1 1 Command rmdir ramdisk lost found xecution Finished Exiting gt cd ramdisk Use the built in FTP client to download the usrdisk 1 x x dsk file from the PC ramdisk gt ftp destination PC s IP Login Name xxxx Login Password xxxx ftp bin ftp get usrdisk 1 x x dsk ftp quit ramdisk bf ramdisk usrdisk 1 x x dsk reboot 4 12 UC 7110 Series User s Manual Configuring UC 7110 tp get usrdisk 1 3 11 local usrdisk 1 3 11 remote 200 Port command successful er theta Me EEA AS or usrdisk 1 3 11 ARNING 705 bare linefeeds received in ASCII mode File may not have transferred correctly 226 Transfer complete 4194336 bytes received in 38 secs 107 Kbytes sec ftp quit 221 Goodbye ramdisk ls al isk 1 3 11 usrg IW I I 10 0 4194308 usrdisk 1 3 11 drwxr xr x 1 0 0 42 ca drwxr xr x 20 0 1024 ramdisk bf ramdisk usrdisk 1 3 11 his setp will destroy your user directory mnt all data Do you backup it and continue to do it Y N y Umount user directory mount dev mtdblocki busy remounted read only
19. Linux Operating System pre installed to install the UC 7110 GNU Tool Chain 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 UC 7110 Tool Chain can be found on the UC 7110 CD To install Tool Chain insert the CD into your PC and then issue the following command mount dev cdrom mnt cdrom Next run the following script from the root to installs the compilers linkers and libraries in the usr local directory sh mnt cdrom tool chain arm elf tools 20030314 sh The Tool Chain installation will take a few minutes to complete on the Documentation amp Drivers link and then click on Go under Driver amp Software Downloads The Tool Chain is also available on the www uClinux org website at the following link http www uClinux org pub uClinux m68k elf tools arm elf tools 20030314 sh UC 7110 Series User s Manual Getting Started Compiling Hello c The Tool Chain path is PATH usr local arm elf bin SPATH The UC 7110 CD includes several example programs We use Hello c to illustrate how to compile and run applications Issue the following commands from your 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 make to compile Hello c Finally execute the program to generate hello and hello gdb root localhost helloj ls al t root 5
20. UC 7110 Series User s Manual www moxa com product Second Edition July 2005 Moxa Technologies Co Ltd Tel 886 2 89 19 1230 Fax 886 2 8919 1231 Web www moxa com MOXA Technical Support Worldwide support moxa com tw The Americas support moxa com UC 7110 Series 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 2005 Moxa Technologies 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 typograph
21. dware Block Diagram Appearance Dimensions Installing UC 7110 LED Indicators Wiring Requirements Connecting the Power gt Grounding UC 7110 Connecting Data Transmission Cables gt Connecting to the Network Connecting to a Serial Device Serial Console Port Additional Functions Reset Button not yet activated Real Time Clock UC 7110 Series User s Manual Introduction Overview The UC 7110 Series of RISC based Communication Platforms are ideal for your embedded applications UC 7110 comes with two RS 232 422 485 serial ports and dual 10 100 Mbps Ethernet LAN ports to provide users with a versatile communication platform UC 7110 uses the ARM9 166 Mhz RISC CPU Unlike the X86 CPU which uses a CISC design the ARM9 s RISC design architecture and modern semiconductor technology provide UC 7110 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 to run applications on UC 7110 The dual LAN ports built into the ARM9 make UC 7110 an ideal communication platform for some of the more simple data acquisition and protocol conversion applications and the two RS 232 422 485 serial ports allow you to connect a variety of different types of serial device The pre installed uClinux operating system provides an open software operating system for software program development This means that software written
22. es in the selected chain as the given rule number 1 Name of an interface via which a packet is going to be received 0 Name of an interface via which a packet is going to be sent p The protocol of the rule or of the packet to check Source address network name host name network IP address or plain IP address sport Source port number d Destination address dport X Destination port number j Jump target 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 Examples 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 UC 7110 s port 137 138 139 iptables A INPUT i eth0 p tcp s 192 168 0 24 dport 137 139 j ACCEPT Example 7 Log TCP packets that visit UC 7110 s port 25 iptables A INPUT i eth0 p tcp dport 25 j LOG Example 8 Drop all packets from MAC address 01 02 03 04 05 06
23. for desktop PCs is easily ported to UC 7110 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 UC 7110 s Flash memory Package Checklist The UC 7110 Series model currently available is UC 7110 LX RISC based Universal Communicator with 2 Serial Ports Dual Ethernet Clinux OS UC 7110 Series products are shipped with the following items 1 UC 7110 UC 7110 Quick Installation Guide Universal Communicator Documentation amp Software CD ROM Ethernet cross over cable RJ45 to RJ45 100 cm Console port cable CBL 4PINDB9F 100 4 pin header to DB9 Female cable 100 cm e Power Adaptor e Product Warranty Booklet NOTE Notify your sales representative if any of the above items is missing or damaged Product Features UC 7110 Series products have the following features e ARM9 166 MHz Processor On board 16 MB RAM 8 MB Flash ROM Two RS 232 422 485 serial ports Dual 10 100 Mbps Ethernet uClinux Ready communication platform DIN Rail or wall mounting installation Robust fanless design UC 7110 Series User s Manual Introduction Product Specifications Hardware Specifications UC 7110 LX CPU ARMO based 32 bit RISC CPU 166 Mhz RAM 16 MB 12 MB of user programmable space Flash 8 MB 4 MB of user programmable space LAN Auto sensing 10 100 Mbps x 2 LAN Protection Built in
24. he 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 command gt hwclock systohc 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 systohc sleep 100 The min time is 100ms 2 Saveand change this shell script to run able by typing chmod 755 shell script name Edit the file etc inittab by adding the following line ntp unkown directory Xshell script name UC 7110 Series User s Manual Configuring UC 7110 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 home httpd boa conf mnt home httpd 1s al EM Tagen 1i 1000 100 333 index html e fe i 1000 100 437 boa conf drwxr xr x 40 0 1024 Kdirwx 20 o 1024 mnt home httpd vi boa conf v Type the following command to edit the boa conf file mnt home httpd gt vi boa conf a A minimal config that makes the home page an unauthenticated CGI riptAlias cgi JAlias img nowe si Auth cgi bin cgi demo etc config config lAddType text plain txt lhddType image
25. her dmesg dump kernel log message stty set serial port zeat dump gz file context 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 du estimate file space usage gzip gunzip 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 A 2 SNMP Agent with MIB II amp RS 232 Like Group UC 7110 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 UC 7110 The full SNMP object ID of UC 7110 is iso 3 6 1 4 1 8691 9 7 1 1 0 Note UC 7110 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 ifDescr atPhysAddress icmpInTimeExcds sysName ifType icmpInParmProbs sysLocation ifMtu atNetA ddress icmpInSrcQuenchs sysSer
26. ical errors Changes 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 eren ai sasaka a aan Aa 1 4 cal a ana a A a a aa ag A age aga a Ga NG a oe a AN E Ka Na Kg aaa ete Ta ga a a nag aa 1 2 Package Checklist id nisi soe o eee TA D a OU Sees 1 2 Product Features i ccd cede Re AE DR eH 1 2 Product Specifications onere ege dee utto ear diete s 1 3 Hardware Specifications UC 7 110 LA aaa aee eaaa anaa nawan nennen 1 3 Software Specifications UC 7110 LX sss ener 1 4 Hardware Block Diagram sic iicet Roe UG ee e RW ARTE IE een 1 5 Peers te M MEE 1 5 Dirnenslotis e geret rr Eee eate gente Pr gena ee eee e ho aa te NG a OK Na a o dat 1 6 Ihstalling UG sTETO i denote teu eibi e titu ud aaa o URS 1 7 LED IHidicators cione ende ees E eee terere eerie 1 8 Wiring Requirements REM 1 8 Connecting the Powers REI AA AG eee ie es 1 9 Grounding UC 7110 oo ceeccecccsseesseeseesecesseeeecesceseceeenseceaecaeceaecaeecaeecaeseneeeeeeeeeeereneeensees 1 9 Connecting Data Transmission Cables cscceseessceseeesecesecesecacecaeeeseeeeeeeeeeeeeseenseenereneerens 1 9 Connecting to the Network enne 1 9 Connecting toa Serial Device Re n Ree RES SEGETES Eee 1 10 SerialConsole POrt 5i EO EEUU E Ee EMPIRE chester see 1 10 Additional Euncti on
27. it HHHH Hoi HH HHH HH HH Ht Hit HHHH Ht HHH WH HH HH HH HH HHH THE HT Ht Ho Ho HH HHH HHE ilii H HH HH Hitt tt HAH Hitt Hit HAH WAH HH Hitt HH Ht Hit HH HAH Hit Hit HH Hitt HH Hit HH tt Hitt Hit HHH HO HAHAHA THEIHEH I HE THERE HEHEHE HAHAHA For further information check http www moxa com Sash command shell version 1 1 1 gt Once you reach the Sash command shell you can proceed to configure UC 7110 s network settings as described in the next section ATTENTION e Serial Console Reminder Remember to choose VT100 as the terminal type Use the CBL RJ45F9 150 cable that comes with UC 7110 to connect to the serial console port If you do not get connected on the first try unplug and then re plug UC 7110 s power cord e Telnet Reminder When connecting to UC 7110 over a LAN you must configure your PC s Ethernet card to be on the same subnet as the UC 7110 you wish to contact 2 3 UC 7110 Series User s Manual Getting Started Configuring the Ethernet Interface In this section we use the serial console to explain how to modify UC 7110 s network settings 1 Change directories by issuing the command cd mnt etc Sash command shell version 1 1 1 cd mnt etc nnt etc 4 StateOPEN Ready 2 Type the command vi rc to use VI Editor to edit the configuration file The IP addresses for UC 7110 s LANI and LAN2 are given as ifconfig eth0 192 168 3 127 ifconfig ethl 192 168 4 1
28. iting superblocks and filesystem accounting information done his filesystem will be automatically checked every 25 mounts or 180 00 days whichever comes first Use tune2fs c or i to override Command mount dev rami ramdisk ext3 No journal on filesystem on ramdisk 1 1 Command rmdir ramdisk lost found xecution Finished Exiting gt cd ramdisk Use the built in FTP client to download the uc7110 1 x x bin file from the PC ramdisk ftp destination PC s IP Login Name xxxx Login Password xxxx 4 10 UC 7110 Series User s Manual Configuring UC 7110 ftp gt bin ftp gt get uc7110 1 x x bin cd ramdisk ramdisk ftp 192 168 3 11 Connected to 192 168 3 11 220 TYPSoft FIP Server 1 10 ready Name 192 168 3 11 root root 331 Password required for root root logged in set to I ftp get uc7110 1 3 11 bin uc7110 1 3 11 bin Ote uc7110 1 3 11 bin data connection for uc7110 1 3 11 bin 226 Transfer complete 2481236 bytes received in 3 secs 682 Kbytes sec ftp quit 221 Goodbye ramdisk 1s al rw r r 10 0 2481236 uc7110 1 3 11 bin drwxr xr x 10 0 32 drwxr xr x 20 0 1024 ramdisk v And then use the upkernel command to upgrade the kernel and root file system ramdisk upkernel uc7110 1 3 11 bin ramdisk gt reboot ramdisk ls al rw r r 10 0 2481236 uc7110 1 3 11 bin drwxr xr x 10 0 32 1024 you want to continue it Y N
29. kernel image Root File System and Protected configuration 3 2 UC 7110 Series User s Manual Software Package and uses JFFS2 for the User Directory 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 Read ONLY i 0x40000 0x3 fffff 4M 256K Root File System ROMFS Read Write User Directory 0x400000 Ox7fffff 4 M JFFS2 In addition to the flash file systems a RAM based file system will be mounted on var Read Only File System ROMFS ROMFS is a read only file system for Linux This means that it is a non journaling file system Unlike CRAMFS ROMFS does not support code compression A working Linux system requires the kernel and at least some programs so obviously a file system is also needed Most Linux disk file systems are designed to be high performance supporting all POSIX features and sometimes elaborate recovery from crashes journaling This makes the system quite heavy weighted and thus often inappropriate for some special purposes Additional information about ROMES is available at http romfs sourceforge net Journaling Flash File System JFFS2 The flash User Directory is formatted by the Journaling Flash File System JFFS2 which places a compre
30. ll script to enable NAT when UC 7110 boots up as indicated below 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 uh Bo Append iptables resotre home xxx file xxx file is the user defined file name 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 password 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 lt phone_number gt CONNECT user xxxxx password xxxxx dev ttyM0 38400 crtscts amp 4 8 UC 7110 Series User s Manual Configuring UC 7110 ATTENTION If dial out fails the pppd connection will be blocked and the user will need to shut down the pppd and re dial Since the return value is always OK regardless of whether or not the connection is blocked the AP must be set up to check the network status to determine if the connection is complete Dial in Service Direct cable connection e Useeither 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 ttyMO 38400 local crtscts login auth Connect Using a Modem e Use gt pppd co
31. llow 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 UC 7110 must run the portmap utility This program is enabled by default in the etc rce file Use the following command to mount the remote NFS server gt mount t nfs lt remote ip gt lt remote export directory gt lt local directory gt Upgrading the Kernel amp Root File System UC 7110 combines the kernel and root file system into the file uc7110 1 x 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 the file to UC 7110 You can save this file to the UC 7110 s RAM disk and then upgrade the kernel and root file system In what follows we give a step by step example To enable the RAM disk use the commands given below gt upramdisk Command bin sh Command mke2fs dev rami ke2fs 1 25 20 Sep 2001 Filesystem label CS type Linux lock size 1024 10g 0 Fragment size 1024 10g 0 1152 inodes 4608 blocks 230 blocks 4 reserved for the super user First data block 1 1 block group 8192 blocks per group 8192 fragments per group 1152 inodes per group riting inode tables done r
32. n 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 Define policy for chain rules Usage iptables t tables P INPUT OUTPUT FORWARD PREROUTING OUTPUT POSTROUTING ACCEPT DROP P Set the policy for the chain to the given target INPUT For packets coming into the UC 7110 OUTPUT For locally generated packets FORWARD For packets routed out through the UC 7110 PREROUTING To alter packets as soon as they come in POSTROUTING To alter packets as they are about to be sent out Examples iptables P INPUT DROP iptables P OUTPUT ACCEPT iptables P FORWARD ACCEPT iptables t nat P PREROUTING ACCEPT iptables t nat P OUTPUT ACCEPT iptables t nat P POSTROUTING ACCEPT In this example the policy accepts outgoing packets and denies incoming packets 4 6 UC 7110 Series User s Manual Configuring UC 7110 Append or delete rules NAT 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 Append one or more rules to the end of the selected chain I Insert one or more rul
33. nd that the stack size must be indicated in decimal format You cannot use hex format i e numbers that begin with 0x The following LDFLAGS command will fail LDFLAGS g Wl T usr local arm elf lib elf2flt 1ld elf2flt s 0x2000 Use the flthdr utility on a PC to check the current stack size UC 7110 Series User s Manual FAQ for UC 7110 FAQ5 Answer 5 FAQ 6 Answer 6 How do I compress an application program UC7110 s kernel supports ZFLAT format files This means that when you compile the program you can add the compress option to reduce the size of the binary file Doing so will reduce the required flash space on the user disk The disadvantage of using the compress option is that it takes about 5 to 10 more time when loading the program from Flash to RAM After uncompressing and loading the program to RAM there is no difference You just need to modify the makefile LDFLAGS as follows LDFLAGS g WI T usr local arm elf lib elf2flt ld elf2flt z r NOTE The user directory s JFFS2 file system also has a compress function If you compile the program with the ZFLAT feature the file will only be compressed by an additional 5 to 10 when you copy the program into JFFS2 Flash Since UC 7110 s tool chain currently does not support GDB server how do I disable a function by using the Makefile example to generate the gdb file Edit the file usr local arm elf bin Id on the PC Linux platf
34. nnect 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 with the PPP principles which apply to serial connections e Create the Connection gt pppd pty pppoe I lt ETHERNET INTERFACE m 1412 user XUSER NAME password USER PASSWORD amp XETHERNET INTERFACE Ethernet card connected to ADSL modem for example ethO XUSER NAME User account for example moxa adsl net USER PASSWORD Password for user account If the PPPoE is successfully connected and get IP you may check by the command below e ifconfig pppO How to Mount a Remote NFS Server Currently UC 7110 only supports NFS Network File System clients Users can open NFS service on a Linux PC for UC 7110 to push data to UC 7110 can use NFS to mount a remote disk as a local disk for data or log purposes 4 9 UC 7110 Series User s Manual Configuring UC 7110 1 First the NFS server must open an export directory and a
35. nnect to UC 7110 s serial console terminal and then delete files from the Flash ROM 2 9 UC 7110 Series User s Manual Getting Started Make File Example Code The following Makefile file example codes are copied from the Hello example from UC 7110 s CD ROM Generated automatically from Makefile in by configure SId Makefile in v 1 59 2002 03 24 22 20 19 jnelson Exp SUFFIXES SUFFIXES O c PHONY clean mrclean distclean depend all dist GCC FLAGS Wstrict prototypes Wpointer arith Wcast align Wcast qualN WtraditionalN Wshadow Wconversion Waggregate return Wmissing prototypes Wnested externs Wall Wundef Wwrite strings Wredundant decls Winline srcdir VPATH extras LDFLAGS g Wl T usr local arm elf lib elf2flt ld elf2flt LIBS CFLAGS g O2 pip Wall I Change these if necessary YACC bison y EX flex CC usr local bin arm elf gcc CPP usr local bin arm elf gcc E SOURCES hello c OBJS SOURCES c 0 all hello hello OBJS CC o 80 LDFLAGS S LIBS clean rm f S OBJS hello core gdb 2 10 UC 7110 Series User s Manual Getting Started ATTENTION There is another example that involves modifying the Makefile If the target source code file is tcps1 c then users should modify at least 4 places to replace hello with teps1 DFLAGS 9g M1 T
36. nternet 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 routing process It has three extensions TTL MARK TOS The following figure shows the IPTABLES hierarchy 4 4 UC 7110 Series User s Manual Configuring UC 7110 NOTE Incoming Packets Mangle Table PREROUTING Chain NAT Table PREROUTING Chain Local Host Packets Mangle Table INPUT Chain Other Host Packets Mangle Table FORWARD Chain Filter Table INPUT Chain Local Process Mangle Table OUTPUT Chain Filter Table FORWARD Chain Mangle Table POSTROUTING Chain NAT Table OUTPUT Chain Filter Table OUTPUT Chain NAT Table POSTROUTING Chain Outgoing Packets UC 7110 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 na
37. oblem will allow us to reproduce the symptoms and expedite the repair of your product UC 7110 Series 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
38. on located on your PC s desktop to launch this utility p UC Finder The Searching window will show the Universal Communicators that have been located You can click on Stop as soon as the Universal Communicator you are looking for is listed ST i x Searching for UC Stop Found 1 UC s remain timeout 3 second s No Model MaCAddess IP Address UC 7110 00 90 E8 00 00 83 132 168 4 127 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 IDI File Function About 2 Broadcast Search No Model MAC Address IP Address uc 7110 00 90 E8 00 00 B3 192 168 4 127 Search Result 1 UC s UC 7110 Series User s Manual UC Finder Linux ucfinder To use the Linux ucfinder utility copy ucfinder from the CD ROM to your Linux PC and then use the command given below to start ucfinder The ucfinder utility will automatically broadcast a message over your LAN network to find the IP address of all UC s connected to the LAN ucfinder A System Commands busybox V0 60 4 uClinux normal command utility collection File manager Editor cp copy file Is list file In make symbolic link file mount mount and check file system
39. ons Adding a Web Page IPTABLES NAT Configuring Dial in Dial out Service Configuring PPPoE How to mount a remote NFS Server Upgrading the Kernel amp Root File System Upgrading the User Directory User Directory Backup UC 7110 to PC Loading Factory Defaults Mirroring the Application Program and Configuration How to Autostart User Applications on Bootup Checking the Kernel and User Directory Versions UC 7110 Series User s Manual Configuring UC 7110 Enabling and Disabling Daemons The following daemons are enabled when UC 7110 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 UC 7110 plays the role of Time client and sends requests to the Network Time Server to request t
40. orm Add one line after line 133 the content of line 133 is rm f OFILE elf not needed for any reason as follows rm f SOFILE gdb I e after you edit the file lines 133 and 134 will look like Line 133 rm f SOFILE elf not needed for any reason Line 134 rm f SOFILE gdb 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 a MOXA Internet Services Q Problem Report Form Q Product Return Procedure UC 7110 Series User s Manual Service Information MOXA Internet Services Customer satisfaction is our number one concern and 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 support support moxa com tw World Wide Web WWW Site for product information Bp Gui te rere de http www moxa com D 2 UC 7110 Series User s Manual Service Information Problem Report Form MOXA UC 7110 Series Customer name 1 Moxa Product L1UC 7110 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 pr
41. outeMetric3 ipRouteMetric4 ipRouteNextHop ipRouteType ipRouteProto ipRouteAge ipRouteMask ipRouteMetric5 ipRouteInfo ipNetToMediaTable ipNetToMedialfIndex ipNetToMediaPhysA ddress ipNetToMediaNetAddress ipNetToMediaType ipRoutingDiscards B 2 UC 7110 Series 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 snmpOutBad Values 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 rs232O0utSigTable rs2320utSigPortIndex rs2320utSigName rs2320utSigState B 3 FAO 1 Answer 1 FAQ2 Answer 2 FAQ3 Answer 3 FAQ 4 Answer 4 C FAQ for UC 7110 Why can I only u
42. rm delete file chmod change file owner amp group amp user sync sync file system save system file buffer to hardware mv move file pwd display active file directly df list active file system space 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 zcat Compress or expand files 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 sleep sleep seconds echo echo string UC 7110 Series User s Manual System Commands Network 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 Process kill kill process killall kill process by name ps report process status sleep suspend command on time Ot
43. root Pu nw W nPW ntw oot P WP WP h root e 02 pipe Wall I c 0 hello o hello C 0 hello hello o g ll L local anrm elf lib el tiln t l root root W p np l Py nu root localhost 1 1n 1n 1 1 1 2 7 UC 7110 Series User s Manual Getting Started Uploading Hello to UC 7110 To use FTP to upload hello to UC 7110 issue the following commands from the PC side ftp 192 168 3 127 ftp cd home ftp bin ftp put hello ftp quit telnet 192 168 3 127 1 0 complet one mnt home is current dir 2 8 UC 7110 Series User s Manual Getting Started Running Hello on UC 7110 To run the Hello program issue the following commands from the UC 7110 side chmod 755 hello hello The words Hello World will be printed on the screen ct Telnet 192 168 3127 Ht HHH HH KH HH E HHH 8 HH HHHHHH oH HERRER HAHAHAHAHA HHRHHHH KAHAHAHAHAH HAHAHA information check noxa com 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 df lk blocks Used Available Use Mounted on 1525 1525 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 use the console cable to co
44. rroring the Application Program and Configuration For some applications you may need to Mirror or sometimes we said Ghost one UC 7110 s user directory and duplicate it to other UC 7110s To do this use the following recommended procedure 1 Backup the user directory to a PC Refer to the previous topic User Directory Backup UC 7110 to a PC Hint ramdisk backupfs ramdisk lt user defined file name gt 2 Download the backed up user directory to the other UC 7110 Refer to the previous topic Upgrading the User Directory Hint ramdisk bf ramdisk lt User directory file name gt How to Autostart 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 User Directory Versions Use the following commands to check the version of the kernel and root file system To check the kernel version gt kversion To check the user directory version gt cat etc version 4 14 9 UC 7110 Device API In this chapter we discuss the Device API for the UC 7110 Series We introduce the APIs for the following functions a RTC Real Time Clock Q Buzzer a UART Interface UC 7110 Series User s Manual UC 7110 Device API RTC Real Time Clock The device node is located at dev rtc UC 7110 supports wClinux standard simple RTC control You must include lt linux rtc h gt to use these
45. s aree eap ec Ro aa eels 1 11 Reset B ttOn ise on ee e e Sedit e n PIE 1 11 R al Time Clock rtt eee eo t fag ete Reese 1 12 Getting State coc ioi na EN GE Ran VE ka aui awe ede c Ka DO GR GR eT n da iE ae 2 1 Powering on UC 7110 4 iiec cete eee ed E ee ECHO ERE i Fee 2 2 Connecting UC 7110 to a PC asas ake aga enne ener ennt nnne nennen 2 2 Console Pofta 2 2 n tet o ne rrt ere ir er ew D ep e ore a 2 2 Telnes tnne NANG NG 2 3 Configuring the Ethernet Interface ssssssesseseesee eene nennen 2 4 Developing Your Applications sesessesesseseeeeereer ener enne nnne 2 6 Installing the UC 7110 Tool Chain esseseeeeeeneeenne eene 2 6 Compiling Hell0 6 5 aie dig ene t e e ROAR nee RE ae ie cU tu teen 2 7 Uploading Hello toUC 7110 eene ete eet eres 2 8 Running Hello on UC 7110 sese eere enne nennen nnne 2 9 Make File Example Code eie ree e dee 2 10 Software PACKAGE awise susen sun aita bx aena Ew nri E LER ER EROR gc 3 1 UC 7T10 Software Architecture eene RH a n e REO eR 3 2 Read Only File System ROMEFS oono anane aane n anaa anana anana a aa naen anane eee 3 3 Journaling Flash File System JFFS2 essen 3 3 UC 7110 Software Package oeste nete Red eH 3 4 Configuring UC 7110 iai bet cri ru pretiosis etur nri ires FOR UR PP x Ras SESS ERE 4 1 Enabling and Disabling Daemons ssesesese
46. s 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 UC 7110 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 dhcped ttypl cpu ttyp0 3 4 UC 7110 Series User s Manual Software Package bin dev busybox ttySO boa tty3 bf tty2 backupfs tty downramdisk ttyO upramdisk romi rom0 ptypf ptype ptypd ptype ptypb ptypa ptyp9 ptyp8 ptyp7 ptyp6 ptyp5 ptyp4 ptyp3 ptyp2 ptypl ptyp0 ppp pio rtc raml ram0 null kmem mem cua0 console tty 4 Configuring UC 7110 In this chapter we describe how to configure UC 7110 Series products The following topics are covered in this chapter D D D 0 O O O D D D D DO D D Enabling and Disabling Daem
47. se 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 son process calls an exec group API or exits When using a pthread group API why can t 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 Ipthred to add an option to the linker What is the correct format for linking to an AP arm elf gcc W1 elf2flt In this example the AP converts elf format to flat format What stack size can I use when creating a user application First note that UC 7110 1s not an MMU processor The OS is uClinux so you must transfer your application from ELF to FLAT format The transfer utility on the PC assigns a stack size of 0x1000 by default If your application needs a bigger stack size you must use an option that specifies stack size when transferring the application from ELF to FLAT format The following LDFLAGS shows how to write the stack size option LDFLAGS g W1 T usr local arm elf lib elf2flt 1ld elf2flt s 32768 You can combine this with a compress option E g LDFLAGS g W1 T usr local arm elf lib elf2flt 1d elf2flt z r s 32768 Refer to the next FAQ for compress options Keep in mi
48. seeeee eee nnne 4 2 Adding a Web Page cesa EUH Rea dee Han 4 3 IBTABEBS retirees te teet eee dert aee ier OPES 4 3 D up E 4 7 NAT Example oce een IRR ERU 4 7 Enabling NAT at Bootup eee bete a e EL e renes tope 4 8 Chapter 5 Chapter 6 Appendix A Appendix B Appendix C Appendix D Configuring Dial in Dial out Service essen enne 4 8 Di al out Service ice ede ede eie re eat eerie ee a ag redd 4 8 Dial in Service aoo Siu esum m teta bete ie a 4 9 Configuring PPPOE niii tete ede e e eee E HERE URS RESET 4 9 How to Mount a Remote NFS Server E NGE GG AGA NGE A WENG D enne ener nne nnne ens 4 9 Upgrading the Kernel amp Root File System sees 4 10 Upgrading the User Directory saose eea eaaa eren eene enne enne rennes 4 11 User Directory Backup UC 7110 to PC eene 4 13 Loading Factory Defaults aues eee RI Ie PER GET eee UR Da DER one 4 14 Mirroring the Application Program and Configuration 4 14 How to Autostart User Applications on Bootup ssssssssesseeeeeneeneeneenee enn 4 14 Checking the Kernel and User Directory Versions sse 4 14 UG 7110 Device APL iioii rdiet eoe eis eoi ceo da Erud es Eo ce tuae paene Na Ra EEE 5 1 RIG Real Time Clock 2 esent dede ce ear do 5 2 ly 5 2 UART Intetface z oid er EIU ARRIANUS NUES 5 2 UC Juplpe
49. ssed file system on the flash transparent to the user The Journaling Flash File System JFFS2 was developed by Axis Communications in Sweden JFFS2 provides a file system directly on flash rather than emulating a block device designed for use on flash ROM chips and it recognizes flash ROM chips special write requirements 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 e Robust e Consistent across power failure e No integrity scan fsck is required at boot time after normal or abnormal shutdown Explicit wear leveling Transparent compression 3 3 UC 7110 Series User s Manual Software Package Although JFFS2 is a journaling file system this does not preclude the loss of data The file system will remain in a consistent state acros
50. t snmp basic ipt TCPMSS ipt mark ip queue ipt TOS ipt multiport ipt LOG ipt ULOG ipt owner UC 7110 does NOT support IPV6 and ipchains Use iptables iptables restore iptables save to maintain the database 4 5 UC 7110 Series User s Manual Configuring UC 7110 NOTE IPTABLES plays the role of 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 access We recommend using the Serial Console to set up the IPTABLES Click on the following links for more information about iptables http www linuxguruz com iptables http www netfilter org documentation HOWTO packet filtering HOWTO 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 1f none is listed X Delete the specified user defined chain Z Set the packet and byte counters i
51. ted 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 SG wire to an appropriate grounded metal surface V V 12 48V Connecting Data Transmission Cables This section describes how to connect UC 7110 to the network serial devices and serial COM terminal Connecting to the Network Connect one end of the Ethernet cable to UC 7110 s 10 100M Ethernet port and the other end of the cable to the Ethernet network If the cable is properly connected UC 7110 will indicate a valid connection to the Ethernet in the following ways e The top right LED on the connector maintains a solid green color when connected to a 100 Mbps Ethernet network e The top left LED on the connector maintains a solid orange color when connected to a 10 Mbps Ethernet network e The LEDs will flash when Ethernet packets are being transmitted or received UC 7110 Series 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 the following diagram 8 pin RJ45 10 Mbps 100 Mbps Pin Signal indicator indicator 1 ETx T 2 ETx 3 ERx 4 5 m 1 8 6 ERx 7 8 Connecting to a Serial Device Connect the serial
52. terface mod 2 Function MOXA GET OP MODE int mode int ioctl fd MOXA GET OP MOD E amp mode Description Gets the interface mod UC Finder UC 7110 comes with a UC Finder utility which has the sole purpose of searching the LAN or intranet for UC 7110 units For most of applications it s 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 UC 7110 supports the GUI style Windows UC Finder and also supports a command line utility for Linux environments In this chapter we discuss the following UC Finder topics Q Windows UC Finder a Linux UCfinder UC 7110 Series User s Manual UC Finder Windows UC Finder The following steps describe how to install UC Finder on a Windows PC 1 Double click on the UC Finder installation program Setup exe to start the installation 2 When the Welcome to the UC Finder Setup Wizard window opens click on Next to continue i Setup UC Finder E15 xl Welcome to the UC Finder Setup Wizard This will install UC Finder on your computer It is recommended that you close all other applications before continuing Click Next
53. tton is not designed to Hard Reboot UC 7110 ATTENTION Resetting to factory default will not format the user directory and erase all of the user s data Loading factory default will only load the configuration file The files in UC 7110 that will be changed include a etc boa conf o etc hosts etc inittab a 9 etc password o etc ramfs img b etc resolv conf etc version p gt 0s etc group i etc inetd conf j etc motd k etc protocols l etc rc m etc services o home httpd boa conf p home httpd index html ATTENTION This function only takes effect when the user directory is working correctly If the user directory has crashed the kernel will automatically load factory default UC 7110 Series User s Manual Introduction Real Time Clock UC 7110 s real time clock is powered by a lithium battery We strongly recommend that you do 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 the 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 UC 7110 connected This chapter covers the following topics gt gt gt gt gt a Powering on UC 7110 a Connecting UC
54. usr local arm elf lib elf2flt ld elf2fl1t FLAGS g 82 pipe Wall I ACC bison y EX flex C usr local bin arm elf gcc PP usr local bin arm elf gcc E OURCES tcpsi c BJS CSOURCES c 0 gt 11 tcpsi cpsi lt OBJS gt CC o 8 CXLDFLAGS lt LIBS gt lean rm f COBJS gt tcps core gdb Copy the Hello example s Makefile to your source code target directory and then modify it to work with your program After that follow the procedures outlined in the previous sections Compiling Hello c Uploading Hello to UC 7110 and Running Hello on UC 7110 2 11 3 Software Package This chapter includes information about the software that is used with UC 7110 Series products This chapter covers the following topics a UC 7110 Software Architecture a UC 7110 Software Package UC 7110 Series User s Manual Software Package UC 7110 Software Architecture The pre installed uClinux Operating System used by UC 7110 follows the standard uClinux architecture making programs that follow the POSIX standard easily ported to UC 7110 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 WUS amp boot parameters IP Configuration
55. vices ifSpeed icmpInRedirects ifPhysAddress icmpInEchos ifAdminStatus icmpInEchoReps ifOperStatus icmpInTimestamps ifLastChange icmpInAddrMasks ifInOctets icmpInAddrMaskReps ifInUcastPkts icmpOutMsgs ifInNUcastPkts icmpOutErrors ifInDiscards icmpOutDestUnreachs ifInErrors icmpOutTimeExcds iffnUnknownProtos icmpOutParmProbs ifOutOctets icmpOutSrcQuenchs ifOutUcastPkts icmpOutRedirects ifOutNUcastPkts icmpOutEchos ifOutDiscards icmpOutEchoReps ifOutErrors icmpOutTimestamps ifOutQLen icmpOutAddrMasks ifSpecific icmpOutA ddrmaskReps UC 7110 Series 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 tcpCurrEstab ipOutRequests tcpInSegs ipOutDiscards tcpOutSegs ipOutNoRoutes tcpRetransSegs ipReasmTimeout tcpConnTable ipReasmReqds tcpConnState ipReasmFails tcpConnLocalAddress ipFragOKs tcpConnLocalPort ipFragFails tcpConnRemA ddress ipFragCreates tcpConnRemPort ipAddrTable tcpInErrs ipAdEntAddr tcpOutRsts ipAdEntIfIndex ipAdEntNetMask ipAdEntBcastAddr ipAdEntReasmMaxSize ipRouteTable ipRouteDest ipRoutelIfIndex ipRouteMetricl ipRouteMetric2 ipR

Download Pdf Manuals

image

Related Search

Related Contents

Venus Series SIP User`s Manual  かざしタイム KT-01 取扱説明書  水上オートバイ リブ同乗者死亡事故等 の進捗状況について    Samsung CTR464EB01 Kullanıcı Klavuzu  CoSign Quick Guide: Virtual Signing  Makita GA7001 User's Manual  カタログ  Référentiel des métiers-types des professionnels de l  

Copyright © All rights reserved.
Failed to retrieve file