Moxa W341 - Manuals
Moxa W341 – Manual in PDF format online.
Manuals:
Manual Moxa W341
Summary
ThinkCore W311/321/341 Linux 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 © 2007 Moxa Systems Co., Ltd. All rights reserved. Reproduction without permission i...
Table of Contents Chapter 1 Introduction ..................................................................................................1-1 Overview.................................................................................................................................. 1-2 Software Archi...
1 1 Chapter 1 Introduction The MOXA ThinkCore W311/321/341 are RISC-based ready-to-run wireless embedded computers with 802.11a/b/g WLAN, one 10/100 Mbps Ethernet port, an internal SD socket, 1/2/4 RS-232/422/485 serial ports, two USB 2.0 hosts, one relay output channel, and pre-installed Linux oper...
ThinkCore W311/321/341 Linux User’s Manual Introduction 1-2 Overview The ThinkCore W311/321/341 wireless embedded computers support 802.11a/b/g wireless LANs with data encryption functions, including the common WEP and powerful WPA and WPA2, to establish a secure transmission tunnel over a WLAN. Thi...
ThinkCore W311/321/341 Linux User’s Manual Introduction 1-3 Factory Default Image file. The user directory saves the user’s settings and application. To improve system reliability, the W311/321/341 have a built-in mechanism that prevents the system from crashing. When the Linux kernel boots up, the ...
2 2 Chapter 2 Getting Started In this chapter, we explain how to connect the W311/321/341, how to turn on the power, how to get started programming, and how to use the W311/321/341’s other functions. The following topics are covered in this chapter: Powering on the W311/321/341 Connecting the W3...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-2 Powering on the W311/321/341 Connect the SG wire to the shielded contact located in the upper left corner of the W311/321/341, and then power on the computer by connecting it to the power adaptor. It takes about 30 to 60 seconds for the ...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-3 The following window will open when a connection has been established. To log in, type the Login name and password as requested. The default values are both root : Login: root Password: root Telnet Console If you know at least one of the...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-4 You can proceed with configuring the network settings of the target computer when you reach the bash command shell. Configuration instructions are given in the next section. ATTENTION Serial Console Reminder Remember to choose VT100 as t...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-5 Linux Users From a Linux machine, use the “ssh” command to access the W311/321/341’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 ...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-6 2. Type #vi interfaces to edit the network configuration file with vi editor. You can configure the Ethernet ports of the W341 for static or dynamic (DHCP) IP addresses. Static IP addresses As shown in the table below, 4 network addresse...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-9 Channel —Sets the channel Using iwconfig eth1 channel Setting Note: Infrastruct couldn’t set channel Freq —Sets the channel frequence Using iwconfig eth1 freq Setting(G,M,K) Note: Infrastruct couldn’t set freq 802.11b,g Channel and Frequ...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-11 Using WPA_SUPPLICANT to Support WPA and WPA2 This embedded computer supports the WPA and WPA2 functions using the /bin/wpa_supplicant program. We wrote a shell script to help you use this function: Step 1: Edit the ssid and psk variable...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-12 W341 The SD slot is located on the front panel of the W341. To install an SD card, you must first remove the SD slot’s protective cover to access the slot, and then plug the SD card directly into the slot.The SD card will be mounted at ...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-13 Test Program — Developing Hello.c In this section, we use the standard “Hello” programming example to illustrate how to develop a program for the W311/321/341. In general, program development involves the following seven steps. Step 1: ...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-14 If there isn’t enough “Available” space for your application, you will need to delete some existing files. To do this, connect your PC to the W311/321/341 with the console cable, and then use the console utility to delete the files from...
d e t r a t S g n it t e G l a u n a M s ’r e s U x u n i L 1 4 3 / 1 2 3 / 1 1 3 W e r o C k n i h T 2-15 NOTE Since Moxa’s tool chain places a specially designed Makefile in the directory /tmp/example/hello , be sure to type the #make command from within that directory. This special Makefile uses ...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-16 Testing Environment The tcps2 example demonstrates a simple application program that delivers transparent, bi-directional data transmission between the W311/321/341’s serial and Ethernet ports. As illustrated in the following figure, th...
d e t r a t S g n it t e G l a u n a M s ’r e s U x u n i L 1 4 3 / 1 2 3 / 1 1 3 W e r o C k n i h T 2-18 Uploading and Running the “tcps2-release” Program Use the following commands to upload tcps2-release to the W311/321/341 through an FTP connection.1. From the PC, type: #ftp 192.168.3.127 2. Ne...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-19 4. The program should start running in the background. Use the #ps –ef command to check if the tcps2 program is actually running in the background. #ps // use this command to check if the program is running 192.168.3.127 – PuTTY root@Mo...
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-20 NOTE Use the kill -9 command for PID 728 to terminate this program: #kill -9 %728 Testing Procedure Summary 1. Compile tcps2.c (#make ) . 2. Upload and run tcps2-release in the background (#./tcps2-release &) . 3. Check that the pro...
3 3 Chapter 3 Managing Embedded Linux This chapter includes information about version control, deployment, updates, and peripherals. The information in this chapter will be particularly useful when you need to run the same application on several W311/321/341 units. The following topics are covered i...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-2 System Version Information To determine the hardware capability of your W311/321/341, and what kind of software functions are supported, check the version numbers of your W311/321/341’s hardware, kernel, and user file system. Con...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-3 Since different Flash disks have different sizes, it is a good idea to check the size of your Flash disk before upgrading the firmware, or before using the disk to store your application and data files. Use the #df –h command to ...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-4 2. Type the following commands to use the W311/321/341’s built-in FTP client to transfer the firmware file (W341 -x.x.x.frm ) from the PC to the W311/321/341: /mnt/ramdisk> ftp <destination PC’s IP> Login Name: xxxx Logi...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-5 ATTENTION The upfirm utility will reboot your target after the upgrade is OK. Loading Factory Defaults To load the the factory default settings, you must press the reset-to-default button for more than 5 seconds. All files in the...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-6 Deploying the User Directory to Additional W311/321/341 Units For some applications, you may need to ghost one W311/321/341 user file system to other W311/321/341 units. Back up the user file system to a PC (refer to the previous...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-7 Type the command “ps –ef” to list all processes currently running. 192.168.3.127 – PuTTY root@Moxa:~# cd /etc root@Moxa:/etc# ps -ef PID Uid VmSize Stat Command 1 root 532 S init [3] 2 root SWN [ksoftirqd/0] 3 root SW< [events...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-8 The enabled daemons will be available after you reboot the system. 192.168.3.127 – PuTTY root@Moxa:~# ps -ef PID Uid VmSize Stat Command 1 root 532 S init [3] 2 root SWN [ksoftirqd/0] 3 root SW< [events/0] 4 root SW< [khelp...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-9 192.168.3.127 – PuTTY root@Moxa:/ect/rc.d/rc3.d# ls S19nfs-common S25nfs-user-server S99showreadyled S20snmpd S55ssh S24pcmcia S99rmnologin root@Moxa:/ect/rc.d/rc3.d# ln –s /home/tcps2-release S60tcps2 root@Moxa:/ect/rc.d/rc3.d# ...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-10 The following figure illustrates how to update thesystem time and set the RTC time. 192.168.3.127 – PuTTY root@Moxa:~# date Fri Jun 23 23:30:31 CST 2000 root@Moxa:~# hwclock Fri Jun 23 23:30:35 2000 -0.557748 seconds root@Moxa:~...
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-11 How to run the shell script automatically when the kernel boots up Copy the example shell script fixtime to directory /etc/init.d , and then use chmod 755 fixtime to change the shell script mode. Next, use vi editor to edit the ...
4 4 Chapter 4 Managing Communications In this chapter, we explain how to configure the W311/321/341’s various communication functions. The following topics are covered in this chapter: Telnet / FTP DNS Web Service — Apache Installing PHP for Apache Web Service IPTABLES NAT ¾ NAT Example ...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-2 Telnet / FTP In addition to supporting Telnet client/server and FTP client/server, the W311/321/341 also support SSH and sftp client/server. To enable or disable the Telnet/ftp server, you first need to edit the file /etc/inetd.c...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-3 /home/httpd/cgi-bin/ Before you modify the homepage, use a browser (such as Microsoft Internet Explorer or Mozilla Firefox) from your PC to test if the Apache Web Server is working. Type the LAN1 IP address in the browser’s addre...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-4 To open the default CGI test script report page, type http://192.168.3.127/cgi-bin/test-cgi in your browser’s address box. NOTE The CGI function is enabled by default. If you want to disable the function, modify the file /etc/apa...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-6 Step 5: Run ‘install.sh’ and select to install php 192.168.3.127 – PuTTY root@Moxa:/mnt/ramdisk# ./install.sh Press the number: 1. Install PHP package 2. Uninstall PHP package 3. Exit. 1 Start to install PHP. Please wait ... Star...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-7 IPTABLES IPTABLES is an administrative tool for setting up, maintaining, and inspecting the Linux kernel’s IP packet filter rule tables. Several different tables are defined, with each table containing built-in chains and user-de...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-9 NOTE The W311/321/341 do NOT support IPV6 and ipchains. The basic syntax to enable and load an IPTABLES module is as follows: #lsmod #insmod ip_tables #insmod iptable_filter Use lsmod to check if the ip_tables module has already ...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-10 Define policy for chain rules Usage: # iptables [-t tables] [-P] [INPUT, OUTPUT, FORWARD, PREROUTING, OUTPUT, POSTROUTING] [ACCEPT, DROP] -P: Set the policy for the chain to the given target. INPUT: For packets coming into the W...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-11 Example 8: Drop all packets from MAC address 01:02:03:04:05:06. # iptables –A INPUT –i eth0 –p all –m mac -–mac-source 01:02:03:04:05:06 –j DROP NOTE: In Example 8, remember to issue the command #insmod ipt_mac first to load mod...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-12 Enabling NAT at Bootup In most real world situations, you will want to use a simple shell script to enable NAT when the W341 boots up. The following script is an example. #!/bin/bash # If you put this shell script in the /home/n...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-13 optional. #pppd connect ‘chat -v “ “ ATDT5551212 CONNECT ogin: username word: password ’ /dev/ttyM0 115200 debug crtscts modem defaultroute If the PPP server does not prompt for the username and password, the command should be e...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-14 Example 2: Connecting to a PPP server over a hard-wired link If a username and password are not required, use the following command (note that noipdefault is optional): #pppd connect ‘chat –v “ “ “ ‘ noipdefault /dev/ttyM0 19200...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-15 This should show three routes, something like this: Kernel routing table Destination Gateway Genmask Flags Metric Ref Use iface 129.67.1.165 0.0.0.0 255.255.255.255 UH 0 0 6 ppp0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 12...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-17 6. Add one of two files: /etc/ppp/options.eth0 or /etc/ppp/options.eth1 . The choice depends on which LAN is connected to the ADSL modem. If you use LAN1 to connect to the ADSL modem, then add /etc/ppp/options.eth0 . If you use ...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-18 NOTE Click on the following links for more information about NFS: http://www.tldp.org/HOWTO/NFS-HOWTO/index.html http://nfs.sourceforge.net/nfs-howto/client.html http://nfs.sourceforge.net/nfs-howto/server.html Setting up the W3...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-27 OpenVPN OpenVPN provides two types of tunnels for users to implement VPNS: Routed IP Tunnels and Bridged Ethernet Tunnels . To begin with, check to make sure that the system has a virtual device /dev/net/tun . If not, issue the ...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-31 5. On each OpenVPN machine, check the routing table by typing the command: # route Destination Gateway Genmsk Flags Metric Ref Use Iface 192.168.4.0 * 255.255.255.0 U 0 0 0 br0 192.168.2.0 * 255.255.255.0 U 0 0 0 br0 192.168.8.0...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-32 2. The configuration procedure is almost the same as for the previous example. The only difference is that you will need to comment out the parameter “up” in “/etc/openvpn/A-tap0-br.conf” and “/etc/openvpn/B-tap0-br.conf”. Setup...
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-33 # value after “-net” is the subnet behind the remote peer route add -net 192.168.2.0 netmask 255.255.255.0 gw $5 #--------------------------------- end ----------------------------- Note that the parameter “ifconfig” defines the...
5 5 Chapter 5 Tool Chains for Application Development This chapter describes how to install a tool chain in the host computer that you use to develop your applications. In addition, the process of performing cross-platform development and debugging are also introduced. For clarity, the W311/321/341 ...
ThinkCore W311/321/341 Linux User’s Manual Tool Chains for Application Development 5-2 Linux Tool Chain The Linux tool chain contains a suite of cross compilers and other tools, as well as the libraries and header files that are necessary to compile your applications. These tool chain components mus...
ThinkCore W311/321/341 Linux User’s Manual Tool Chains for Application Development 5-3 The following cross compiler tools are provided: ar Manages archives (static libraries) as Assembler c++, g++ C++ compiler cpp C preprocessor gcc C compiler gdb Debugger ld Linker nm Lists symbols from object file...
ThinkCore W311/321/341 Linux User’s Manual Tool Chains for Application Development 5-4 Windows Tool Chain The Windows tool chain is a cross development environment that simulates the Linux root file system, allowing users to develop applications in a Windows PC environment. The following figure show...
ThinkCore W311/321/341 Linux User’s Manual Tool Chains for Application Development 5-6 3. Navigate to the directory where the packages of the tool chain reside. By default, it is on the CD-ROM: \\tool-chain\windows . Choose Next to proceed. It may take anywhere from 5 to 20 minutes to check the pack...
ThinkCore W311/321/341 Linux User’s Manual Tool Chains for Application Development 5-7 y Base Category: List all packages that will be installed by default (along with any dependencies). If you view the Base column for the Base category, you should see every package selected for installation. y Pack...
ThinkCore W311/321/341 Linux User’s Manual Tool Chains for Application Development 5-8 6. Checkmark Create icon on Desktop to place a Moxa BASH Shell icon on your desktop, and then click on Finish . 7. Click on OK to complete the installation process.
ThinkCore W311/321/341 Linux User’s Manual Tool Chains for Application Development 5-9 Using the BASH Shell A command-line interface is used to develop applications with the tool chain. To access the command line, you need to launch a BASH shell window. To open a BASH shell window, choose Start Menu...
ThinkCore W311/321/341 Linux User’s Manual Tool Chains for Application Development 5-10 Compilation for Applications Windows tool chain is a cross compiler that can be used to compile Linux source code on a Windows operating system, allowing programmers to develop projects on a Windows-based PC. In ...
ThinkCore W311/321/341 Linux User’s Manual Tool Chains for Application Development 5-12 On-Line Debugging with Insight Insight is a graphical user interface that accompanies GDB , the GNU Debugger was written in Tcl/Tk by people working at Red Hat, Inc., and Cygnus Solutions. Red Hat was generous en...
6 6 Chapter 6 Programmer’s Guide This chapter includes important information for programmers. The following functions are covered in this chapter: Flash Memory Map Device API RTC (Real Time Clock) Buzzer WDT (Watch Dog Timer) UART DO
ThinkCore W311/321/341 Linux User’s Manual Programmer’s Guide 6-2 Flash Memory Map Partition sizes are hard coded into the kernel binary. To change the partition sizes, you will need to rebuild the kernel. The flash memory map is shown in the following table. Address Size Contents 0x00000000 – 0x000...
ThinkCore W311/321/341 Linux User’s Manual Programmer’s Guide 6-3 Buzzer The device node is located at /dev/console . The W311/321/341 support Linux standard buzzer control, with the W311/321/341’s buzzer running at a fixed frequency of 100 Hz. You must include <sys/kd.h> . Function: KDMKTONE ...
ThinkCore W311/321/341 Linux User’s Manual Programmer’s Guide 6-4 int swtd_enable(int fd, unsigned long time) Description Enable application sWatchDog. And you must do ack after this process. Input int fd - the file handle, from the swtd_open() return value. unsigned long time - The time you wish to...
ThinkCore W311/321/341 Linux User’s Manual Programmer’s Guide 6-5 int swtd_ack(int fd) Description Acknowledge sWatchDog. When the user application enable sWatchDog. It need to call this function periodically with user predefined time in the application program. Input int fd - the file handle from s...
ThinkCore W311/321/341 Linux User’s Manual Programmer’s Guide 6-6 } The makefile is shown below: all: arm-linux-gcc –o xxxx xxxx.c –lmoxalib Example 2: #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <string.h> #include <sys/stat.h> #include <sys/...
ThinkCore W311/321/341 Linux User’s Manual Programmer’s Guide 6-7 The makefile is shown below: all: arm-linux-gcc –o xxxx xxxx.c –lmoxalib UART The normal tty device node is located at /dev/ttyM0 … ttyM3 . The W311/321/341 support Linux standard termios control. The Moxa UART Device API allows you t...
ThinkCore W311/321/341 Linux User’s Manual Programmer’s Guide 6-8 if ( (term.c_cflag & (CBAUD|CBAUDEX)) != B4000000 ) { // follow the standard termios baud rate define } else { ioctl(fd, MOXA_GET_SPECIAL_BAUD_RATE, &speed); } Baudrate inaccuracy Divisor = 921600/Target Baud Rate. (Only Integ...
7 7 Chapter 7 Software Lock “Software Lock” is an innovative technology developed by the Moxa engineering team. It can be adopted by a system integrator or developer to protect his applications from being copied. An application is compiled into a binary format bound to the embedded computer and the ...
8 8 Chapter 8 UC Finder UC Finder comes in handy if you forget the IP address of the target computer while you have a demand for troubleshooting field problems. This utility works by sending a broadcast message over the LAN to search for IP addresses of target computers. Two versions of UC Finder ar...
ThinkCore W311/321/341 Linux User’s Manual UC Finder 8-2 Windows UC Finder The UC Finder utility is used to search the LAN or intranet for Moxa embedded computers. Installing the Software 1. Once the Setup program starts running, click on Next to proceed. 2. Click on Next when the Select Additional ...
ThinkCore W311/321/341 Linux User’s Manual UC Finder 8-3 3. Click on Next to install program files in the default directory, or select an alternative location. 4. Click on Finish to complete the installation of UC Finder. Broadcast Search The Broadcast Search function is used to locate all W311/321/...
A A Appendix A System Commands busybox (V0.60.4): Linux normal command utility collection File manager 1. cp copy file 2. ls list file 3. ln make symbolic link file 4. mount mount and check file system 5. rm delete file 6. chmod change file owner & group & user 7. chown change file owner 8. ...
ThinkCore W311/321/341 Linux User’s Manual System Commands A-2 Process 1. kill kill process 2. ps display now running process Other 1. dmesg dump kernel log message 2. sty to set serial port 3. zcat dump .gz file context 4. mknod make device node 5. free display system memory usage 6. date print or ...
B B Appendix B Service Information This appendix shows you how to contact Moxa for information about this and other products, and how to report problems. The following topics are covered in this appendix: MOXA Internet Services Problem Report Form Product Return Procedure
ThinkCore W311/321/341 Linux User’s Manual Service Information B-2 MOXA Internet Services Customer satisfaction is our number one concern, and to ensure that customers receive the full benefit of our products, Moxa Internet Services has been set up to provide technical support, driver updates, produ...
ThinkCore W311/321/341 Linux User’s Manual Service Information B-3 Problem Report Form MOXA ThinkCore W311/321/341 Customer name: Company: Tel: Fax: Email: Date: 1. Moxa Product: ThinkCore W311 ThinkCore W321 ThinkCore W341 2. Serial Number: ___________ ______ Problem Description: Please descr...
ThinkCore W311/321/341 Linux User’s Manual Service Information B-4 Product Return Procedure For product repair, exchange, or refund, the customer must: Provide evidence of original purchase. Obtain a Product Return Agreement (PRA) from the sales representative or dealer. Fill out the Problem R...
Moxa Manuals
-
Moxa 1400
Manual
-
Moxa W311
Manual
-
Moxa DA-682
Manual
-
Moxa CP-114 Series
Manual
-
Moxa RS-485
Manual
-
Moxa CP-104UL
Manual
-
Moxa CP-168U
Manual
-
Moxa A51
Manual
-
Moxa 1600
Manual
-
Moxa 5400
Manual
-
Moxa DE-303
Manual
-
Moxa CP-118U
Manual
-
Moxa 1150I
Manual
-
Moxa C360
Manual
-
Moxa 5400 Series
Manual
-
Moxa 6150
Manual
-
Moxa EM-1240-LX
Manual
-
Moxa 5430I
Manual
-
Moxa 6250
Manual
-
Moxa 1110
Manual