Moxa Technologies UC-7420, UC-7410 User Manual

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
Web:
MOXA Technical Support
Worldwide: The Americas
www.moxa.com
support@moxa.com.tw support@moxa.com
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 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 Technologies assumes no responsibility for its use, or for any infringements on the rights of third parties that may result from its use.
This product might include unintentional technical or typographical errors. Changes are periodically made to the information herein to correct such errors, and these changes are incorporated into new editions of the publication.
Table of Contents
Chapter 1 Introduction ..................................................................................................1-1
Overview.................................................................................................................................. 1-2
Package Checklist....................................................................................................... 1-2
Product Features......................................................................................................... 1-2
Product Hardware Specifications ............................................................................... 1-3
Hardware Introduction............................................................................................................. 1-4
Appearance and Dimensions...................................................................................... 1-4
Hardware Block Diagram........................................................................................... 1-6
LED Indicators ........................................................................................................... 1-6
Reset-type Buttons ..................................................................................................... 1-7
Real Time Clock......................................................................................................... 1-7
Placement Options................................................................................................................... 1-8
Wall or Cabinet .......................................................................................................... 1-8
DIN-Rail Mounting .................................................................................................... 1-9
Hardware Connection Description........................................................................................... 1-9
Wiring Requirements ................................................................................................. 1-9
Connecting the Power .............................................................................................. 1-10
Grounding UC-7420/7410........................................................................................ 1-10
Connecting to the Network....................................................................................... 1-10
Connecting to a Serial Device .................................................................................. 1-11
Connecting to the Console Port................................................................................ 1-11
PCMCIA................................................................................................................... 1-11
CompactFlash........................................................................................................... 1-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-5
Modifying Network Settings over the Network ......................................................... 2-7
Configuring the WLAN via the PCMCIA Interface ................................................................ 2-7
IEEE802.11b .............................................................................................................. 2-7
IEEE802.11g .............................................................................................................. 2-9
Test Program—Developing Hello.c....................................................................................... 2-13
Installing the Tool Chain (Linux)............................................................................. 2-13
Checking the Flash Memory Space.......................................................................... 2-13
Compiling Hello.c .................................................................................................... 2-14
Uploading “Hello” to UC-7420/7410 and Running the Program............................. 2-15
Developing Your First Application ........................................................................................ 2-15
Testing Environment ................................................................................................ 2-15
Compiling tcps2.c..................................................................................................... 2-16
Uploading tcps2-release and Running the Program ................................................. 2-17
Testing Procedure Summary .................................................................................... 2-19
Chapter 3 Managing Embedded Linux ........................................................................3-1
System Version Information..................................................................................................... 3-2
System Image Backup.............................................................................................................. 3-2
Upgrading the Firmware............................................................................................. 3-2
Loading Factory Defaults........................................................................................... 3-4
Backing Up the User File System............................................................................... 3-5
Deploying the User File System to Additional UC-7420/7410 Units ........................ 3-5
Enabling and Disabling Daemons............................................................................................ 3-6
Setting the Run-Level .............................................................................................................. 3-8
Adjusting the System Time...................................................................................................... 3-9
Setting the Time Manually......................................................................................... 3-9
NTP Client................................................................................................................ 3-10
Updating the Time Automatically............................................................................ 3-10
Cron—daemon 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
Setting up UC-7420/7410 as an NFS Client............................................................. 4-15
Mail........................................................................................................................................ 4-16
SNMP .................................................................................................................................... 4-16
Open VPN.............................................................................................................................. 4-17
Chapter 5 Programmer’s Guide....................................................................................5-1
Flash Memory Map.................................................................................................................. 5-2
Linux Tool Chain Introduction................................................................................................. 5-2
Debugging with GDB .............................................................................................................. 5-3
Device API............................................................................................................................... 5-4
RTC (Real Time Clock)........................................................................................................... 5-4
Buzzer...................................................................................................................................... 5-4
WDT (Watch Dog Timer) ........................................................................................................ 5-5
UART....................................................................................................................................... 5-9
LCM....................................................................................................................................... 5-10
KeyPad................................................................................................................................... 5-10
Make File Example.................................................................................................................5-11
Chapter 6 UC Finder ......................................................................................................6-1
Windows UC Finder ................................................................................................................ 6-2
Installing the Software................................................................................................ 6-2
Broadcast Search........................................................................................................ 6-4
Linux ucfinder.......................................................................................................................... 6-5
Appendix A System Commands..................................................................................... A-1
busybox (V0.60.4): Linux normal command utility 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
1
1

Chapter 1 Introduction

Welcome to MOXA UC-7420/7410 RISC-based Communication Platforms. Available features include eight RS-232/422/485 serial ports, dual 10/100 Mbps Ethernet ports, a PCMCIA interface for wireless LAN communication, and CompactFlash and USB ports for mass storage disk expansion, making UC-7420/7410 ideal for your embedded applications.
The following topics are covered in this 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 Serial Device ¾ Connecting to the Console Port ¾ PCMCIA ¾ CompactFlash
Software Introduction
¾ Software Architecture ¾ Journaling Flash File System (JFFS2) ¾ Software Package ¾ Software Version Comparison Table
UC-7420/7410 User’s Manual Introduction

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
1-2
UC-7420/7410 User’s Manual Introduction
y PCMCIA/CompactFlash expansion (UC-7420 only) y USB Host for mass storage device (UC-7420 only) y LCM display and Keypad for HMI y Linux-ready communication platform y DIN-Rail or wall mounting installation y Robust fanless design

Product Hardware Specifications

UC-7410-LX UC7420-LX CPU RAM Flash LAN LAN Protection Serial Ports
Serial Protection Data bits Stop bits Parity Flow Control Speed
Serial Console/PPP USB 2.0 Host USB 1.1 Client PCMCIA Compact Flash Real Time Clock LCM Buzzer LEDs Key Pad Power input Power Consumption Dimensions Gross Weight Operating temperature Storage temperature Regulatory Approvals
Warran ty
Intel Xscale IXP-422, 266 MHz 128 MB 32 MB Auto-sensing 10/100 Mbps x 2 Built-in 1.5 KV magnetic isolation Eight RS-232/422/485 ports RS-232 signals: TxD, RxD, DTR, DSR, RTS, CTS, DCD, GND RS-422 signals: TxD+, TxD-, RxD+, RxD-, GND 4 wire RS-485 signals: TxD+, TxD-, RxD+, RxD-, GND 2 wire RS-485 signals: Data+, Data-, GND 15 KV ESD for all signals 5, 6, 7, 8 1, 1.5, 2 None, even, odd, space, mark RTS/CTS, XON/XOFF 50 bps to 921.6 Kbps (50 bps to 230.4 Kbps for Hardware version V1.0) RS-232 x 1, RJ45 N/A 2 1 1 N/A N/A Ye s 128 x 64 dots Ye s Serial x 8, Console/PPP x 1, PWR x 1, Ready x 1, LAN 10/100 x 2 5 buttons 12-48 VDC 10W 12W 197 x 125 x 44mm 875 g
-10 to 60°C, (14 to 140°F), 5 to 95% RH
-20 to 80°C, (-4 to 185°F), 5 to 95% RH EMC: FCC Class A, CE Class A Safety: UL, CUL, TÜV 5 years
PCMCIA type I/II socket x 1 CompactFlash type I/II socket x 1
1-3
UC-7420/7410 User’s Manual Introduction

Hardware Introduction

Appearance and Dimensions

Appearance
UC-7410/7420 Rear View
12-48 VDC Power Input
10/100 Mbps Ethernet x 2
DC 12-48V
V+ V-
CF x 1
UC-7410/7420 Top View
UC-7410/7420 Front View
RS-232/422/485
P1
P2 P3 P4 P5 P6 P7 P8
PCMCIA
CF
PCMCIA x 1
LAN1 LAN2 Console
RS-232
PPP/Console
USB
Reset to
default
Reset
USB 2.0 Host x 2, A Type Connector
USB 1.1 Client x 1, miniB Connector
Graphics LCM 128 x 64 Dots
5 Buttons
RJ45 RS-232/422/485 Connectors x 8
1-4
UC-7420/7410 User’s Manual Introduction
Dimensions
125 mm [4.92"]
197 mm [7.76"]
[1.73"]
44 mm
1-5
UC-7420/7410 User’s Manual Introduction

Hardware Block Diagram

The following block diagram shows the layout of UC-7420’s internal components (the layout for UC-7410 is slightly different).
Ethernet
USB Host
USB controller
Moxa UART ASIC

LED Indicators

UC-7420/7410 has 12 LED indicators on the top panel. Refer to the following table for information about each LED.
PCMCIA & CompactFlash
PCI to cardbus Bridge
PCI Bus
RS-232/422/485
USB Client
Console LAN2 LAN1
PHY PHY
RS-232
Xscale IXP-422 266 MHz 32 MB Flash 128 MB SDRAM
LCM Display & Keypad
7 85 61 2 3 4
Power
Power circuit
RTC
LED Name Color Meaning
Ready Green Power is ON, and system is ready (after booting up)
LAN1, LAN2
Console
P5, P6, P7, P8
Yellow 10 Mbps Ethernet connection Green 100 Mbps Ethernet connection Yellow Console port is receiving RX data from the serial device. Green Console port is transmitting TX data to the serial device. Yellow Serial port is receiving RX data from the serial device. P1, P2, P3, P4, Green Serial port is transmitting TX data to the serial device.
1-6
UC-7420/7410 User’s Manual Introduction

Reset-type Buttons

UC-7420/7410 has two reset-type buttons. The button labeled Reset has the same effect as unplugging the power and then plugging the power back in. The button labeled Reset to default returns UC-7420/7410 to the factory default parameter configuration.
Reset Button
Pressing the Reset button initiates a hardware reboot. The button plays the same role as a desktop PC’s reset button.
In normal use, you should NOT use the Reset Button. You should only use this function if the software is not working properly. To reset an embedded linux system, always use the software reboot command />reboot to protect the integrity of data being transmitted or processed.
Reset to default Button
Press the Reset to default button continuously for at least 5 seconds to load the factory default configuration. After the factory default configuration has been loaded, the system will reboot
automatically. The Ready LED will blink on and off for the first 5 seconds, and then maintain a steady glow once the system has rebooted.
We recommend that you only use this function if the software is not working properly and you want to load factory default settings. To reset an embedded linux system, always use the software reboot command />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 file. All files in the /etc directory will revert to their factory defaults, but other User Data will still exist in the Flash ROM.
If you need to load the default System Image file, refer to the “System Image Backup” section in Chapter 3,
“Reset to Default” supported by hardware versions V1.2 and higher The Reset to default button is only supported after hardware version V1.2. You can identify the
hardware version from UC-7420/7410’s bottom label. You will need to contact Moxa to determine the version of your product’s hardware. When contacting our customer support team, you will need to provide the product’s Serial Number (S/N), which can be found on UC-7420/7410’s bottom label.

Real Time Clock

UC-7420/7410’s real time clock is powered by a lithium battery. We strongly recommend that you do not replace the lithium battery without help from a qualified Moxa support engineer. If you need to change the battery, contact Moxa RMA service team.
WARNING
There is a risk of explosion if the battery is replaced by an incorrect type.
1-7
UC-7420/7410 User’s Manual Introduction

Placement Options

Wall or Cabinet

The two metal brackets that come standard with UC-7420/7410 are used to attach UC-7420/7410 to 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 CommunicatorWall Mounting Brackets (bottom view)
Figure B: UC-7420/7410 Universal CommunicatorWall Mounting Brackets (top view)
1-8
UC-7420/7410 User’s Manual Introduction

DIN-Rail Mounting

The aluminum DIN-Rail attachment plate is included in the package. If you need to reattach the DIN-Rail attachment plate to UC-7420/7410, make sure the stiff metal spring is situated towards the top, as shown in the figures below.
1. Insert the top of the DIN-Rail into the slot just below the stiff metal spring.
metal spring
DIN-Rail
To remove UC-7420/7410 from the DIN-Rail, simply reverse Steps 1 and 2 above.

Hardware Connection Description

This section describes how to connect UC-7420/7410 to serial devices for first time testing purposes. We cover Wiring Requirements, Connecting the Power, Grounding UC-7420/7410,
Connecting to the Network, Connecting to a Serial Device, Connecting to the Console Port, PCMCIA, and CompactFlash.

Wiring Requirements

2. The DIN-Rail attachment unit will snap into place as shown below.
metal spring
DIN-Rail
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 overheat, causing serious
damage to your equipment.
Temperature Caution!
Be careful when handling UC-7420/7410. When plugged in, UC-7420/7410’s internal components generate heat, and consequently the outer casing may feel hot to the touch.
You should also observe the following common wiring rules:
y 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.
1-9
UC-7420/7410 User’s Manual Introduction
y You can use the 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.
y Keep input wiring and output wiring separate. y Where necessary, it is strongly advised that you label wiring to all devices in the system.

Connecting the Power

Connect the 12-48 VDC power line with UC-7420/7410’s terminal block. If the power is properly supplied, the Ready LED will illuminate with a solid green color after 30 to 60 seconds have passed.

Grounding UC-7420/7410

Grounding and wire routing helps limit the effects of noise due to electromagnetic interference (EMI). Run the ground connection from the ground screw to the grounding surface prior to connecting devices.
ATTENTION
This product is intended to be mounted to a well-grounded mounting surface, such as a metal panel.
SG
DC 12-48V
SG: The Shielded Ground (sometimes called Protected Ground) contact is

Connecting to the Network

Connect one end of the Ethernet cable to one of UC-7420/7410’s 10/100M Ethernet ports (8-pin RJ45) and the other end of the cable to the Ethernet network. If the cable is properly connected, UC-7420/7410 will indicate a valid connection to the Ethernet in the following ways:
18
18
The bottom right corner LED indicator maintains a solid green color when the cable is properly connected to a 100 Mbps Ethernet network. The LED will flash on and off when Ethernet packets are being transmitted or received.
The bottom left corner LED indicator maintains a solid orange color when the cable is properly connected to a 10 Mbps Ethernet network. The LED will flash on and off when Ethernet packets are being transmitted or received.
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.
Pin Signal
1 ETx+ 2 ETx­3 ERx+ 4 --­5 --­6 ERx­7 --­8 ---
1-10
UC-7420/7410 User’s Manual Introduction

Connecting to a Serial Device

Use properly wired serial cables to connect UC-7420/7410 to serial devices. UC-7420/7410’s serial ports (P1 to P8) use 8-pin RJ45 connectors. The ports can be configured by software for RS-232, RS-422, or 2-wire RS-485. The precise pin assignments are shown in the following table:
Pin RS-232 RS-422 RS-485
18
1 DSR --- --­2 RTS TXD+ --­3 GND GND GND 4 TXD TXD- --­5 RXD RXD+ Data+ 6 DCD RXD- Data­7 CTS --- --­8 DTR --- ---

Connecting to the Console Port

UC-7420/7410’s console port is an 8-pin RJ45 RS-232 port. The port can be used to connect to the console utility from a remote console via a V90 or GPRS modem with PPP protocol. The pin definition is the same as for the serial ports (P1 to P8). For normal data acquisition applications, you should connect to UC-7420/7410’s serial ports (P1 to P8) via a V90 or GPRS modem. If you would like to use the console port for normal data acquisition applications, you can set the Console port to startup via PPP protocol. For details, refer to “Dial-up ServicePPP” 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 provided by Moxa lets you connect UC-7420/7410 to a Wireless LAN, with both 802.1b and 802.11g interfaces supported.
If you need device drivers for other kinds of PCMCIA cards, contact Moxa for information on how to initiate a cooperative development project.

CompactFlash

UC-7420 provides one CompactFlash slot that supports CompactFlash type I/II card expansion. Currently, Moxa provides a CompactFlash disk for plug & play mass storage expansion. You may also use flash disks available from most computer supply outlets. The CompactFlash will be mounted at
If you need device drivers for other kinds of mass storage cards, contact Moxa for information on how to initiate a cooperative development project.
/mnt/hda
1-11
UC-7420/7410 User’s Manual Introduction

Software Introduction

Software Architecture

The Linux operating system that is pre-installed in UC-7420/7410 follows the standard Linux architecture, making it easy to port programs that follow the POSIX standard to UC-7420/7410. Porting is done with the GNU Tool Chain provided by Moxa. In addition to the Standard POSIX API, device drivers for the LCM, buzzer and Keypad controls, USB/CompactFlash mass storage, UART, and Wireless LAN PCMCIA card are also included in the UC-7420/7410 Linux system.
AP
API
Protocol Stack
Device Driver
Microkernel
OS Kernel
Hardware
User Application
Application Interface (POSIX, Socket, Secure Socket)
TCP, IP, UDP, CMP, ARP, HTTP, SNMP, SMTP
PCMCIA, CF, WLAN, USB, UART, RTC, LCM, Keypad
Memory control, Schedule, Process
RS-232/422/485, Ethernet, PCMCIA, CompactFlash, USB
Daemon (Apache, Telnet, FTPD, SNMP)
File
System
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 use. This
Mini File System comes with serial and Ethernet communication capability for users to load the Factory Default Image file. The Mini File System will only be activated if the boot loader fails to
load the User Root File System.
User AP
User Directory
(User Configuration)
Linux Kernel & Root
Mini Root File System
Boot Loader
HW
Configuration
To improve system reliability, UC-7420/7410 has a built-in mechanism that prevents the system from crashing. The procedure is as follows.
When the Linux kernel boots up, the kernel will mount the root file system, and then enable
1-12
UC-7420/7410 User’s Manual Introduction
services and daemons. During this time, the kernel will start searching for system configuration parameters via rc or inittab.
Normally, the kernel uses the User Root File System to boot up the system. The Mini Root File System is protected, and cannot be changed by the user, providing a “safe” zone. The kernel will only use the Mini Root File System when the User Root File System crashes.
For more information about the memory map and programming, refer to Chapter 5, “Programmer’s Guide.”

Journaling Flash File System (JFFS2)

The User Root File System in the flash memory is formatted with the Journaling Flash File System (JFFS2). The formatting process places a compressed file system in the flash memory,
transparent to the user.
The Journaling Flash File System (JFFS2), which was developed by Axis Communications in Sweden, puts a file system directly on the flash, instead of emulating a block device. It is designed for use on flash-ROM chips and recognizes the special write requirements of a flash-ROM chip. JFFS2 implements wear-leveling to extend the life of the flash disk, and stores the flash directory structure in the RAM. A log-structured file system is maintained at all times. The system is always consistent, even if it encounters crashes or improper power-downs, 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 devices; native data compression inside the file system design; support for hard links.
The key features of JFFS2 are:
y Targets the Flash ROM Directly y Robustness y Consistency across power failures y No integrity scan (fsck) is required at boot time after normal or abnormal shutdown y Explicit wear leveling y Transparent compression
Although JFFS2 is a journaling file system, this does not preclude the loss of data. The file system will remain in a consistent state across power failures and will always be mountable. However, if the board is powered down during a write then the incomplete write will be rolled back on the next boot, but writes that have already been 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/

Software Package

Boot Loader Kernel Protocol Stack
File System
Redboot (V1.92) MontaVista embedded Linux 2.4.18 ARP, PPP, CHAP, PAP, IPv4, ICMP, TCP, UDP, DHCP, FTP, SNMP V1/V3, HTTP, NTP, NFS, SMTP, SSH 1.0/2.0, SSL, Telnet, PPPoE, OpenVPN JFFS2, NFS, Ext2, Ext3, VFAT/FAT
1-13
UC-7420/7410 User’s Manual Introduction
OS shell command Busybox Linux normal command utility collection Utilities
tinylogin login and user manager utility telnet telnet client program ftp FTP client program smtpclient email utility scp Secure file transfer Client Program
Daemons
pppd dial in/out over serial port daemon snmpd snmpd agent daemon telnetd telnet server daemon inetd TCP server manager program ftpd ftp server daemon apache web server daemon sshd secure shell server nfs-user-server network file system server openvpn virtual private network openssl open SSL
Linux Tool Chain Gcc (V3.3.2) GDB (V5.3) Glibc (V2.2.5) Windows Tool Chain Gcc (V3.3.2) GDB (V5.3) Glibc(V2.2.5) Insight (V60.1) Device Drivers
bash
C/C++ PC Cross Compiler Source Level Debug Server POSIX standard C library
C/C++ PC Cross Compiler Source Level Debug Server POSIX standard C library Windows environment source level debug utility 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 bug fixes, may not be included in this table.
Contact Moxa directly for detailed version information, and visit Moxa’s website to download the most up to date firmware version.
The firmware versions discussed here differ in the types and versions of BIOS, Kernel, Root File System, Mini File System, and User Directory that they bundle.
V1.1 V1.4.3 V1.5
Serial port 230.4 Kbps 230.4 Kbps
WLAN
USB Host N/A N/A Mass Storage PNP USB Client N/A N/A N/A Reset to Factory Default button N/A N/A Yes (with HW V1.5) Share Memory N/A N/A Yes
802.11b (Prism2.0/2.5)
1-14
802.11b (Prism2.0/2.5)
921.6 Kbps (with HW V1.5)
802.11b (Prism2.0/2.5)
802.11g (Gigabyte)
UC-7420/7410 User’s Manual Introduction
Protocol stacks and utilities
Arp (utility) N/A Yes Yes iptable 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
Apache root document /usr/html /usr/html /usr/www
User File System
User File System Change to ramdisk
1-15
2
2

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 programming and other functions.
The following topics are covered in this chapter:
Powering on UC-7420/7410 Connecting UC-7420/7410 to a PC
¾ Serial Console ¾ Telnet Console ¾ SSH Console
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 ProgramDeveloping 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 Application
¾ Testing Environment ¾ Compiling tcps2.c ¾ Uploading tcps2-release and Running the Program ¾ Testing Procedure Summary
UC-7420/7410 User’s Manual Getting Started

Powering on UC-7420/7410

Connect the SG wire to the Shielded Contact located in the upper left corner of the UC-7420/7410, and then power on UC-7420/7410 by connecting it to the power adaptor. It takes about 30 to 60 seconds for the system to boot up. Once the system is ready, the Ready LED will light up, and the Network address settings will appear on the LCM display.
NOTE After connecting UC-7420/7410 to the power supply, it will take about 30 to 60 seconds for the
operating system to boot up. The green Ready LED will not turn on until the operating system is ready.

Connecting 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 not need to know either of UC-7420/7410’s two IP addresses in order to connect to the serial console utility.
Use the serial console port settings shown below.
Baud rate Parity Data bits Stop bits: Flow Control Terminal
Once the connection is established, the following window will open.
115200 bps None 8 1 None VT100
To log in, type the Login name and password as requested. The default values are both root:
Login: root Password: root
2-2
UC-7420/7410 User’s Manual Getting Started

Telnet Console

If you know at least one of the two IP addresses and netmasks, then you can use Telnet to connect to UC-7420/7410’s console utility. The default IP address and Netmask for each of the two ports are given below:
LAN 1 LAN 2
Use a cross-over Ethernet cable to connect directly from your PC to UC-7420/7410. You should first modify your PC’s IP address and netmask so that your 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 addresses and netmasks are shown above. To login, type the Login name and password as requested. The default values are both root:
Login: root Password: root
Default IP Address Netmask
192.168.3.127 255.255.255.0
192.168.4.127 255.255.255.0
You can proceed with the configuration of UC-7420/7410’s network settings when you reach the bash command shell. Configuration instructions are given in the next section.
2-3
UC-7420/7410 User’s Manual Getting Started
ATTENTION
Serial Console Reminder
Remember to choose VT100 as the terminal type. Use cable CBL-RJ45F9-150, which comes with UC-7420/7410, to connect to the serial console port.
Telnet Reminder When connecting to UC-7420/7410 over a LAN, you must configure your PC’s Ethernet IP
address to be on the same 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) to set up an SSH console for UC-7420/7410 in a Windows environment. The following figure shows a simple example of the configuration that is required.
2-4
UC-7420/7410 User’s Manual Getting Started
Linux Users
From a Linux machine, use the “ssh” command to access UC-7420/7410’s Console utility via SSH.
#ssh 192.168.3.127
Select yes to complete the connection.
[root@bee_notebook root]# ssh 192.168.3.127 The authenticity of host ‘192.168.3.127 (192.168.3.127)’ can’t be established. RSA key fingerprint is 8b:ee:ff:84:41:25:fc:cd:2a:f2:92:8f:cb:1f:6b:2f. Are you sure you want to continue connection (yes/no)? yes_
NOTE SSH provides better security compared to Telnet for accessing UC-7420/7410’s Console utility
over the network.

Configuring the Ethernet Interface

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
2. Type
#vi interfaces
configure UC-7420/7410’s Ethernet ports for static or dynamic (DHCP) IP addresses.
Static IP addresses:
As shown below, 4 network addresses need to be modified: address, network, netmask, and broadcast. The default IP addresses are 192.168.3.127 for LAN1 and 192.168.4.127 for
LAN2, with default netmask of 255.255.255.0.
to edit the network configuration file with vi editor. You can
#cd /etc/network
to change directories.
2-5
UC-7420/7410 User’s Manual Getting Started
Dynamic IP addresses
By default, UC-7420/7410 is configured for “static” IP addresses. To configure one or both LAN ports to request an IP address dynamically, replace static with 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
3. After the boot settings of the LAN interface have been modified, issue the following command to activate the LAN settings immediately:
#/etc/init.d/networking restart
:
iface ixp0 inet dhcp
2-6
UC-7420/7410 User’s Manual Getting Started
NOTE After changing the IP settings, use the networking restart command to activate the new IP
address. However, the LCM display will still show the old IP address. To update the LCM display, you will need to reboot the UC-7420/7410.

Modifying Network Settings over the Network

IP settings can be activated over the network, but the new settings will not be saved to the flash ROM without modifying the file
/etc/network/interfaces
.
For example, type the command LAN1 to 192.168.1.1.
#ifconfig ixp0 192.168.1.1
to change the IP address of

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 WLAN for IEEE802.11b:
1. Unplug the PCMCIA Wireless LAN card first.
2. Configure the Wireless LAN card’s default IP setting profile.
(Default IP address is 192.168.5.127, netmask 255.255.255.0)
Edit network.opts with the following command to edit Wireless LAN’s default setting.
#vi /etc/pcmcia/network.opts
2-7
UC-7420/7410 User’s Manual Getting Started
3. Configure the Wireless LAN card’s default SSID setting profile.
(Default SSID is “any”)
#vi /etc/wlan/wlan.conf
// Consult your network 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
2-8
UC-7420/7410 User’s Manual Getting Started

IEEE802.11g

The following IEEE802.11g wireless modules are supported:
y ASUSWL-107g y CNETCWC-854 (181D version) y EdmiaxEW-7108PCg y AmigoAWP-914W y GigaByteGN-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 configuration file with vi editor, and then edit the 802.11g network settings (circled in red in the following figure).
#vi /etc/networking/interfaces
to open the “interfaces”
2-9
UC-7420/7410 User’s Manual Getting Started
3. Additional WLAN parameters are contained in the file RT2500STA.dat. To open the file, navigate to the RT2500STA folder and invoke vi, or type the following command
#vi /etc/Wireless/RT2500STA/RT2500STA.dat
options for the various parameters are listed below the figure.
to edit the file with vi editor. Setting
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 mixed 1 11b only 2 11g only
SSID—Sets the softAP SSID
Setting
Any 32-byte string
2-10
Loading...
+ 76 hidden pages