Manuals
/
Brands
/
Computer Equipment
/
Computer Hardware
/
Moxa Technologies
/
Computer Equipment
/
Computer Hardware
Moxa Technologies
W311, W321, W341 user manual
1
1
104
104
Download
104 pages, 2.17 Mb
ThinkCore W311/321/341 Linux User’s Manual
Second Edition, March 2007
www.moxa.com/product
MOXA Systems Co., Ltd.
Tel: +886-2-2910-1230
Fax: +886-2-2910-1231
Web:
www.moxa.com
MOXA Technical Support
Worldwide:
support@moxa.com
Contents
Main
ThinkCore W311/321/341 Linux Users Manual
www.moxa.com/product
ThinkCore W311/321/341 Linux Users Manual
Copyright Notice
Trademarks
Table of Contents
Page
Page
Page
ThinkCore W311/321/341 Linux Users Manual Introduction
Overview
Software Architecture
ThinkCore W311/321/341 Linux Users Manual Introduction
Journaling Flash File System (JFFS2)
ThinkCore W311/321/341 Linux Users Manual Introduction
Software Package
Page
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-2
Powering on the W311/321/341
Connecting the W311/321/341 to a PC
Serial Console
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-3
Telnet Console
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-4
SSH Console
Windows Users
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-5
Configuring the Ethernet Interface
Modifying Network Settings with the Serial Console
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-6
Modifying Network Settings over the Network
Configuring the WLAN
IEEE802.11a/b/g
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-7
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-8
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-9
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-10
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-11
Using WPA_SUPPLICANT to Support WPA and WPA2
SD Slot and USB for Storage Expansion
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-12
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-13
Test ProgramDeveloping Hello.c
Installing the Tool Chain (Linux)
Checking the Flash Memory Space
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-14
Compiling Hello.c
detratS gnitteG launaM sresU xuniL 143/123/113W eroCknihT
2-15
Uploading and Running the Hello Program
Developing Your First Application
Testing Environment
ThinkCore W311/321/341 Linux Users Manual Getting Started
2-17
Compiling tcps2.c
detratS gnitteG launaM sresU xuniL 143/123/113W eroCknihT
2-18
Uploading and Running the tcps2-release Program
3. From the W311/321/341, type:
ThinkCore W311/321/341 Linux Users Manual Getting Started
#ps ef
command for job number 1 to terminate this program:
4. The program should start running in the background. Use the
Testing Procedure Summary
RS-232 LAN
Read serial data Send data to PC2
Write data to PC1 Receive LAN data
tcps2.c
Page
ThinkCore W311/321/341 Linux Users Manual Managing Embedded Linux
3-2
System Version Information
System Image Backup
Upgrading the Firmware
ThinkCore W311/321/341 Linux Users Manual Managing Embedded Linux
3-3
command to list the size of each memory block and how much free space is available in each block.
3-4
3. Next, use the upfirm command to upgrade the kernel and root file system:
ThinkCore W311/321/341 Linux Users Manual Managing Embedded Linux
3-5
Loading Factory Defaults
Backing Up the User Directory
3-6
Deploying the User Directory to Additional W311/321/341 Units
Enabling and Disabling Daemons
3-7
Type the command ps ef to list all processes currently running.
To run a private daemon, you can edit the file rc.local, as follows:
3-8
The enabled daemons will be available after you reboot the system.
Setting the Run-Level
as an example.
3-9
Adjusting the System Time
Setting the Time Manually
3-10
NTP Client
Updating the Time Automatically
3-11
CronDaemon to Execute Scheduled Commands
Page
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-2
Telnet / FTP
DNS
Web ServiceApache
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-3
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-4
Installing PHP for Apache Web Server
4-5
Step 2: Type upramdisk to get the free space ram disk to save the package.
Step 4: uhtar the package. To do this, type the command tar xvzf php.tar.gz
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-6
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-7
IPTABLES
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-8
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-9
Observe and erase chain rules
4-10
Define policy for chain rules
Append or delete rules:
4-11
NAT
NAT Example
NAT Area / Private IP
4-12
Enabling NAT at Bootup
Dial-up ServicePPP
Example 1: Connecting to a PPP server over a simple dial-up connection
4-13
4-14
Example 2: Connecting to a PPP server over a hard-wired link
How to check the connection
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-15
PPPoE
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-16
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-17
NFS (Network File System)
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-18
Setting up the W311/321/341 as an NFS Client
Mail
SNMP
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-19
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-20
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-21
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-22
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-23
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-24
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-25
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-26
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-27
OpenVPN
Setup 1: Ethernet Bridging for Private Networks on Different Subnets
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-28
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-29
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-30
Create link symbols to enable this script at boot time:
4. Start both of OpenVPN peers,
ThinkCore W311/321/341 Linux Users Manual Managing Communications
Setup 2: Ethernet Bridging for Private Networks on the Same Subnet
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-32
Setup 3: Routed IP
1. Set up four machines as shown in the following diagram:
ThinkCore W311/321/341 Linux Users Manual Managing Communications
4-33
Development
5-2
Linux Tool Chain
Steps for Installing the Linux Tool Chain
Compilation for Applications
5-3
On-Line Debugging with GDB
5-4
Windows Tool Chain
System Requirements for Windows Tool Chain
Steps for Installing Windows T ool Chain
5-5
5-6
5-7
5-8
5-9
Using the BASH Shell
5-10
Compilation for Applications
5-11
After that, use FTP to upload the executable file to the UC, and then run the executable.
5-12
On-Line Debugging with Insight
Page
ThinkCore W311/321/341 Linux Users Manual Programmers Guide
6-2
Flash Memory Map
Device API
RTC (Real Time Clock)
ThinkCore W311/321/341 Linux Users Manual Programmers Guide
6-3
Buzzer
WDT (Watch Dog Timer)
ThinkCore W311/321/341 Linux Users Manual Programmers Guide
6-4
ThinkCore W311/321/341 Linux Users Manual Programmers Guide
6-5
ThinkCore W311/321/341 Linux Users Manual Programmers Guide
6-6
The makefile is shown below:
Example 2:
ThinkCore W311/321/341 Linux Users Manual Programmers Guide
UART
Example to set the baudrate
Example to get the baudrate
ThinkCore W311/321/341 Linux Users Manual Programmers Guide
6-8
DO
Page
Page
ThinkCore W311/321/341 Linux Users Manual UC Finder
8-2
Windows UC Finder
Installing the Software
ThinkCore W311/321/341 Linux Users Manual UC Finder
8-3
Broadcast Search
ThinkCore W311/321/341 Linux Users Manual UC Finder
8-4
Linux ucfinder
A
A
busybox (V0.60.4): Linux normal command utility collection
File manager
Process
Other
MOXA special utilities
Page
ThinkCore W311/321/341 Linux Users Manual Service Information
B-2
MOXA Internet Services
Problem Report Form MOXA ThinkCore W311/321/341
Product Return Procedure