UC-7420/7410 User’s Manual Third Edition, June 2005 www.moxa.com/product Moxa Technologies Co., Ltd. Tel: +886-2-8919-1230 Fax: +886-2-8919-1231 We
UC-7420/7410 User’s Manual Introduction 1-5Dimensions 197 mm [7.76"]125 mm [4.92"]44 mm[1.73"]
UC-7420/7410 User’s Manual Windows Tool Chain Introduction B-66. Checkmark Create icon on Desktop to place a Moxa BASH Shell icon on your desktop,
UC-7420/7410 User’s Manual Windows Tool Chain Introduction B-7-rwxr—xr-x 1 stephen_ mkpasswd 53 Jan 10 22:03 moxa.bat -rw-r--r-- 1 stephen_ m
UC-7420/7410 User’s Manual Windows Tool Chain Introduction B-8
CC Appendix C Service Information This appendix shows you how to contact Moxa for information about this and other products, and how to report pro
UC-7420/7410 User’s Manual Service Information C-2MOXA Internet Services Customer satisfaction is our number one concern, and to ensure that custome
UC-7420/7410 User’s Manual Service Information C-3Problem Report Form MOXA UC-7420/7410 Customer name: Company: Tel: Fax: Email: Date: 1. Moxa P
UC-7420/7410 User’s Manual Service Information C-4Product Return Procedure For product repair, exchange, or refund, the customer must: Provide e
UC-7420/7410 User’s Manual Introduction 1-6Hardware Block Diagram The following block diagram shows the layout of UC-7420’s internal components (the
UC-7420/7410 User’s Manual Introduction 1-7Reset-type Buttons UC-7420/7410 has two reset-type buttons. The button labeled Reset has the same effect
UC-7420/7410 User’s Manual Introduction 1-8Placement Options Wall or Cabinet The two metal brackets that come standard with UC-7420/7410 are used to
UC-7420/7410 User’s Manual Introduction 1-9DIN-Rail Mounting The aluminum DIN-Rail attachment plate is included in the package. If you need to reatt
UC-7420/7410 User’s Manual Introduction 1-10y You can use the type of signal transmitted through a wire to determine which wires should be kept sep
UC-7420/7410 User’s Manual Introduction 1-11Connecting to a Serial Device Use properly wired serial cables to connect UC-7420/7410 to serial devices
UC-7420/7410 User’s Manual Introduction 1-12Software Introduction Software Architecture The Linux operating system that is pre-installed in UC-7420/
UC-7420/7410 User’s Manual Introduction 1-13services and daemons. During this time, the kernel will start searching for system configuration paramet
UC-7420/7410 User’s Manual Introduction 1-14OS shell command bash Busybox Linux normal command utility collection Utilities tinylogin login and us
UC-7420/7410 User’s Manual The software described in this manual is furnished under a license agreement and may be used only in accordance with the t
UC-7420/7410 User’s Manual Introduction 1-15Protocol stacks and utilities Arp (utility) N/A Yes Yes iptable N/A N/A Yes Open VPN N/A N/A Yes W
22 Chapter 2 Getting Started In this chapter, we explain how to connect UC-7420/7410, turn on the power, and then get started using the programmin
UC-7420/7410 User’s Manual Getting Started 2-2Powering on UC-7420/7410 Connect the SG wire to the Shielded Contact located in the upper left corner
UC-7420/7410 User’s Manual Getting Started 2-3Telnet Console If you know at least one of the two IP addresses and netmasks, then you can use Telnet
UC-7420/7410 User’s Manual Getting Started 2-4 ATTENTION Serial Console Reminder Remember to choose VT100 as the terminal type. Use cable CBL-RJ45F9
UC-7420/7410 User’s Manual Getting Started 2-5Linux Users From a Linux machine, use the “ssh” command to access UC-7420/7410’s Console utility via S
UC-7420/7410 User’s Manual Getting Started 2-6 Dynamic IP addresses: By default, UC-7420/7410 is configured for “static” IP addresses. To configure
UC-7420/7410 User’s Manual Getting Started 2-7NOTE After changing the IP settings, use the networking restart command to activate the new IP addres
UC-7420/7410 User’s Manual Getting Started 2-8 3. Configure the Wireless LAN card’s default SSID setting profile. (Default SSID is “any”) #vi /etc/
UC-7420/7410 User’s Manual Getting Started 2-9IEEE802.11g The following IEEE802.11g wireless modules are supported: y ASUS—WL-107g y CNET—CWC-854
Table of Contents Chapter 1 Introduction ...1-1 Overv
UC-7420/7410 User’s Manual Getting Started 2-103. Additional WLAN parameters are contained in the file RT2500STA.dat. To open the file, navigate to
UC-7420/7410 User’s Manual Getting Started 2-11NetworkType—Sets the wireless operation mode Setting Explanation Infra Infrastructure mode (uses ac
UC-7420/7410 User’s Manual Getting Started 2-12TurboRate—Enables or disables TurboRate Setting Explanation 0 disable 1 enable BGProtection—Sets 11
UC-7420/7410 User’s Manual Getting Started 2-13Test Program—Developing Hello.c In this section, we use the standard “Hello” programming example to i
UC-7420/7410 User’s Manual Getting Started 2-14 If there isn’t enough “Available” space for your application, you will need to delete some existing
UC-7420/7410 User’s Manual Getting Started 2-15Uploading “Hello” to UC-7420/7410 and Running the Program Use the following command to upload hello-r
UC-7420/7410 User’s Manual Getting Started 2-16Compiling tcps2.c The source code for the tcps2 example is located on the CD-ROM at CD-ROM://example/
UC-7420/7410 User’s Manual Getting Started 2-17Uploading tcps2-release and Running the Program Use the following commands to use FTP to upload tcps2
UC-7420/7410 User’s Manual Getting Started 2-184. The program should start running in the background. Use either the #jobs or #ps –ef command to ch
UC-7420/7410 User’s Manual Getting Started 2-19 158 root 1532 S /sbin/getty 115200 ttyS1 162 root 3652 S /usr/sbin/sshd 163 ro
Compiling tcps2.c... 2-16 Uploading tcps2-release a
UC-7420/7410 User’s Manual Getting Started 2-20NOTE The tcps2.c application is a simple example designed to give users a basic understanding of the
33 Chapter 3 Managing Embedded Linux This chapter includes information about version control, deployment, updates, and peripherals. The informatio
UC-7420/7410 User’s Manual Managing Embedded Linux 3-2System Version Information To determine the hardware capability of your UC-7420/7410, and what
UC-7420/7410 User’s Manual Managing Embedded Linux 3-3Since different Flash disks have different sizes, it’s a good idea to check the size of your F
UC-7420/7410 User’s Manual Managing Embedded Linux 3-4226 Transfer complete. ftp> get UC7420-1.5.frm local: UC7420-1.5.frm remote: UC7420-1.5.frm
UC-7420/7410 User’s Manual Managing Embedded Linux 3-5Backing Up the User File System 1. Create a backup file. The specific commands used to back u
UC-7420/7410 User’s Manual Managing Embedded Linux 3-6Back up the user file system to a PC (refer to the previous subsection, “Backing Up the User F
UC-7420/7410 User’s Manual Managing Embedded Linux 3-7 192.168.3.127 – PuTTY root@Moxa:~# cd /etc root@Moxa:/etc# ps -ef PID Uid VmSize Stat
UC-7420/7410 User’s Manual Managing Embedded Linux 3-8 192.168.3.127 – PuTTY root@Moxa:~# ps -ef PID Uid VmSize Stat Command 1 root
UC-7420/7410 User’s Manual Managing Embedded Linux 3-9SxxRUNFILE stands for S: start the run file while linux boots up. xx: a number between 00-
Windows UC Finder ... 6-2 Installing the
UC-7420/7410 User’s Manual Managing Embedded Linux 3-10 192.168.3.127 – PuTTY root@Moxa:~# date Fri Jun 23 23:30:31 CST 2000 root@Moxa:~# hwclock
UC-7420/7410 User’s Manual Managing Embedded Linux 3-11Save the shell script using any file name. E.g., fixtime How to run the shell script automati
UC-7420/7410 User’s Manual Managing Embedded Linux 3-12Connecting Peripherals USB Mass Storage This function is only available for firmware version
44 Chapter 4 Managing Communications In this chapter, we explain how to configure UC-7420/7410’s various communication functions. The following to
UC-7420/7410 User’s Manual Managing Communication 4-2Telnet / FTP In addition to supporting Telnet client/server and FTP client/server, the UC-7420/
UC-7420/7410 User’s Manual Managing Communication 4-3/usr/www/cgi-bin/ Before you modify the homepage, use a browser (such as Microsoft Internet Exp
UC-7420/7410 User’s Manual Managing Communication 4-4To open the default CGI test script report page, type http://192.168.3.127/cgi-bin/test-cgi in
UC-7420/7410 User’s Manual Managing Communication 4-5Step 2: Use the following commands to configure the Apache web server’s DocumentRoot: #cd /etc/
UC-7420/7410 User’s Manual Managing Communication 4-6IPTABLES IPTABLES is an administrative tool for setting up, maintaining, and inspecting the Lin
UC-7420/7410 User’s Manual Managing Communication 4-7 UC-7420/7410 supports the following sub-modules. Be sure to use the module that matches your
11 Chapter 1 Introduction Welcome to MOXA UC-7420/7410 RISC-based Communication Platforms. Available features include eight RS-232/422/485 serial
UC-7420/7410 User’s Manual Managing Communication 4-8The basic syntax to enable and load an IPTABLES module is as follows: #lsmod #modprobe ip_table
UC-7420/7410 User’s Manual Managing Communication 4-9OUTPUT: For locally-generated packets. FORWARD: For packets routed out through the UC-7420
UC-7420/7410 User’s Manual Managing Communication 4-10NAT NAT (Network Address Translation) protocol translates IP addresses used on one network dif
UC-7420/7410 User’s Manual Managing Communication 4-11# Step 1. Insert modules. # Here 2> /dev/null means the standard error messages will be dum
UC-7420/7410 User’s Manual Managing Communication 4-12The pppd options are described below: connect ‘chat etc...’ This option gives the command to c
UC-7420/7410 User’s Manual Managing Communication 4-13How to check the connection Once you’ve set up a PPP connection, there are some steps you can
UC-7420/7410 User’s Manual Managing Communication 4-14Setting up a Machine for Incoming PPP Connections This first example applies to using a modem,
UC-7420/7410 User’s Manual Managing Communication 4-15no_root_squash If no_root_squash is selected, then the root on the client machine will have th
UC-7420/7410 User’s Manual Managing Communication 4-16Steps 2 & 3: #mkdir –p /home/nfs/public #mount –t nfs NFS_Server(IP):/directory /mou
UC-7420/7410 User’s Manual Managing Communication 4-1720: system.9.1.3.4 (octet string) The MIB module for managing IP and ICMP implementations 21:
UC-7420/7410 User’s Manual Introduction 1-2Overview UC-7420/7410 RISC-based Communication Platforms are ideal for embedded applications. UC-7420/741
UC-7420/7410 User’s Manual Managing Communication 4-18Setup 1: Ethernet Bridging for Private Networks on Different Subnets 1. Set up four machines,
UC-7420/7410 User’s Manual Managing Communication 4-19 fi i=`expr $i + 1` read f1 f2 case “$f1” in address ) IPADDR=$f2
UC-7420/7410 User’s Manual Managing Communication 4-20 # connect tap device to the bridge brctl addif br0 tap${i} # null ip address of t
UC-7420/7410 User’s Manual Managing Communication 4-214. Create a configuration file named A-tap0-br.conf and an executable script file named A-tap
UC-7420/7410 User’s Manual Managing Communication 4-22virtual device, it sends the traffic to its peer. 7. To create an indirect connection to Host
UC-7420/7410 User’s Manual Managing Communication 4-23Setup 3: Routed IP 1. Set up four machines as shown in the following diagram: OpenVPN AOpenVP
UC-7420/7410 User’s Manual Managing Communication 4-24Note that the parameter “ifconfig” defines the first argument as the local internal interface
55 Chapter 5 Programmer’s Guide This chapter includes important information for programmers. This following functions are covered in this chapter:
UC-7420/7410 User’s Manual Programmer’s Guide 5-2Flash Memory Map Partition sizes are hard coded into the kernel binary. To change the partition siz
UC-7420/7410 User’s Manual Programmer’s Guide 5-3Obtaining help Use the Linux man utility to obtain help on many of the utilities provided by the to
UC-7420/7410 User’s Manual Introduction 1-3y PCMCIA/CompactFlash expansion (UC-7420 only) y USB Host for mass storage device (UC-7420 only) y LCM
UC-7420/7410 User’s Manual Programmer’s Guide 5-42. Use the following command on the host to change to the directory that contains hello-debug: cd
UC-7420/7410 User’s Manual Programmer’s Guide 5-5WDT (Watch Dog Timer) This function is only available for firmware version V1.5 (and later versions
UC-7420/7410 User’s Manual Programmer’s Guide 5-6int swtd_disable(int fd) Description: Disable the application to ack sWatchDog. And the kernel will
UC-7420/7410 User’s Manual Programmer’s Guide 5-7int swtd_close(int fd) Description: Close the file handle. Input : int fd - the file handle from
UC-7420/7410 User’s Manual Programmer’s Guide 5-8#include <sys/stat.h> #include <sys/ioctl.h> #include <sys/select.h> #include <
UC-7420/7410 User’s Manual Programmer’s Guide 5-9UART The normal tty device node is located at /dev/ttyM0 … ttyM7, and the modem tty device node is
UC-7420/7410 User’s Manual Programmer’s Guide 5-10Baud rate inaccuracy Divisor = 921600/Target Baud Rate. (Only Integer part) ENUM = 8 * (921600/Tar
UC-7420/7410 User’s Manual Programmer’s Guide 5-11Special Note 1. UC-7420/7410’s kernel will store the “pressed key history” in a buffer. The maxim
66 Chapter 6 UC Finder The UC Finder utility is used to search the LAN or intranet for Moxa Universal Communicators. UC Finder comes in handy if y
UC-7420/7410 User’s Manual UC Finder 6-2Windows UC Finder The UC Finder utility is used to search the LAN or intranet for Moxa Universal Communicato
UC-7420/7410 User’s Manual Introduction 1-4Hardware Introduction Appearance and Dimensions Appearance UC-7410/7420 Rear View DC 12-48VUSBLAN1 LAN2
UC-7420/7410 User’s Manual UC Finder 6-33. Click on Next to install program files in the default directory, or select an alternative location. 4.
UC-7420/7410 User’s Manual UC Finder 6-4Broadcast Search The Broadcast Search function is used to locate all UC-7420/7410 units that are connected t
UC-7420/7410 User’s Manual UC Finder 6-53. When the search is complete, the same information is displayed in the UC Finder window. NOTE UC Finde
AA Appendix A System Commands busybox (V0.60.4): Linux normal command utility collection File manager 1. cp copy file 2. ls list fil
UC-7420/7410 User’s Manual System Commands A-2Process 1. kill kill process 2. ps display now running process Other 1. dmesg dump
BB Appendix B Windows Tool Chain Introduction UC-7420/7410’s Windows Tool Chain is a cross development environment that simulates the Linux root f
UC-7420/7410 User’s Manual Windows Tool Chain Introduction B-2Introduction UC-7420/7410’s Windows Tool Chain is a cross development environment that
UC-7420/7410 User’s Manual Windows Tool Chain Introduction B-3Installation Procedure 1. Insert the CD into your PC’s CD-ROM drive, and run \\tool-c
UC-7420/7410 User’s Manual Windows Tool Chain Introduction B-43. By default, the Local Package Directory is the same as on the CD-ROM: \\tool-chain
UC-7420/7410 User’s Manual Windows Tool Chain Introduction B-5y Base Category: List all packages that will be installed by default (along with any
Comments to this Manuals