Moxa Technologies UC-7110 User Manual

UC-7110 Series User’s Manual
www.moxa.com/product
Second Edition, July 2005
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-7110 Series User’s Manual
The software described in this manual is furnished under a license agreement and may be used only in
accordance with the terms of that agreement.
Copyright Notice
Copyright © 2005 Moxa Technologies Co., Ltd.
All rights reserved.
Reproduction without permission is prohibited.
Trademarks
MOXA is a registered trademark of The Moxa Group.
All other trademarks or registered marks in this manual belong to their respective manufacturers.
Disclaimer
Information in this document is subject to change without notice and does not represent a commitment on the part of Moxa.
Moxa provides this document “as is,” without warranty of any kind, either expressed or implied, including, but not limited to, its particular purpose. Moxa reserves the right to make improvements and/or changes to this manual, or to the products and/or the programs described in this manual, at any time.
Information provided in this manual is intended to be accurate and reliable. However, Moxa assumes no responsibility for its use, or for any infringements on the rights of third parties that may result from its use.
This product might include unintentional technical or 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 Specifications ............................................................................................................. 1-3
Hardware Specifications (UC-7110-LX)...................................................................... 1-3
Software Specifications (UC-7110-LX)....................................................................... 1-4
Hardware Block Diagram ........................................................................................................ 1-5
Appearance .............................................................................................................................. 1-5
Dimensions .............................................................................................................................. 1-6
Installing UC-7110................................................................................................................... 1-7
LED Indicators......................................................................................................................... 1-8
Wiring Requirements............................................................................................................... 1-8
Connecting the Power................................................................................................... 1-9
Grounding UC-7110..................................................................................................... 1-9
Connecting Data Transmission Cables .................................................................................... 1-9
Connecting to the Network........................................................................................... 1-9
Connecting to a Serial Device .................................................................................... 1-10
Serial Console Port ..................................................................................................... 1-10
Additional Functions...............................................................................................................1-11
Reset Button ............................................................................................................... 1-11
Real Time Clock......................................................................................................... 1-12
Chapter 2 Getting Started .............................................................................................2-1
Powering on UC-7110 ............................................................................................................. 2-2
Connecting UC-7110 to a PC................................................................................................... 2-2
Console Port ................................................................................................................. 2-2
Telnet............................................................................................................................ 2-3
Configuring the Ethernet Interface .......................................................................................... 2-4
Developing Your Applications................................................................................................. 2-6
Installing the UC-7110 Tool Chain .............................................................................. 2-6
Compiling Hello.c ........................................................................................................ 2-7
Uploading “Hello” to UC-7110.................................................................................... 2-8
Running “Hello” on UC-7110 ...................................................................................... 2-9
Make File Example Code ........................................................................................... 2-10
Chapter 3 Software Package ........................................................................................3-1
UC-7110 Software Architecture............................................................................................... 3-2
Read-Only File System (ROMFS)................................................................................ 3-3
Journaling Flash File System (JFFS2).......................................................................... 3-3
UC-7110 Software Package..................................................................................................... 3-4
Chapter 4 Configuring UC-7110 ...................................................................................4-1
Enabling and Disabling Daemons............................................................................................ 4-2
Adding a Web Page.................................................................................................................. 4-3
IPTABLES ............................................................................................................................... 4-3
NAT.......................................................................................................................................... 4-7
NAT Example............................................................................................................... 4-7
Enabling NAT at Bootup.............................................................................................. 4-8
Configuring Dial-in/Dial-out Service ...................................................................................... 4-8
Dial-out Service............................................................................................................ 4-8
Dial-in Service.............................................................................................................. 4-9
Configuring PPPoE.................................................................................................................. 4-9
How to Mount a Remote NFS Server...................................................................................... 4-9
Upgrading the Kernel & Root File System............................................................................ 4-10
Upgrading the User Directory.................................................................................................4-11
User Directory Backup—UC-7110 to PC.............................................................................. 4-13
Loading Factory Defaults ...................................................................................................... 4-14
Mirroring the Application Program and Configuration.......................................................... 4-14
How to Autostart User Applications on Bootup..................................................................... 4-14
Checking the Kernel and User Directory Versions ................................................................ 4-14
Chapter 5 UC-7110 Device API .....................................................................................5-1
RTC (Real Time Clock) ........................................................................................................... 5-2
Buzzer...................................................................................................................................... 5-2
UART Interface........................................................................................................................ 5-2
Chapter 6 UC Finder ......................................................................................................6-1
Windows UC Finder ................................................................................................................ 6-2
Linux ucfinder.......................................................................................................................... 6-5
Appendix A System Commands..................................................................................... A-1
busybox (V0.60.4): µClinux normal command utility collection ........................................... A-1
File manager ................................................................................................................ A-1
Editor ........................................................................................................................... A-1
Network ....................................................................................................................... A-2
Process......................................................................................................................... A-2
Other............................................................................................................................ A-2
MOXA Special Utilities .............................................................................................. A-2
Appendix B SNMP Agent with MIB II & RS-232 Like Group ......................................... B-1
Appendix C FAQ for UC-7110 ......................................................................................... C-1
Appendix D Service Information..................................................................................... D-1
MOXA Internet Services......................................................................................................... D-2
Problem Report Form ............................................................................................................. D-3
Product Return Procedure....................................................................................................... D-4
1
1

Chapter 1 Introduction

The MOXA UC-7110 Series of RISC-based Communication Platforms features two RS-232/422/485 serial ports, and dual 10/100 Mbps Ethernet ports, making these products ideal for embedded OS applications.
This chapter covers the following topics:
Overview
Package Checklist
Product Features
Product Specifications
Hardware Block Diagram
Appearance
Dimensions
Installing UC-7110
LED Indicators
Wiring Requirements
¾ Connecting the Power
¾ Grounding UC-7110
Connecting Data Transmission Cables
¾ Connecting to the Network
¾ Connecting to a Serial Device
¾ Serial Console Port
Additional Functions
¾ Reset Button (not yet activated)
¾ Real Time Clock
UC-7110 Series User’s Manual Introduction

Overview

The UC-7110 Series of RISC-based Communication Platforms are ideal for your embedded applications. UC-7110 comes with two RS-232/422/485 serial ports and dual 10/100 Mbps Ethernet LAN ports to provide users with a versatile communication platform.
UC-7110 uses the ARM9 166 Mhz RISC CPU. Unlike the X86 CPU, which uses a CISC design, the ARM9’s RISC design architecture and modern semiconductor technology provide UC-7110 with a powerful computing engine and communication functions, but without generating too much heat. The built-in 8 MB NOR Flash ROM and 16 MB SDRAM give you enough storage capacity to run applications on UC-7110. The dual LAN ports built into the ARM9 make UC-7110 an ideal communication platform for some of the more simple data acquisition and protocol conversion applications, and the two RS-232/422/485 serial ports allow you to connect a variety of different types of serial device.
The pre-installed µClinux operating system provides an open software operating system for software program development. This means that software written for desktop PCs is easily ported to UC-7110 by using a GNU cross complier, so that you will not need to spend time modifying existing software code. The Operating System, device drivers, and your own software can all be stored in UC-7110’s Flash memory.

Package Checklist

The UC-7110 Series model currently available is:
UC-7110-LX RISC-based Universal Communicator with 2 Serial Ports, Dual Ethernet, µClinux OS
UC-7110 Series products are shipped with the following items:
y 1 UC-7110 y UC-7110 Quick Installation Guide y Universal Communicator Documentation & Software CD-ROM y Ethernet cross-over cable: RJ45 to RJ45, 100 cm y Console port cable
CBL-4PINDB9F-100: 4-pin header to DB9 (Female) cable, 100 cm
y Power Adaptor y Product Warranty Booklet
NOTE: Notify your sales representative if any of the above items is missing or damaged.

Product Features

UC-7110 Series products have the following features:
y ARM9 166 MHz Processor y On-board 16 MB RAM, 8 MB Flash ROM y Two RS-232/422/485 serial ports y Dual 10/100 Mbps Ethernet y µClinux-Ready communication platform y DIN-Rail or wall mounting installation y Robust fanless design
1-2
UC-7110 Series User’s Manual Introduction

Product Specifications

Hardware Specifications (UC-7110-LX)

CPU
RAM
Flash
LAN
LAN Protection
Serial Ports
Serial Protection
Data bits
Stop bits
Parity
Flow Control
Speed
Real Time Clock
Buzzer
Console Port
LEDs
Gross Weight
ARM9-based 32-bit RISC CPU, 166 Mhz
16 MB (12 MB of user programmable space)
8 MB (4 MB of user programmable space)
Auto-sensing 10/100 Mbps x 2
Built-in 1.5 KV magnetic isolation The two RS-232/422/485 ports support:
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
RTC/CTS, XON/XOFF
50 bps to 921.6 Kbps
Ye s
Ye s
RS-232, 3-wire (Tx, Rx, GND) (19200, n, 8 , 1) Ready
Serial Tx, Rx (2 of each) LAN 10/100 (one on each LAN connector)
190 g
Power input
Power Consumption
Operating temperature
Storage temperature
Regulatory Approvals
Warran ty
12-48 VDC
290 mA @ 12 VDC
-10 to 60, (14 to 140F), 5 to 95%RH
-20 to80, (-4 to 185F), 5 to 95%RH EMC: FCC Class A, CE Class A
Safety: UL, CUL, TÜV 5 years
1-3
UC-7110 Series User’s Manual Introduction

Software Specifications (UC-7110-LX)

Kernel
Protocol Stack
JFFS2 File System
ROMFS
Sash (V1.1.1)
Pppd (V1.13)
snmpd
busybox (V0.60.4)
Tinylogin (V0.80)
Telnetd (V1.9)
telnet (busybox V0.60.4)
inetd (Distributed 20030522)
ftpd (V8.5)
ftp (V0.16)
boa
ntpdate (V4.1.1)
Tool Chain
Arm-elf-gcc (V2.95.3)
µClinux Kernel 2.4.22 AR P, I C M P, IP V4 , T CP, UD P, F T P, Tel n e t, NT P, S N MP V 1 ,
HTTP, PPP, CHAP, PAP, NFS User Directory (Read / Write)
Kernel, Root File System (Read Only)
Simple OS shell command
dial in/out over serial port daemon
SNMP V1 Agent daemon
Linux normal command utility
login and user manager utility
Telnet server daemon
Telnet client program
TCP server manager program
FTP server program
FTP client program
Web server daemon
Network Time Protocol client utility
C/C++ PC Cross Compiler
uClib (V0.9.19)
UC Finder
POSIX standard library
UC’s LAN IP broadcast searching utility for Windows and Linux
1-4
UC-7110 Series User’s Manual Introduction

Hardware Block Diagram

Power Circuit

Appearance

Ethernet
LAN1 LAN2
PHY PHY
S3C2500 ARM940T 166MHz 8MB Flash 16MB SDRAM
MOXA
MU150
MOXA
MU150
Port 1 Port 2
RS-232/422/485
RTC
48 VDC
12-
Serial Port 1 (RS-232/422/485)
V+ RESET
12-48V
Ready
TX
P1
RX
TX
P2
RX
UC-7110
Universal Communicator
RS-232/422/485
P1 P2
LAN1
Ethernet x 2 (10/100BaseTx)
LAN2
Serial Port 2 (RS-232/422/485)
RS-232 Console Terminal
1-5
UC-7110 Series User’s Manual Introduction

Dimensions

21.3 (0.8)
47.3 (1.56)
unit = mm (inch)
111 (4.31)
V+ RESET
12-48V
Ready
TX
P1
RX
TX
P2
RX
UC-7110
Universal Communicator
RS-232/422/485
P1 P2
77 (3.03)
88 (3.46)
100 (4.18)
LAN1
LAN2
6 (0.24)
4 (0.16)
12.5 (0.49)
25 (0.98)
7 (0.28)
26 (1.02)
1-6
UC-7110 Series User’s Manual Introduction

Installing UC-7110

Top-End View
Reset Button
Terminal Block Power Input
Nameplate View
V+
12-48V
Ready
TX
P1
RX
TX
P2
RX
P1 P2
RJ45 10/100 Mbps Ethernet Ports
RESET
LAN1 LAN2
UC-7110
Universal Communicator
RS-232/422/485
DIN-Rail screw hole
Wallmount screw hole
Bottom-End View
DB9 (male) Serial Ports
1-7
UC-7110 Series User’s Manual Introduction

LED Indicators

The following table explains the function of the five LED indicators located on UC-7110’s top panel.
LED Name LED Color LED Function
Ready Green Power is on and functioning normally.
P1/P2 (Tx)
Green
Off
Serial port 1/2 is transmitting data.
Serial port 1/2 is not transmitting data.
P1/P2 (Rx)

Wiring Requirements

This section describes how to connect UC-7110 to serial devices.
You should heed the following common safety precautions before proceeding with the installation of any electronic device:
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.
y 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 It is advisable to label the wiring to all devices in the system.
ATTENTION
Yellow
Off
Serial port 1/2 is receiving data.
Serial port 1/2 is not receiving data.
Safety First!
Be sure to disconnect the power cord before installing and/or wiring your UC-7110.
Wiring Caution!
Calculate the maximum possible current in each power wire and common wire. Observe all electrical codes dictating the maximum current allowable for each wire size.
If the current goes above the maximum ratings, the wiring could overheat, causing serious damage to your equipment.
Temperature Caution!
Be careful when handling UC-7110. When plugged in, UC-7110’s internal components generate heat, and consequently the outer casing may feel hot to the touch.
1-8
UC-7110 Series User’s Manual Introduction

Connecting the Power

Connect the “live-wire” end of the 12-48 VDC power adaptor to UC-7110’s terminal block. If the power is properly supplied, the “Ready” LED will show a solid green color after a 25 to 30 second delay.

Grounding UC-7110

Grounding and wire routing helps limit the effects of noise due to electromagnetic interference (EMI). Run the ground wire from the ground screw to the grounding surface prior to connecting devices.
ATTENTION
This product should be mounted to a well-grounded mounting surface such as a metal panel.
SG
V+V-
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 Data Transmission Cables

This section describes how to connect UC-7110 to the network, serial devices, and serial COM terminal.

Connecting to the Network

Connect one end of the Ethernet cable to UC-7110’s 10/100M Ethernet port and the other end of the cable to the Ethernet network. If the cable is properly connected, UC-7110 will indicate a valid connection to the Ethernet in the following ways:
y The top-right LED on the connector maintains a solid green color when connected to a 100
Mbps Ethernet network.
y The top-left LED on the connector maintains a solid orange color when connected to a 10
Mbps Ethernet network.
y The LEDs will flash when Ethernet packets are being transmitted or received.
1-9
UC-7110 Series User’s Manual Introduction
The 10/100 Mbps Ethernet LAN 1 and LAN 2 ports use 8-pin RJ45 connectors. Pinouts for these ports are given in the following diagram.
8-pin RJ45
10 Mbps indicator
100 Mbps indicator
Pin Signal
1 ETx+ 2 ETx­3 ERx+ 4 --­5 ---
1
8
6 ERx­7 --­8 ---

Connecting to a Serial Device

Connect the serial cable between UC-7110 and the serial device(s).
Serial ports P1 and P2 use male DB9 connectors, and can be configured for RS-232/422/485 by software. The pin assignments are shown in the following table:
DB9 Male Port
12345
6789

Serial Console Port

The serial console port is a 4-pin pin-header RS-232 port. It is designed for serial console terminals, which are useful for identifying the UC-7110 boot up message.
Serial Console Port & Pinouts
4
3
2
1
Pin Signal
1 TxD 2 RxD 3 NC 4 GND
RS-232/422/485 Pinouts
Pin RS-232 RS-422
RS-485
(4-wire)
RS-485
(2-wire)
1 DCD TxDA(-) TxDA(-) --­2 RxD TxDB(+) TxDB(+) --­3 TxD RxDB(+) RxDB(+) DataB(+) 4 DTR RxDA(-) RxDA(-) DataA(-) 5 GND GND GND GND 6 DSR --- --- --­7 RTS --- --- --­8 CTS --- --- ---
Serial Console Cable
1-10
UC-7110 Series User’s Manual Introduction

Additional Functions

Reset Button

Press the “RESET” button continuously for more than 5 seconds to load the factory default configuration. After loading the factory default, the system will reboot automatically. The System Ready LED will be blinking for the first 5 seconds. We recommend that you only use this function if the software is not working properly. To reset the µClinux system software, always use the software reboot command />reboot to protect the integrity of data in the process of being transmitted. The reset button is not designed to Hard Reboot UC-7110.
ATTENTION
Resetting to factory default will not format the user directory and erase all of the user's data. Loading factory default will only load the configuration file. The files in UC-7110 that will be changed include:
a. /etc/boa.conf
b. /etc/hosts
c. /etc/inittab
d. /etc/password
e. /etc/ramfs.img
f. /etc/resolv.conf
g. /etc/version
h. /etc/group
i. /etc/inetd.conf
j. /etc/motd
k. /etc/protocols
l. /etc/rc
m. /etc/services
o. /home/httpd/boa.conf
p. /home/httpd/index.html
ATTENTION
This function only takes effect when the user directory is working correctly. If the user directory has crashed, the kernel will automatically load factory default.
1-11
UC-7110 Series User’s Manual Introduction

Real Time Clock

UC-7110’s real time clock is powered by a lithium battery. We strongly recommend that you do not replace the lithium battery without the help of Moxa’s support team. If the battery needs to be changed, contact the Moxa RMA service team for RMA service.
ATTENTION
The battery may explode if replaced by the incorrect type. To avoid this potential danger, always be sure to use the correct type of battery.
1-12

Chapter 2 Getting Started

In this chapter, we explain the basic procedure for getting UC-7110 connected.
This chapter covers the following topics:
Powering on UC-7110
Connecting UC-7110 to a PC
Configuring the Ethernet Interface
Developing Your Applications
2
2
¾ Installing the UC-7110 Tool Chain
¾ Compiling Hello.c
¾ Uploading “Hello” to UC-7110
¾ Running “Hello” on UC-7110
¾ Make File Sample Code
UC-7110 Series User’s Manual Getting Started

Powering on UC-7110

Connect the SG wire to the Shielded Contact located on the upper left corner of the UC-7110, and then power on UC-7110 by connecting the power adaptor. It takes about 16 seconds for the system to boot up. Once the system is ready, the Ready LED will light up.
ATTENTION
After connecting UC-7110 to the power supply, it will take about 16 seconds for the operating system to boot up. The green Ready LED will not turn on until the operating system is ready.

Connecting UC-7110 to a PC

There are two ways to connect UC-7110 to a PC.

Console Port

The serial console port offers users with a convenient mean of connecting to UC-7110. This method is particularly useful when using UC-7110 for first time. Since the communication is over a direct serial connection, you do not need to know either of the IP addresses in order to make contact.
Use serial console port settings shown at the right. Once the connection is established, the following window will open.
Serial Console Port Settings
Baud rate
Parity
Data bits
Stop bits
Flow Control
Terminal
19200 bps
None
8
1
None
VT100
2-2
UC-7110 Series User’s Manual Getting Started

Telnet

If you know at least one of the two IP addresses and netmasks, then you can use Telnet to connect to UC-7110’s console.
Telnet can be used locally by using a cross-over Ethernet cable to connect your computer to UC-7110, or over a LAN or the Internet. The default IP addresses and netmasks are shown above. To login, type the Login name and password as requested. The defaults are:
Login: root Password: root
LAN 1
LAN 2
Default IP Address Default Netmask
192.168.3.127 255.255.255.0
192.168.4.127 255.255.255.0
Once you reach the “Sash command shell” you can proceed to configure UC-7110’s network settings, as described in the next section.
ATTENTION
y Serial Console Reminder: Remember to choose VT100 as the terminal type. Use the
CBL-RJ45F9-150 cable that comes with UC-7110 to connect to the serial console port. If you do not get connected on the first try, unplug and then re-plug UC-7110’s power cord.
y Telnet Reminder: When connecting to UC-7110 over a LAN, you must configure your
PC’s Ethernet card to be on the same subnet as the UC-7110 you wish to contact.
2-3
UC-7110 Series User’s Manual Getting Started

Configuring the Ethernet Interface

In this section we use the serial console to explain how to modify UC-7110’s network settings.
1. Change directories by issuing the command cd /mnt/etc.
2. Type the command vi rc to use VI Editor to edit the configuration file. The IP addresses for UC-7110’s LAN1 and LAN2 are given as
ifconfig eth0 192.168.3.127 ifconfig eth1 192.168.4.127
as shown in the following figure. Edit these two lines to modify the static IP addresses.
2-4
Loading...
+ 44 hidden pages