Moxa Technologies UC-7410 Скачать руководство пользователя страница 7

UC-7420/7410 User’s Manual 

Introduction 

 

1-2

Overview 

UC-7420/7410 RISC-based Communication Platforms are ideal for embedded applications. 
UC-7420/7410 has eight RS-232/422/485 serial ports, dual 10/100 Mbps Ethernet ports, a 
PCMCIA interface for wireless LAN communication, and CompactFlash and USB port for mass 
storage flash disk expansion. 

UC-7420/7410 uses an Intel XScale IXP-422 266 Mhz RISC CPU. Unlike the X86 CPU, which 
uses a CISC design, the IXP-422’s RISC design architecture and modern semiconductor 
technology provide UC-7420/7410 with a powerful computing engine and communication 
functions, but without generating a lot of heat. The built-in 32 MB NOR Flash ROM and 128 MB 
SDRAM give you enough memory to put your application software directly on UC-7420/7410. 
And since the dual LAN ports are built right into the IXP-422 CPU, UC-7420/7410 makes an ideal 
communication platform for Network Security applications. If your application requires placing 
UC-7420/7410 in a location that is not located near an Ethernet LAN connection, you can use 
UC-7420/7410’s PCMCIA port to attach a wireless LAN card. 

The pre-installed Linux operating system provides an open software operating system for your 
software program development. Software written for desktop PCs can be easily ported to the 
UC-7420/7410 platform with a GNU cross compiler, without needing to modify the source code. 
All of the necessary device drivers, such as a PCMCIA Wireless LAN module and Keypad, LCM, 
and Buzzer control, are also included with UC-7420/7410. The Operating System, device drivers, 
and the software you develop for your own application, can all be stored in UC-7420/7410’s Flash 
memory. 

Package Checklist 

UC-7410-LX 

RISC-based Universal Communicator with 8 Serial Ports, Dual Ethernet, Linux OS 

UC-7420-LX 

RISC-based Universal Communicator with 8 Serial Ports, Dual Ethernet, PCMCIA, Compact 
Flash, USB, Linux OS 

UC-7420/7410 is shipped with the following items: 

y

 

UC-7410 or UC-7420 

y

 

Wall-Mounting Kit 

y

 

DIN-Rail Mounting Kit 

y

 

UC-7420/7410 Quick Installation Guide 

y

 

UC-7420/7410 Documentation & Software CD 

y

 

Cross-over Ethernet cable 

y

 

CBL-RJ45M9-150: 150 cm, 8-pin RJ45 to Male DB9 serial port cable 

y

 

CBL-RJ45F9-150: 150 cm, 8-pin RJ45 to Female DB9 console port cable 

y

 

Power Adaptor 

y

 

Product Warranty Booklet 

NOTE: 

Notify your sales representative if any of the above items is missing or damaged.

 

Product Features 

y

 

Intel XScale IXP-422 266 MHz Processor 

y

 

On-board 128 MB RAM, 32 MB Flash ROM 

y

 

Eight RS-232/422/485 serial ports 

y

 

Dual 10/100 Mbps Ethernet 

Содержание UC-7410

Страница 1: ... s Manual Third Edition June 2005 www moxa com product Moxa Technologies Co Ltd Tel 886 2 8919 1230 Fax 886 2 8919 1231 Web www moxa com MOXA Technical Support Worldwide support moxa com tw The Americas support moxa com ...

Страница 2: ... 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 M...

Страница 3: ... 11 Software Introduction 1 12 Software Architecture 1 12 Journaling Flash File System JFFS2 1 13 Software Package 1 13 Software Version Comparison Table 1 14 Chapter 2 Getting Started 2 1 Powering on UC 7420 7410 2 2 Connecting UC 7420 7410 to a PC 2 2 Serial Console 2 2 Telnet Console 2 3 SSH Console 2 4 Configuring the Ethernet Interface 2 5 Modifying Network Settings with the Serial Console 2 ...

Страница 4: ...aemon to Execute Scheduled Commands 3 11 Connecting Peripherals 3 12 USB Mass Storage 3 12 CF Mass Storage 3 12 Chapter 4 Managing Communications 4 1 Telnet FTP 4 2 DNS 4 2 Web Service Apache 4 2 Saving a Web Page to the CF Card 4 4 IPTABLES 4 6 NAT 4 10 NAT Example 4 10 Enabling NAT at Bootup 4 10 Dial up Service PPP 4 11 NFS Network File System 4 14 Setting up UC 7420 7410 as an NFS Server 4 14 ...

Страница 5: ...ty collection A 1 File manager A 1 Editor A 1 Network A 1 Process A 2 Other A 2 MOXA special utilities A 2 Appendix B Windows Tool Chain Introduction B 1 Introduction B 2 Installation Procedure B 3 Using the BASH Shell B 6 GDB debug tool Insight B 7 Appendix C Service Information C 1 MOXA Internet Services C 2 Problem Report Form C 3 Product Return Procedure C 4 ...

Страница 6: ...his chapter Overview Package Checklist Product Features Product Hardware Specifications Hardware Introduction Appearance and Dimensions Hardware Block Diagram LED Indicators Reset type Buttons Real Time Clock Placement Options Wall or Cabinet DIN Rail Mounting Hardware Connection Description Wiring Requirements Connecting the Power Grounding UC 7420 7410 Connecting to the Network Connecting to a S...

Страница 7: ... software operating system for your software program development Software written for desktop PCs can be easily ported to the UC 7420 7410 platform with a GNU cross compiler without needing to modify the source code All of the necessary device drivers such as a PCMCIA Wireless LAN module and Keypad LCM and Buzzer control are also included with UC 7420 7410 The Operating System device drivers and t...

Страница 8: ...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 RTS CTS XON XOFF Speed 50 bps to 921 6 Kbps 50 bps to 230 4 Kbps for Hardware version V1 0 Serial Console PPP RS 232 x 1 RJ45 USB 2 0 Host N A 2 USB 1 1 Client 1 1 PCMCIA N A PCMCIA type I II socket x 1 Compact Flash N A CompactFlash type I ...

Страница 9: ...onsole V V PCMCIA CF 12 48 VDC Power Input CF x 1 PCMCIA x 1 10 100 Mbps Ethernet x 2 USB 2 0 Host x 2 A Type Connector USB 1 1 Client x 1 miniB Connector RS 232 PPP Console UC 7410 7420 Top View Graphics LCM 128 x 64 Dots 5 Buttons UC 7410 7420 Front View Reset P1 RS 232 422 485 P2 P3 P4 P5 P6 P7 P8 Reset to default RJ45 RS 232 422 485 Connectors x 8 ...

Страница 10: ...UC 7420 7410 User s Manual Introduction 1 5 Dimensions 197 mm 7 76 125 mm 4 92 44 mm 1 73 ...

Страница 11: ...play Keypad 7 8 5 6 1 2 3 4 PHY PHY RTC LED Indicators UC 7420 7410 has 12 LED indicators on the top panel Refer to the following table for information about each LED LED Name Color Meaning Ready Green Power is ON and system is ready after booting up Yellow 10 Mbps Ethernet connection LAN1 LAN2 Green 100 Mbps Ethernet connection Yellow Console port is receiving RX data from the serial device Conso...

Страница 12: ...x system always use the software reboot command reboot to protect the integrity of data being transmitted or processed The Reset to default button is not designed to hard reboot UC 7420 7410 ATTENTION Reset to default preserves user s data The Reset to default button will NOT format the user directory and erase the user s data Pressing the Reset to default button will only load the configuration f...

Страница 13: ... a wall or the inside of a cabinet Use two screws per bracket first to attach the brackets to the bottom of the UC 7420 7410 Fig A Next use two screws per bracket to attach the UC 7420 7410 to a wall or cabinet Fig B Figure A UC 7420 7410 Universal Communicator Wall Mounting Brackets bottom view Figure B UC 7420 7410 Universal Communicator Wall Mounting Brackets top view ...

Страница 14: ...Port PCMCIA and CompactFlash Wiring Requirements ATTENTION Safety First Be sure to disconnect the power cord before installing and or wiring your UC 7420 7410 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 o...

Страница 15: ...well grounded mounting surface such as a metal panel SG DC 12 48V 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 Connecting to the Network Connect one end of the Ethernet cable to one of UC 7420 7410 s 10 100M Ethe...

Страница 16: ... for normal data acquisition applications you can set the Console port to startup via PPP protocol For details refer to Dial up Service PPP section in Chapter 4 PCMCIA The PCMCIA slot supports the CardBus Card 32 Card standard and 16 bit PCMCIA 2 1 JEIDA 4 2 Card standard It supports 3 3V 5V and 12V at a working voltage of 120 mA Wireless LAN card expansion is optional The Wireless LAN card provid...

Страница 17: ...ol Schedule Process RS 232 422 485 Ethernet PCMCIA CompactFlash USB File System Hardware OS Kernel UC 7420 7410 s Flash ROM is partitioned into Boot Loader Linux Kernel Mini Root File System and User Root File System partitions In order to prevent user applications from crashing the Root File System UC 7420 7410 uses a specially designed Mini File System with Protected Configuration for emergency ...

Страница 18: ... and does not require fsck file system check on boot up JFFS2 is the newest version of JFFS It 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 which enhances the write life of the device...

Страница 19: ... library Insight V60 1 Windows environment source level debug utility Device Drivers PCMCIA Card Bus Wireless LAN Card Bus CF Mass storage CompactFlash USB Flash Disk Software Version Comparison Table The following table is presented to give you a better understanding of the software capabilities of the firmware version you are using Note that some versions including versions that just involved bu...

Страница 20: ...ptable N A N A Yes Open VPN N A N A Yes WatchDog API N A N A Yes Crontable N A N A Yes upfirm N A N A Yes backupuf N A N A Yes backupfs bf Yes Yes N A minicom Yes Yes Replace by tip Directory Change var User File System User File System Change to ramdisk Apache root document usr html usr html usr www ...

Страница 21: ...Configuring the Ethernet Interface Modifying Network Settings with the Serial Console Modifying Network Settings over the Netowork Configuring the WLAN via the PCMCIA Interface IEEE802 11b IEEE802 11g Test Program Developing Hello c Installing the Tool Chain Linux Checking the Flash Memory Space Compiling Hello c Uploading Hello to UC 7420 7410 and Running the Program Developing Your First Applica...

Страница 22: ... UC 7420 7410 to a PC There are two ways to connect UC 7420 7410 to a PC through the serial Console port or via Telnet over the network Serial Console The serial console port gives users a convenient way of connecting to UC 7420 7410 s console utility This method is particularly useful when using UC 7420 7410 for the first time The signal is transmitted over a direct serial connection so you do no...

Страница 23: ...r PC is on the same subnet as one of UC 7420 7410 s two LAN ports For example if you connect to LAN 1 you can set your PC s IP address to 192 168 3 126 and netmask to 255 255 255 0 If you connect to LAN 2 you can set your PC s IP address to 192 168 4 126 and netmask to 255 255 255 0 To connect to a hub or switch connected to your local LAN use a straight through Ethernet cable The default IP addre...

Страница 24: ...subnet as the UC 7420 7410 you wish to contact If you do not get connected on the first try re check the serial and IP settings and then unplug and re plug UC 7420 7410 s power cord SSH Console UC 7420 7410 supports an SSH Console to offer users with better security options Windows Users Click on the link http www chiark greenend org uk sgtatham putty download html to download PuTTY free software ...

Страница 25: ...UC 7420 7410 s network settings can be modified with the serial Console or online over the network Modifying Network Settings with the Serial Console In this section we use the serial console to modify UC 7420 7410 s network settings 1 Follow the instructions given in a previous section to access UC 7420 7410 s Console Utility via the serial Console port and then type cd etc network to change dire...

Страница 26: ...th dhcp and then delete the address network netmask and broadcast lines Default Setting for LAN1 Dynamic Setting using DHCP iface ixp0 inet static address 192 168 3 127 network 192 168 3 0 netmask 255 255 255 0 broadcast 192 168 3 255 iface ixp0 inet dhcp 3 After the boot settings of the LAN interface have been modified issue the following command to activate the LAN settings immediately etc init ...

Страница 27: ...ommand ifconfig ixp0 192 168 1 1 to change the IP address of LAN1 to 192 168 1 1 Configuring the WLAN via the PCMCIA Interface IEEE802 11b The following IEEE802 11b wireless modules are supported y NDC NWH1010 y Senao NL 2511CD PLUS F200 y Senao NL 2511CD PLUS EXT2 MERCURY ETSI y Senao NI3 2511CD PLUS3 y DARK DKW11 330HP y DARK XI 330H y Planex PCI GW NS11H y Corega CG WLPCCL 11 To configure the W...

Страница 28: ...work administrator for SSID required in your wireless network For example SSID_waln0 any Enable_wlan0 y 4 Duplicate the configuration profile to a new profile cp etc wlan wlancfg DEFAULT etc wlan wlancfg any Copy configuration profile DEFAULT to new configuration profile any 5 Configure the WEP setting if WEP is required on your wireless network vi etc wlan wlancfg any ...

Страница 29: ... 7108PCg y Amigo AWP 914W y GigaByte GN WMGK y Other brands that use the Ralink RT2560 series chip set To configure the WLAN for IEEE802 11g 1 Unplug the CardBus Wireless LAN card first 2 Use the command vi etc networking interfaces to open the interfaces configuration file with vi editor and then edit the 802 11g network settings circled in red in the following figure ...

Страница 30: ...or Setting options for the various parameters are listed below the figure CountryRegion Sets the channels for your particular country region Setting Explanation 0 use channels 1 to 11 1 use channels 1 to 11 2 use channels 1 to 13 3 use channels 10 11 4 use channels 10 to 13 5 use channel 14 6 use channels 1 to 14 7 use channels 3 to 9 WirelessMode Sets the wireless mode Setting Explanation 0 11b g...

Страница 31: ...nel you want to use AuthMode Sets the authentication mode Setting OPEN SHARED WPAPSK WPANONE EncrypType Sets encryption type Setting NONE WEP TKIP AES DefaultKeyID Sets default key ID Setting 1 to 4 Key1Str Key2Str Key3Str Key4Str Sets strings Key1 to Key4 Setting The keys can be input as 5 ascii characters 10 hex numbers 13 ascii characters or 26 hex numbers TxBurst WPA pre shared key Setting 8 t...

Страница 32: ... Explanation 0 auto 1 always on 2 always off ShortSlot Enables or disables the short slot time Setting Explanation 0 disable 1 enable TxRate Sets the TxRate Setting Explanation 0 Auto 1 1 Mbps 2 2 Mbps 3 5 5 Mbps 4 11 Mbps 5 6 Mbps 6 9 Mbps 7 12 Mbps 8 18 Mbps 9 24 Mbps 10 36 Mbps 11 48 Mbps 12 54 Mbps RTSThreshold Sets the RTS threshold Setting 1 to 2347 FragThreshold Sets the fragment threshold ...

Страница 33: ...n Redhat 7 3 8 0 Fedora core and compatible versions are recommended The Tool Chain requires about 100 MB of hard disk space on your PC The UC 7420 7410 Tool Chain software is located on the UC 7420 7410 CD To install the Tool Chain insert the CD into your PC and then issue the following commands mount dev cdrom mnt cdrom rpm ivh mnt cdrom mxscaleeb 3 3 2 1 386 rpm The Tool Chain will be installed...

Страница 34: ...ollowing commands cd example hello make You should receive the following response root localhost hello make usr local mxscaleb bin mxscaleb gcc o hello release hello c usr local mxscaleb bin mxscaleb strip s hello release usr local mxscaleb bin mxscaleb gcc ggdb o hello debug hello c root localhost hello _ Next execute the hello exe to generate hello release and hello debug which are described bel...

Страница 35: ...ild an application for UC 7420 7410 The procedure outlined in the following subsections will show you how to build a TCP Server program plus serial port communication that runs on the UC 7420 7410 Testing Environment The tcps2 example demonstrates a simple application program that delivers transparent bi directional data transmission between UC 7420 7410 s serial and Ethernet ports As illustrated ...

Страница 36: ...tcps2 release tcps2 c usr local mxscaleb bin mxscaleb strip s tcps2 release usr local mxscaleb bin mxscaleb gcc o tcpsp release tcpsp c usr local mxscaleb bin mxscaleb strip s tcpsp release usr local mxscaleb bin mxscaleb gcc ggdb o tcps2 debug tcps2 c usr local mxscaleb bin mxscaleb gcc ggdb o tcpsp debug tcpsp c You have new mail in var spool mail root root server11 1st _application 11 total 92 ...

Страница 37: ...ansfer files ftp bin 200 Type set to I ftp put tcps2 release local tcps2 release remote tcps2 release 277 Entering Passive Mode 192 168 3 127 82 253 150 Opening BINARY mode data connection for tcps2 release 226 Transfer complete 4996 bytes sent in 0 00013 seconds 3 9e 04 Kbytes s ftp ls 227 Entering Passive Mode 192 168 3 127 106 196 150 Opening ASCII mode data connection for bin ls rw 1 root root...

Страница 38: ...job number 1 to terminate this program kill 1 ps ef use this command to check if the program is running 192 168 3 127 PuTTY 1 Running tcps2 release root Moxa ps ef PID Uid VmSize Stat Command 1 root 1296 S init 2 root S keventd 3 root S ksoftirqd_CPU0 4 root S kswapd 5 root S bdflush 6 root S kupdated 7 root S mtdblockd 8 root S khubd 10 root S jffs2_gcd_mtd3 32 root D ixp425_csr 34 root S ixp425 ...

Страница 39: ...process is running jobs or ps ef 4 Use a serial cable to connect PC1 to UC 7420 7410 s serial port 1 5 Use an Ethernet cable to connect PC2 to UC 7420 7410 6 On PC1 If running Windows use HyperTerminal 38400 n 8 1 to open COMn 7 On PC2 Type telnet 192 168 3 127 4001 8 On PC1 Type some text on the keyboard and then press Enter 9 On PC2 The text you typed on PC1 will appear on PC2 s screen The testi...

Страница 40: ...Ethernet communication and serial port communication However the example program has some limitations that make it unsuitable for real life applications 1 The serial port is in canonical mode and block mode making it impossible to send data from the Ethernet side to the serial side i e from PC 2 to PC 1 in the above example 2 The Ethernet side will not accept multiple connections ...

Страница 41: ...ng topics are covered in this chapter System Version Information System Image Backup Upgrating the Firmware Loading Factory Defaults Backing Up the User File System Deploying the User File System to Additional UC 7420 7410 Units Enabling and Disabling Daemons Setting the Run Level Adjusting the System Time Setting the Time Manually NTP Client Updating the Time Automatically Cron daemon to Execute ...

Страница 42: ...same However to help users define the user file system the kernel and user file system are separate and hence could have different version numbers For this reason we provide two utilities called kversion and fsversion that allow you to check the version numbers of the kernel and file system respectively System Image Backup Upgrading the Firmware UC 7420 7410 s bios kernel mini file system and user...

Страница 43: ...give the steps required to save the firmware file to UC 7420 7410 s RAM disk and then upgrade the firmware 1 Type the following commands to enable the RAM disk upramdisk cd mnt ramdisk 2 Type the following commands to use UC 7420 7410 s built in FTP client to transfer the firmware file uc7400 x x x frm from the PC to UC 7420 7410 mnt ramdisk ftp destination PC s IP Login Name xxxx Login Password x...

Страница 44: ...mat MTD device dev mtd1 MTD device dev mtd1 erase 128 Kibyte 100000 100 complete Wait to write file Compleleted 100 Now upgrade the file mini file system Format MTD device dev mtd2 MTD device dev mtd2 erase 128 Kibyte 400000 100 complete Wait to write file Compleleted 100 Now upgrade the file user file system Format MTD device dev mtd3 MTD device dev mtd3 erase 128 Kibyte 1a00000 100 complete Wait...

Страница 45: ...Size Used Available Use Mounted on dev mtdblock3 26 0M 9 0M 17 0M 35 dev mtdblock3 26 0M 9 0M 17 0M 35 dev ram2 2 0M 42 0k 1 8M 2 var tmpfs 62 1M 0 62 1M 0 dev shm dev ram1 29 0M 13 0k 27 5M 0 mnt ramdisk root Moxa mnt ramdisk backupuf mnt ramdisk usrfs backup Sync the file system Now backup the user root file system Please wait Backup user root file system OK root Moxa mnt ramdisk Deploying the U...

Страница 46: ... upgrade the file user file systim Do you want to keep the network IP setting on etc network interfaces file Y N Backup the network setting Format MTD device dev mtd3 Wait to write file Compleleted 100 Now update the configuration file Upgrade the firmware is OK Please press any key to reboot system NOTE The differences between updating the User File System for firmware versions before and after f...

Страница 47: ...n snmpd s l dev null 110 root 2828 S usr sbin snmptrapd s 139 root 1364 S sbin cardmgr 143 root 1756 S usr sbin rpc nfsd 145 root 1780 S usr sbin rpc mountd 152 root 2960 S usr sbin sshd 160 root 1272 S bin reportip 161 root 3464 S bin massupfirm 162 root 1532 S sbin getty 115200 ttyS01 163 root 1532 S sbin getty 115200 ttyS1 166 root 3464 S bin massupfirm 167 root 3464 S bin massupfirm 170 root 3...

Страница 48: ...root 2832 S usr sbin snmptrapd s 140 root 1364 S sbin cardmgr 144 root 1756 S usr sbin rpc nfsd 146 root 1780 S usr sbin rpc mountd 153 root 2960 S usr sbin sshd 161 root 1272 S bin reportip 162 root 3464 S bin massupfirm 163 root 1532 S sbin getty 115200 ttyS0 164 root 1532 S sbin getty 115200 ttyS1 166 root 3464 S bin massupfirm 168 root 3464 S bin massupfirm 171 root 3652 S usr sbin sshd 172 ro...

Страница 49: ...ity RUNFILE is the file name For removing the daemon you can remove the run file from etc rc d rc3 d by using the following command rm f etc rc d rc3 d S60tcps2 Adjusting the System Time Setting the Time Manually UC 7420 7410 has two time settings One is the system time and the other is the RTC Real Time Clock time kept by the UC 7420 7410 hardware Use the date command to query the current system ...

Страница 50: ...date time stdtion gov tw 9 Dec 10 58 53 ntpdate 207 step time server 220 130 158 52 offset 155905087 9 84256 sec root Moxa hwclock w root Moxa date hwclock Thu Dec 9 10 59 11 CST 2004 Thu Dec 9 10 59 12 2004 0 844076 seconds root Moxa NOTE Before using the NTP client utility check your IP and DNS settings to make sure that an Internet connection is available Refer to Chapter 2 for instructions on ...

Страница 51: ... and checks each command to see if it should be run in the current minute When executing commands output is mailed to the owner of the crontab or to the user named in the MAILTO environment variable in the crontab if such a user exists Modify the file etc cron d crontab to set up your scheduled applications Crontab files have the following format mm h dom mon dow user command month hour date month...

Страница 52: ...e If you don t issue the command you may lose some data Remember to exit the mnt sda or mnt sdb directory when you disconnect the USB mass storage device If you stay in mnt sda or mnt sda the auto un mount process will fail If that happens type umount mnt sda to un mount the USB device manually UC 7420 7410 only supports certain types of flash disk USB Mass Storage device Some the USB flash disks ...

Страница 53: ...nication functions The following topics are covered in this chapter Telnet FTP DNS Web Service Apache Saving a Web Page to the CF Card IPTABLES NAT Enabling NAT Bootup Dial up Service PPP NFS Network File System Setting up UC 7420 7410 as an NFS Server Setting up UC 7420 7410 as an NFS Client Mail SNMP Open VPN ...

Страница 54: ...eads to resolve the host name and IP address etc resolv conf This is the most important file that you need to edit when using DNS for the other programs For example before you using ntpdate time nist goc to update the system time you will need to add the DNS server address to the file Ask your network administrator which DNS server address you should use The DNS server s IP address is specified wi...

Страница 55: ...Explore or Mozilla Firefox from your PC to test if the Apache Web Server is working Type the LAN1 IP address in the browser s address box to open the homepage E g if the default IP address is still active type http 192 168 3 127 in address box To open the default CGI page type http 192 168 3 127 cgi bin printenv in your browser s address box ...

Страница 56: ...m the CF card In this section we use a simple example to illustrate how to save web pages to the CF card and then configure the Apache web server to open the pages The files used in this example can be downloaded from Moxa s website Step 1 Prepare web page and put pages to CF card Click on the following link to download the web page test suite http www w3 org MarkUp Test HTML401 zip Uncompress the...

Страница 57: ... MaxKeepAliveRequests 100 KeepAliveTimeout 15 MinSpareServers 5 MaxSpareServers 10 StartServers 5 MaxClients 150 MaxRequestsPerChild 0 Listen 80 User nobody Group nobody ServerAdmin root localhost ServerName localhost DocumentRoot mnt had Step 3 Use the following commands to restart the Apache web server cd etc init d apache restart Step4 Open your browser and connect to the UC 7420 7410 by typing...

Страница 58: ... 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 Destination NAT DNAT changes the first destination packet IP address MASQUERADE a special form for SNAT If one host c...

Страница 59: ...EJECT ipt_mac ipt_unclean ip_nat_snmp_basic ipt_TCPMSS ipt_mark ip_queue ipt_TOS ipt_multiport ipt_LOG ipt_ULOG ipt_owner NOTE UC 7420 7410 does NOT support IPV6 and ipchains Incoming Packets Mangle Table PREROUTING Chain NAT Table PREROUTING Chain NAT Table POSTROUTING Chain Outgoing Packets Other Host Packets Mangle Table FORWARD Chain Filter Table FORWARD Chain Mangle Table POSTROUTING Chain Lo...

Страница 60: ...ex 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 li...

Страница 61: ...e network IP address or plain IP address sport Source port number d Destination address dport 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 ipt...

Страница 62: ...nux or Windows IP Netmask Gateway 192 168 3 100 24 192 168 3 127 PC2 Linux or Windows IP Netmask Gateway 192 168 4 100 24 192 168 4 127 LAN1 LAN2 LAN1 ixp0 192 168 3 127 24 LAN2 ixp1 192 168 4 127 24 NAT Area Private IP 1 ehco 1 proc sys net ipv4 ip_forward 2 modprobe iptable_nat 3 modprobe ip_conntract 4 modprobe ipt_MASQUERADE 5 iptables t nat A POSTROUTING o ixp0 j SNAT to source 192 168 3 127 ...

Страница 63: ...em over a telephone line Modem PPP access is almost identical to connecting directly to a network through UC 7420 7410 s Ethernet port Since PPP is a peer to peer system UC 7420 7410 can also use PPP to link two networks or a local network to the Internet to create a Wide Area Network WAN NOTE Click on the following links for more information about ppp http tldp org HOWTO PPP HOWTO index html http...

Страница 64: ...m at 115200 this is a must modem Indicates that this is a modem device pppd will hang up the phone before and after making the call defaultroute Once the PPP link is established make it the default route if you have a PPP link to the Internet this is probably what you want 192 1 1 17 This is a degenerate case of a general option of the form x x x x y y y y Here x x x x is the local IP address and ...

Страница 65: ...w type ping z z z z where z z z z is the address of your name server This should work Here s what the response could look like waddington p ping 129 67 1 165 PING 129 67 1 165 129 67 1 165 56 data bytes 64 bytes from 129 67 1 165 icmp_seq 0 ttl 225 time 268 ms 64 bytes from 129 67 1 165 icmp_seq 1 ttl 225 time 247 ms 64 bytes from 129 67 1 165 icmp_seq 2 ttl 225 time 266 ms C 129 67 1 165 ping sta...

Страница 66: ...of disk space that will be available UC 7420 7410 supports NFS protocol for both client and server NOTE Click on the following links for more information about NFS http www tldp org HOWTO NFS HOWTO index html http nfs sourceforge net nfs howto client html http nfs sourceforge net nfs howto server html Setting up UC 7420 7410 as an NFS Server By default UC 7420 7410 enables the service etc init d n...

Страница 67: ...p directory to everyone gives everyone both read and write authority The root user on the client machine will have the same level of access to files on the system as the root on the server Example 2 home public 192 168 0 0 24 rw ro In this example UC 7420 7410 shares the directory home public to a local network 192 168 0 0 24 with read and write authority NFS clients can just read home public they...

Страница 68: ...1317 RS 232 like group and RFC 1213 MIB II The following simple example allows you to use an SNMP browser on the host site to query the UC 7420 7410 which is the SNMP agent UC 7420 7410 will respond SNMP QUERY STARTED 1 sysDescr 0 octet string Linux Moxa 2 4 18_mvl30 ixdp425 1049 Tue Oct 26 09 34 15 CST 2004 armv5teb 2 sysObjectID 0 object identifier enterprises 2021 250 10 3 sysUpTime 0 timeticks...

Страница 69: ...h 00m 00s 22th 22 34 system 9 1 4 9 timeticks 0 days 00h 00m 00s 22th 22 SNMP QUERY FINISHED NOTE Click on the following links for more information about MIB II and RS 232 like group http www faqs org rfcs rfc1213 html http www faqs org rfcs rfc1317 html Æ UC 7420 7410 does NOT support SNMP trap The following tables list the variables supported by UC 7420 7410 Open VPN This function is only availa...

Страница 70: ... be configured for static IPs or connect to another device such as a firewall or DSL box first 2 Generate a preset shared key by typing the command openvpn genkey secret secrouter key Copy the file that is generated to the OpenVPN machine 3 Generate a script file named openvpn bridge on each OpenVPN machine This script reconfigures interface ixp1 as IP less creates logical bridge s and TAP interfa...

Страница 71: ...me then FOUND yes break fi done IFS oIFS if FOUND no then modprobe mname fi start ifcfg_vpn if d dev net then mkdir dev net fi if r dev net tun then create a device file if there is none mknod dev net tun c 10 200 fi load modules tun and bridge mname tun module_up mname bridge module_up create an ethernet bridge to connect tap devices internal interface brctl addbr br0 brctl addif br0 iface the br...

Страница 72: ...ng enabled to cat ipf stop echo shutdown openvpn bridge ifcfg_vpn i expr 0 while do disconnect tap device from the bridge brctl delif br0 tap i openvpn rmtun dev tap i i expr i 1 if i ge maxtap then break fi done brctl delif br0 iface brctl delbr br0 ifconfig br0 down ifconfig iface IPADDR netmask NETMASK broadcast BROADCAST killall TERM openvpn case 1 in start start stop stop restart stop start e...

Страница 73: ...55 255 255 0 dev br0 end Note Select cipher and authentication algorithms by specifying cipher and auth To see with algorithms are available type openvpn show ciphers openvpn show auths 5 Start both of OpenVPN peers openvpn config A tap0 br conf openvpn config B tap0 br conf If you see the line Peer Connection Initiated with 192 168 8 173 5000 on each machine the connection between OpenVPN machine...

Страница 74: ...thorized users from one internal network to access users at the remote site For this system all data is transmitted by UDP packets on port 5000 between OpenVPN peers 8 To shut down OpenVPN programs type the command killall TERM openvpn Setup 2 Ethernet Bridging for Private Networks on the Same Subnet 1 Set up four machines as shown in the following diagram OpenVPN A OpenVPN B Host A eth0 192 168 2...

Страница 75: ...crouter key cipher DES EDE3 CBC auth MD5 tun mtu 1500 tun mtu extra 64 ping 40 ifconfig 192 168 2 173 192 168 4 174 up etc openvpn A tun sh Start bin sh value after net is the subnet behind the remote peer route add net 192 168 4 0 netmask 255 255 255 0 gw 5 end Create a configuration file named B tun conf and an executable script file named B tun sh on OpenVPN B remote 192 168 8 173 dev tun secre...

Страница 76: ...nt that the OpenVPN program passes to the script file Its value is the second argument of ifconfig in the configuration file 3 Check the routing table after you run the OpenVPN programs by typing the command route Destination Gateway Genmsk Flags Metric Ref Use Iface 192 168 4 174 255 255 255 255 UH 0 0 0 tun0 192 168 4 0 192 168 4 174 255 255 255 0 UG 0 0 0 tun0 192 168 2 0 255 255 255 0 U 0 0 0 ...

Страница 77: ...ludes important information for programmers This following functions are covered in this chapter Flash Memory Map Linux Tool Chain Introduction Debug with GDB Device API RTC Real Time Clock Buzzer WDT Watch Dog Timer UART LCM KeyPad Make File Example ...

Страница 78: ...will be able to run correctly when installed on UC 7420 7410 you must ensure that it is compiled and linked to the same libraries that will be present on the UC 7420 7410 This is particularly true when the RISC Xscale processor architecture of the UC 7420 7410 differs from the CISC x86 processor architecture of the host system but it is also true if the processor architecture is the same The host ...

Страница 79: ...cross compiler tools are provided ar Manage archives static libraries as Assembler c g C compiler cpp C preprocessor gcc C compiler gdb Debugger ld Linker nm Lists symbols from object files objcopy Copies and translates object files objdump Displays information about object files ranlib Generates indexes to archives static libraries readelf Displays information about ELF files size Lists object fi...

Страница 80: ...e return file handle int request argument in or out Use the desktop Linux s man page for detailed documentation man ioctl RTC Real Time Clock The device node is located at dev rtc UC 7420 7410 supports Linux standard simple RTC control You must include linux rtc h 1 Function RTC_RD_TIME int ioctl fd RTC_RD_TIME struct rtc_time time Description read time information from RTC It will return the valu...

Страница 81: ...ude moxadevic h and link moxalib a A makefile example is shown below all mxscaleb gcc o xxxx xxxx c lmoxalib int swtd_open void Description Open the file handle to control the sWatchDog If you want to do something you must first to this And keep the file handle to do other Input None Output The return value is file handle If has some error it will return 0 value You can get error from errno int sw...

Страница 82: ...sable sWatchdog does not need to do ack time The time period to ack sWatchDog Input int fd the file handle from swtd_open return value int mode the function will be return the status enable or disable user application need to do ack unsigned long time the function will return the current time period Output OK will be zero The other has some error to get error code from errno int swtd_ack int fd De...

Страница 83: ...y have a logical error or your application has made a core dump The kernel will not change to auto ack This can cause a serious problem causing your system to reboot again and again 5 User application example Example 1 include stdio h include stdlib h include string h include moxadevice h int main int argc char argv int fd fd swtd_open if fd 0 printf Open sWatchDog device fail n exit 1 swtd_enable...

Страница 84: ... int stopflag 0 static void stop_swatchdog stopflag 1 static void do_swatchdog void swtd_enable swtdfd 500 while stopflag 0 mydelay 250 swtd_ack swtdfd swtd_disable swtdfd int main int argc char argv pid_t sonpid signal SIGUSR1 stop_swatchdog swtdfd swtd_open if swtdfd 0 printf Open sWatchDog device fail n exit 1 if sonpid fork 0 do_swatchdog do user application main function end user application ...

Страница 85: ...turn the interface mode There are two Moxa private ioctl commands for setting up special baud rates Function MOXA_SET_SPECIAL_BAUD_RATE Function MOXA_GET_SPECIAL_BAUD_RATE If you use this ioctl to set a special baud rate the termios cflag will be B4000000 in which case the B4000000 define will be different If the baud rate you get from termios or from calling tcgetattr is B4000000 you must call io...

Страница 86: ...nt y raw value the arrange is 0 7 lcm_xy_t Examples int ioctl fd IOCTL_LCM_GOTO_XY lcm_xy_t pos Move the cursor position to x col y raw position The argument 3 is the new position value int ioctl fd IOCTL_LCM_CLS NULL Clears the LCM display int ioctl fd IOCTL_LCM_CLEAN_LINE NULL To change one line to all spaces in the current row and move the cursor to the 0 column of this row int ioctl fd IOCTL_L...

Страница 87: ...pressed will be dropped without sounding the buzzer 2 Currently UC 7420 7410 does NOT support pressing more than 1 key at the same time Make File Example The following Makefile file example codes are copied from the Hello example on UC 7420 7410 s CD ROM CC usr local mxscaleb mxscaleb gcc CPP usr local mxscaleb mxscaleb gcc SOURCES hello c OBJS SOURCES c o all hello hello OBJS CC o LDFLAGS LIBS cl...

Страница 88: ...C Finder works by sending a broadcast message over the LAN to search for UC 7420 7410 MAC addresses It will then query the UC 7420 7410 s for their IP addresses Two versions of UC Finder are provided The GUI version works in Windows environments and the command line utility works in Linux environments The following topics are covered in this chapter Windows UC Finder Installing the Software Broadc...

Страница 89: ...inder utility is used to search the LAN or intranet for Moxa Universal Communicators Installing the Software 1 Once the Setup program starts running click on Next to proceed 2 Click on Next when the Select Additional Tools window opens to proceed with the installation ...

Страница 90: ...UC 7420 7410 User s Manual UC Finder 6 3 3 Click on Next to install program files in the default directory or select an alternative location 4 Click on Finish to complete the installation of UC Finder ...

Страница 91: ...Windows computer Since the Broadcast Search function searches by MAC address and not IP address all UC 7420 7410s connected to the LAN will be found regardless of whether or not they are on the same subnet as the host 1 Click o n the Broadcast Search button to start searching 2 The Searching window displays the Model MAC Address and IP Address of devices that were located ...

Страница 92: ...ning UC Finder To configure UC s IP addresses or other configuration parameters use Telnet over the network or connect directly to the serial Console port to access UC 7420 7410 s Console utility Linux ucfinder Copy ucfinder from the Documentation and Software CD to your Linux PC and then use the following command to start the program UC Finder will automatically locate all UC 7420 7410 units on t...

Страница 93: ...move file 11 pwd display now file directly 12 df list now file system space 13 mkdir make new directory 14 rmdir delete directory Editor 1 vi text editor 2 cat dump file context 3 zcat compress or expand files 4 grep search string on file 5 cut get string on file 6 find find file where are there 7 more dump file by one page 8 test test file exist or not 9 sleep sleep seconds 10 echo echo string Ne...

Страница 94: ... time 7 env run a program in a modified environment 8 clear clear the terminal screen 9 reboot reboot power off on the server 10 halt halt the server 11 du estimate file space usage 12 gzip gunzip compress or expand files 13 hostname show system s host name MOXA special utilities 1 backupfs backup file system user directory 2 bf built the file system user directory 3 kversion show kernel version 4...

Страница 95: ...Tool Chain is a cross development environment that simulates the Linux root file system allowing users to develop applications on a Windows PC The following topics are covered in this appendix Introduction Installation Procedure Using the BASH Shell GDB debug tool Insight ...

Страница 96: ...asswd 0 Jan 10 19 24 etc rw r r 1 stephen_ mkpasswd 3262 Jan 10 22 03 insight ico drwxr xr x 5 stephen_ mkpasswd 0 Jan 10 19 48 lib rwxr xr x 1 stephen_ mkpasswd 53 Jan 10 22 03 moxa bat rw r r 1 stephen_ mkpasswd 3262 Jan 10 22 03 moxa ico drwxr xr x 2 stephen_ mkpasswd 0 Jan 10 19 48 tmp drwxr xr x 14 stephen_ mkpasswd 0 Jan 10 19 48 usr drwxr xr x 6 stephen_ mkpasswd 0 Jan 10 18 12 var stephen_...

Страница 97: ...etup program starts running click on Next to proceed 2 Select the Root Directory Note If the directory C UC was created during a previous installation it will be displayed as the Root Directory Use this directory if you do not wish to re install the UC windows tool chain again Under Install For All Users Recommended is selected by default Under Default Text File Type Unix Recommended is selected b...

Страница 98: ...e It may take anywhere from 5 to 20 minutes to check the packages in the CD ROM after you click on Next 4 All required package are selected by default Click on Next to continue y Category column Shows a hierarchical display of packages with category name highest and package name lowest Click the plus sign next to category name to open the category and see the packages within that category ...

Страница 99: ...ges are installed y Install If the package was not previously installed select this option to install the package now y Reinstall If the package was previously installed select this option to install it again This will overwrite the previous installation y Uninstall If the package was previously installed select this option if you do NOT want to make any changes y Skip Ignores a package entirely r...

Страница 100: ...Bash Shell or lick on the desktop Moxa Bash Shell icon Your group is currently mkpasswd This indicates that The etc passwd and possibly etc group files should be rebuil See the man pages for mkpasswd and mkgroup then for example ru mkpasswd l d etc passwd mkpasswd l d etc group Note that the d switch is necessary for domain users stephen_lin abc 06d82fcbf1a ls al total 9 drwxr xr x 8 stephen_ mkpa...

Страница 101: ...phen_ mkpasswd 0 Jan 10 18 12 var stephen_lin abc 06d82fcbf1a _ GDB debug tool Insight Insight is a graphical user interface that accompanies GDB the GNU Debugger written in Tcl Tk by people working at Red Hat Inc and Cygnus Solutions Red Hat was generous enough to make Insight available for public use and continues to maintain the program Click on http sources redhat com insight for more informat...

Страница 102: ...UC 7420 7410 User s Manual Windows Tool Chain Introduction B 8 ...

Страница 103: ... This appendix shows you how to contact Moxa for information about this and other products and how to report problems The following topics are covered in this appendix MOXA Internet Services Problem Report Form Product Return Procedure ...

Страница 104: ... 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 http www moxa com ...

Страница 105: ... Date 1 Moxa Product UC 7410 LX UC 7420 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 ...

Страница 106: ...RA 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 ...

Отзывы: