Page 2 - accordance with the terms of that agreement.; Copyright Notice; Copyright; Trademarks; MOXA is a registered trademark of The Moxa Group.; Disclaimer
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...
Page 3 - Table of Contents; Chapter 1
Table of Contents Chapter 1 Introduction ..................................................................................................1-1 Overview.................................................................................................................................. 1-2 Software Archi...
Page 6 - Introduction; The following topics are covered in this chapter:; Overview; Software Package
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...
Page 7 - AP; Hardware; Boot Loader; for emergency use. This; Root File System
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...
Page 8 - Factory Default Image; rc; Journaling; fsck; Additional information about JFFS2 is available at:
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 ...
Page 10 - Getting Started
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...
Page 11 - NOTE; Serial Console; Use the serial console port settings shown below.; Baudrate; Data bits; None; Terminal
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 ...
Page 12 - root; Telnet Console; Default IP Address
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...
Page 13 - ATTENTION; Serial Console Reminder; SSH Console; Windows Users; Click on the link
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...
Page 14 - Linux Users; Select; yes; to complete the connection.; Configuring the Ethernet Interface; Modifying Network Settings with the Serial Console; to change directories.
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 ...
Page 15 - Modifying Network Settings over the Network; Configuring the WLAN
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...
Page 18 - Channel; Setting; Note: Infrastruct couldn’t set channel; Channel Freqence
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...
Page 20 - Using WPA_SUPPLICANT to Support WPA and WPA2; SD Slot and USB for Storage Expansion
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...
Page 21 - . Detailed installation instructions are shown below:
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 ...
Page 22 - Test Program; Set the cross compiler and glibc environment variables.; Setting the path allows you to run the compiler from any directory.; Checking the Flash Memory Space
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: ...
Page 23 - Hello
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...
Page 24 - Makefile; Uploading and Running the “Hello” Program; Developing Your First Application
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 ...
Page 25 - Testing Environment; Write data to PC1
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...
Page 27 - Uploading and Running the “tcps2-release” Program; Use the following commands to upload; bin; command to set the transfer mode to; Binary; command to
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...
Page 28 - The program should start running in the background. Use the; command for job number 1 to terminate this program:
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...
Page 29 - Testing Procedure Summary; Enter; LAN
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...
Page 30 - Managing Embedded Linux
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...
Page 31 - System Version Information; System Image Backup; Upgrading the Firmware; Upgrading the firmware will erase all data on the Flash ROM; If you are using the; ramdisk; to store code for your applications, beware that updating the
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...
Page 32 - available in each block.
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 ...
Page 33 - upfirm; command to upgrade the kernel and root file system:
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...
Page 34 - Loading Factory Defaults; Next, use the file system backup utility provided by Moxa:
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...
Page 35 - Deploying the User Directory to Additional W311/321/341 Units; Backing Up the User File System; Enabling and Disabling Daemons
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...
Page 36 - Type the command “ps –ef” to list all processes currently running.; put it to run in the background.
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...
Page 37 - Setting the Run-Level
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...
Page 38 - Adjusting the System Time; Setting the Time Manually
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# ...
Page 39 - NTP Client; time request to a remote NTP server. Use; to update the system time.; Updating the Time Automatically; Example shell script to update the system time periodically
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:~...
Page 40 - How to run the shell script automatically when the kernel boots up; Cron—Daemon to Execute Scheduled Commands; STEP5: Enable cron when the system boots up.
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 ...
Page 41 - Managing Communications; NAT Example
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 ...
Page 42 - Enabling the Telnet/ftp server; DNS; The Apache web server’s main configuration file is
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...
Page 43 - in the address box.
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...
Page 44 - Installing PHP for Apache Web Server
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...
Page 46 - Step 5: Run ‘install.sh’ and select to install php
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...
Page 47 - IPTABLES
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...
Page 49 - to insert and enable the module.; Observe and; and; Append or delete rules; Observe and erase chain rules
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 ...
Page 50 - Define policy for chain rules
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...
Page 51 - NOTE: In Example 8, remember to issue the command; NAT; NAT Area / Private IP
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...
Page 52 - Enabling NAT at Bootup
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...
Page 53 - username
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...
Page 54 - Example 2: Connecting to a PPP server over a hard-wired link; noipdefault; How to check the connection; ifconfig
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...
Page 55 - Setting up a Machine for Incoming PPP Connections; PPPoE; “password”
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...
Page 57 - pppd eth0
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 ...
Page 58 - Example; Mail; SNMP
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...
Page 67 - OpenVPN; Routed IP Tunnels
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 ...
Page 71 - Setup 2: Ethernet Bridging for Private Networks on the Same Subnet
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...
Page 72 - Set up four machines as shown in the following diagram:; Create a configuration file named
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...
Page 73 - Note that
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...
Page 74 - Tool Chains for Application; The following functions are covered in this chapter:; Linux Tool Chain
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 ...
Page 75 - Tool Chains for Application Development; Steps for Installing the Linux Tool Chain; gcc
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...
Page 76 - On-Line Debugging with GDB; cont
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...
Page 77 - Windows Tool Chain; System Requirements for Windows Tool Chain; Your Windows OS must satisfy the following requirements.; Steps for Installing Windows Tool Chain
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...
Page 79 - All packages are selected by default. Choose; Next
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...
Page 80 - View by
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...
Page 81 - Create icon on Desktop
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.
Page 82 - Using the BASH Shell; To open a BASH shell window, choose
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...
Page 83 - Compilation for Applications
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 ...
Page 85 - On-Line Debugging with Insight; Insight
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...
Page 86 - Programmer’s Guide; This chapter includes important information for programmers.; Flash Memory Map
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
Page 87 - Address Size; Device API; ioctl
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...
Page 88 - Buzzer
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 ...
Page 89 - OK will be zero. The other has some error, to get error code from errno.
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...
Page 90 - Close the file handle.
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...
Page 91 - The makefile is shown below:
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/...
Page 92 - UART; The normal tty device node is located at; Description; Example to set the baudrate
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...
Page 93 - Baudrate inaccuracy; DO; The Do will be open
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...
Page 94 - Software Lock; Develop and compile your program in the development PC.; #binencryptor yourProgram ABigKey
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 ...
Page 95 - UC Finder; Windows UC Finder; Installing the Software; Linux ucfinder
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...
Page 96 - The; Once the Setup program starts running, click on; Click on; when the; Select Additional Tools; window opens to proceed with the
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 ...
Page 97 - Finish; to complete the installation of UC Finder.; Broadcast Search; same LAN as your Windows computer.
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/...
Page 99 - System Commands; File manager
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. ...
Page 100 - Process
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 ...
Page 101 - Service Information; The following topics are covered in this appendix:; MOXA Internet Services
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
Page 102 - The following services are provided
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...
Page 103 - Problem Report Form
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...
Page 104 - Product Return Procedure; Provide evidence of original purchase.
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...