Moxa TechnologiesメーカーW321の使用説明書/サービス説明書
ページ先へ移動 of 104
ThinkCore W31 1/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.
ThinkCore W311/321/341 Linux User’s Manual The software d escribed in thi s manual i s furnished u nder a license agreem ent and m ay be used only in accordance with the term s of that agreement. Copyright Notice Copyright © 2007 Mo xa Systems Co., Ltd.
Table of Contents Chapter 1 Introduction .................................................................................................. 1-1 Overview...................................................................................................
Chapter 4 Managing Communications ........................................................................ 4-1 T elnet / FTP ................................................................................................................... ..........
Appendix A System Commands ..................................................................................... A-1 busybox (V0.60.4): Linux norm al command utility collection ............................................... A-1 File manager .........
1 1 Chapter 1 Introduction The MOXA T hinkCore W31 1/321/341 are R ISC-based ready-t o-run wir eless embedde d computers with 802.1 1a/b/g WLAN, one 10/1 00 Mbps Et her net port , an inte rnal SD socket, 1/2/ 4 RS-232/422/ 485 serial ports, two USB 2.
ThinkCore W311/321/341 Linux User’s Manual Introduction 1-2 Overview The ThinkC ore W311/32 1/341 wirel ess embedded c omputers su pport 802. 11a/b/g wirel ess LANs with data enc ryption f unctions, i ncluding the common WEP and po werful WP A and WP A2, to establish a secure transmission tunnel over a WLAN.
ThinkCore W311/321/341 Linux User’s Manual Introduction 1-3 Factory Defaul t Im age file. The use r directory sa ves the user’s settings and application. To improve system reliability, the W311/321/341 have a bu ilt-in mechanism that prevents the system from crashing.
ThinkCore W311/321/341 Linux User’s Manual Introduction 1-4 Software Package Boot Loader Moxa Boot Loader (v1.2 ) Kernel Linux 2.6.9 Protocol S tack ARP, PPP, CHAP, PAP, IPv4, ICMP, TCP, UDP, DHCP, FTP, SNMP V1/V3, HTTP, NTP, NFS, SMTP, SSH 1.
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 progra mming , and how to use the W311 /321/341’s other fun ctions.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-2 Powering on the W311/321/341 Connect the SG wire to th e shielded contact located in the upp er lef t corner of the W311/321/341, and then power on the computer by con n ecting it to the power adaptor.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-3 The following window will open when a conn ection has been established. To log in, t ype the Logi n name and password as re quested.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-4 You can proceed with configuring the network settin gs of the target compute r when you reach the bash command sh ell. Configuratio n instru ctions are gi ven in the next section. ATTENTION Serial Console Reminder Remember to choose VT100 as the terminal type.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-5 Linux Users From a Linux machine, use t he “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.
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 th e Ethernet ports of the W341 for static or dynamic (DHCP) IP addresses.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-7 /etc/wireless.conf Format: DEVICE=eth1 MODE=managed ESSID=any KEY=any /etc/wireless.conf Item list: DEVICE Æ indicates your wi reless .
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-8 Default Setting for WIRLESS LAN Dynamic Setting using DHCP iface eth1 inet static address 192.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-9 Channel —Sets the channel Using iwconfig eth1 chan n el Setting Note: Infrastruct couldn’t set channel Freq —Sets the channel frequence Using iwconfi g eth1 freq Setting(G ,M,K) Note: Infrastruct coul dn’t set freq 802.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-10 140 5700 (K) 184 4920 (K) 188 4940 (K) 192 4960( K) 196 4980 (K) 8 5040 (K) 12 5060 (K) 16 5080 (K) 34 5170 (K) 38 5190 (K) 42 5210 (K.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-11 Using WPA_SUPPLICANT to Support WPA and WPA2 This embedde d computer s upports the WPA and WP A2 functions using the /bi n/wpa_suppl icant program. We wrote a shell s cript to hel p you use t his function: Step 1: Edit the ssid and psk variables in the file etc/wpa_supplicant.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-12 W341 The SD slot is located on the front panel of th e W341. To install an SD card, you must fi rst re move the SD slot’s protective cover t o access the slot, and then plug the SD card direct ly into the slot.
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 illu strate h ow to develop a program for the W311/3 21/341. In general, pr ogram developm ent involv es the followi ng seven steps.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-14 If there isn’t enough “Available” space for you r application, you will need to delete some existing files.
d e t r a t S g n i t 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 c hain places a specially designed Makefil e in the directory /tmp/example/hello , be s ure to type the #make command from wi thin that directory.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-16 T esting Environment The tcps2 exam ple demonstrates a simple app lication program that delivers transparent, bi-directional data transm ission between t he W311/321/ 341’s serial and Ethernet ports.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-17 Compiling tcps2.c The source code for the tcps2 exam ple is located on the CD -ROM at CD-ROM://example/TCPServer2/tcps 2.c . Use the following commands to copy the file to a specific directory on your PC.
d e t r a t S g n i t 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 comm ands to upload tcps2-release to the W311/321/341 through an FTP connection.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-19 4. The program should start running in the back ground. Use the #ps –ef command to check if the tcps2 program is actually runn ing in the background. #ps // use this command to check if the program is running 192.
ThinkCore W311/321/341 Linux User’s Manual Getting Started 2-20 NOTE Use the kill -9 command for PID 728 to terminate this p rogram: #kill -9 %728 Testing Procedure Summary 1. Compile tcps2.c (#make ) . 2. Upload and run tcps2-release i n the backgr ound (#.
3 3 Chapter 3 Managing Embedded Linux This chapte r includes inf ormati on about vers ion contr ol, deploym ent, upda tes, and peri pherals. The information in this chapter will be particu larly useful when you need to run the same application on several W311/321/341 u nits.
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 wh at kind of software functions are supported , check the version numbers of your W311/321/34 1’s hardware, kernel, and user file system.
ThinkCore W311/321/341 Linux User’s Manual Managing Embedded Linux 3-3 Since different Flash dis ks ha ve different sizes, it is a good idea to chec k the size of your Flash disk before upgrading the firmware, o r b efore using the disk to store your applicatio n and data files.
ThinkCore W311/321/341 Linux User’s Manual Mana ging Embedded Linux 3-4 2. Type the following commands to use the W31 1/321/341’s built-in FTP client to transfer the firmware file (W341 -x.
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 Default s To load the the factory default settings, you must press the reset-to-default button for more than 5 seconds.
ThinkCore W311/321/341 Linux User’s Manual Mana ging Embedded Linux 3-6 Deploying the User Directory to Additional W31 1/321/341 Unit s For some applications, you m ay need to ghost one W311/321/ 341 user file system t o other W311/321/341 units.
ThinkCore W311/321/341 Linux User’s Manual Mana ging Embedded Linux 3-7 Type the command “ps –ef” to list all processes c urrently running. 192.
ThinkCore W311/321/341 Linux User’s Manual Mana ging Embedded Linux 3-8 The enabled daemons will be available after you reboot the system. 192.168.3.
ThinkCore W311/321/341 Linux User’s Manual Mana ging 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.
ThinkCore W311/321/341 Linux User’s Manual Mana ging Embedded Linux 3-10 The following figure illustrates how to update thesystem time and set the RTC tim e. 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.
ThinkCore W311/321/341 Linux User’s Manual Mana ging Embedded Linux 3-11 How to run the shell script automa tically 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 m ode.
4 4 Chapter 4 Managing Communications In this chapt er, we ex plain how to configure t he W311/321/ 341’s vari ous comm unication functions. The following topics are covered in this chapter: Tel.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-2 Telnet / FTP In addition to suppo rting Telnet client/server and FTP client/server, the W311/321/341 also support SS H and sftp cli ent/server. To enable or di sable the Telnet/ftp server, you first need to edit the file /etc/inetd.
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 Intern et Explorer or Mozilla Firefox) from your PC to test if the Apach e Web Server is working.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-4 To open the de fault CGI te st script re port page, ty pe http://192.168.3.127 /cg i-bin/test-cgi in your browser’s address box. NOTE The CGI f unction is e nabled b y default.
ThinkCore W311/321/341 Linux User’s Manual Mana ging Communications 4-5 Step 2: Type ‘upramdisk’ to get the free space ram disk to save t he package. 192.168.3.127 – PuTTY root@Moxa:/bin# upramdisk root@Moxa:/bin# df -h Filesystem Size Used Available Use% Mounted on /dev/mtdblock2 8.
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.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-7 IPTABLES IPTABLES is an administrative tool for setting up , maintai ning, and inspecting th e Linux kernel’s IP packet filter rule tables. Seve ral different tables are defined, with each table containing bu ilt-in chains and user-defi ned chains.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-8 The W311/321/341 support th e follo wing sub-modules. Be sure to use the m odule that matches your application.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-9 NOTE The W311/321/341 do NOT suppo rt IPV6 and ipchain s. The basic syntax t o enable an d load an IPT ABLES module is as follows: #lsmod #insmod ip_tables #insmod iptable_filter Use lsmod to check if t he ip_tables m odule has al ready been loade d in the W31 1/321/341 uni t.
ThinkCore W311/321/341 Linux User’s Manual Mana ging 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.
ThinkCore W311/321/341 Linux User’s Manual Mana ging 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, rem ember to issue the command #insmod ipt_mac first to load module ipt_mac .
ThinkCore W311/321/341 Linux User’s Manual Mana ging Communications 4-12 Enabling NA T at Bootup In most real world situatio ns, you will want to use a simple shell scri pt to enable NAT when the W341 boots up. The followin g script is an example. #!/bin/bash # If you put this shell script in the /home/nat.
ThinkCore W311/321/341 Linux User’s Manual Mana ging 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 pr ompt for the usernam e and password, the command sh ould be entered as follows.
ThinkCore W311/321/341 Linux User’s Manual Mana ging Communications 4-14 Example 2: Connecting to a PPP server over a hard-w ired link If a username and password are not re quired, use the following.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-15 This should show three routes, so mething 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.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-16 4. Edit the file /etc/ppp/pap-secrets and ad d the foll owing: “username@hinet. net” * “passwor d” * “username@hinet.net” is t he username obtai ned from the ISP to log in to the ISP account.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-17 6. Add one of tw o fil e s: /etc/ppp/options.eth0 or /etc/ppp/options.eth1 . The choice depends on which LAN is connected to t he ADSL modem . If you use LAN1 to connect to th e ADSL modem , then add /etc/ppp/options.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-18 NOTE Click on the following links for more info rmation about NFS: http://www.tldp.org/HOWTO/NFS-HOWTO/index.html http://nfs.sourceforg e.net/nfs-howto/client.html http://nfs.sourceforge.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-19 3: sysUpTime.0 (timeticks) 0 days 03h:50m:11s.00th (1381100) 4: sysContact.0 (octet string) Moxa Systems Co., LDT. 5: sysName.0 (octet string) Moxa 6: sysLocation.0 (octet string) Unknown 7: sysServices.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-20 70: ifInUcastPkts.2 (counter) 28224 71: ifInUcastPkts.3 (counter) 0 72: ifInUcastPkts.4 (counter) 0 73: ifInUcastPkts.5 (counter) 0 74: ifInUcastPkts.6 (counter) 0 75: ifInNUcastPkts.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-21 137: ifSpecific.3 (object identifier) (null-oid) zeroDotZero 138: ifSpecific.4 (object identifier) (null-oid) zeroDotZero 139: ifSpecific.5 (object identifier) (null-oid) zeroDotZero 140: ifSpecific.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-22 204: ipNetToMediaPhysAddress.1.192. 168. 27.139 (octet string) 00.90.E8.10. 02.41 (hex) 205: ipNetToMediaPhysAddress.2.192. 168. 4.127 (octet string) 00.90.E8.10. 02.40 (hex) 206: ipNetToMediaNetAddress.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-23 271: tcpConnLocalAddress.192.168. 27.139.1025.0.0. 0.0.0 (i paddr ess) 192.168.27.139 272: tcpConnLocalAddress.192.168. 4.127.1025.0.0. 0.0.0 (ipaddr ess) 192.168.4.127 273: tcpConnLocalAddress.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-24 338: tcpConnRemPort. 192.168.4.127. 9. 0.0.0.0.0 (integer) 0 339: tcpConnRemPort. 192.168.27.139. 111. 0.0.0.0.0 (int eger) 0 340: tcpConnRemPort. 192.168.4.127. 111. 0.0.0.0.0 (integer) 0 341: tcpConnRemPort.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-25 405: rs232PortOutSigNum ber .2 (integer) 2 406: rs232PortOutSigNum ber .3 (integer) 2 407: rs232PortOutSigNum ber .4 (integer) 2 408: rs232PortInSpeed.1 (integer) 38400 409: rs232PortInSpeed.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-26 472: rs232OutSigPortIndex.1. 4 (integer) 1 [1] 473: rs232OutSigPortIndex.2. 4 (integer) 2 [2] 474: rs232OutSigPortIndex.3. 4 (integer) 3 [3] 475: rs232OutSigPortIndex.4. 4 (integer) 4 [4] 476: rs232OutSigNam e.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-27 OpenVPN OpenVPN provides two types of tunn els for users to implement VPNS: Routed IP Tu nnels and Bridged Ethernet Tunnels . T o begin wit h, check to make s ure that the sy stem has a virtual device /dev/net/tun .
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-28 NETMASK= BROADCAST= # it is not a great idea but this system doesn’t support # /etc/sysconfig/network-scripts/ifcfg-eth1 ifc.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-29 mname=tun module_up mname=bridge module_up # create an ethernet bridge to connect tap devices, internal interface brctl addbr br0 brctl addif br0 $iface # the bridge receives data from any port and forwards it to other ports.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-30 ;; restart) stop start ;; *) echo “Usage: $0 [start|stop|restart]” exit 1 esac exit 0 #---------------------------------- end ----------------------------- Create link sy mbols to ena ble this scri pt at boot t ime: # ln -s /etc/openvpn/openvpn-bridge /etc/rc.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-31 5. On each OpenVPN m achine, 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.
ThinkCore W311/321/341 Linux User’s Manual Managing Communications 4-32 2. The config uration proced ure is almost t he sa me as for the previous exam ple. The only difference is that you will need to comment out the parameter “up” in “/etc/openvpn/A- tap 0-br.
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.
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 debugg ing are also introduce d.
ThinkCore W311/321/341 Linux User’s Manua l Tool Chains for Application Development 5-2 Linux Tool Chain The Linux tool chain contains a su ite of cross compilers and other tools, as well as t he libraries and header files that are nece ss ary to compile your application s .
ThinkCore W311/321/341 Linux User’s Manua l Tool Chains for Application Development 5-3 The following cross compiler tools are provided: ar Manages archives (static libraries) as Assembler c++, g++ .
ThinkCore W311/321/341 Linux User’s Manua l Tool Chains for Application Development 5-4 Windows Tool Chain The Windows tool chain is a cross devel opment enviro nment that sim ulates the Linu x root fil e system, allowing users to develop app lications in a Windows PC environment.
ThinkCore W311/321/341 Linux User’s Manua l Tool Chains for Application Development 5-5 1. Double click on the tool chain file to start the installtion process, and choose Next . 2. Browse to the directory where yo u pr efer to set the root directory for th e to ol chain.
ThinkCore W311/321/341 Linux User’s Manua l Tool Chains for Application Development 5-6 3. Navigate t o the direct ory where the packages of t he tool chai n reside. By de fault, it is on the CD-ROM: tool-chainwindows . Choose Next to proceed. It may t ake anywhere from 5 to 20 m inutes to c heck the packages in the CD-R OM.
ThinkCore W311/321/341 Linux User’s Manua l 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 t he Base column for t he Base cate gory, you sh ould see eve ry package selected for installation.
ThinkCore W311/321/341 Linux User’s Manua l Tool Chains for Application Development 5-8 6. Checkmark Create icon o n Desktop t o 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 Manua l Tool Chains for Application Development 5-9 Using the BASH Shell A command-line interface is used to develop app lications with the tool chain. To access the command line, you need t o launch a B ASH shell wi ndow.
ThinkCore W311/321/341 Linux User’s Manua l Tool Chains for Application Development 5-10 Compilation for Applications Windows tool chain is a cross com piler that can be used to compil e Linux so urce c ode on a Windows operat ing system, al lowing progra mmers to deve lop projects on a Windows-ba sed PC.
ThinkCore W311/321/341 Linux User’s Manua l Tool Chains for Application Development 5-11 Next, enter the hello directory and invo ke the make program that will execute the compilation instructions written in the Makefile to co mpile the hello project.
ThinkCore W311/321/341 Linux User’s Manua l Tool Chains for Application Development 5-12 On-Line Debugging with Insight Insight is a graphical user inte rface that accompanies GDB , the GNU Debugger was writ ten in Tcl/Tk by pe ople worki ng at Red Hat, Inc.
6 6 Chapter 6 Programmer’s Guide This chapter includes importan t information for programmers. The following functions are covered in this chapter: Flash Memory Map Device API RTC (Real .
ThinkCore W311/321/341 Linux User’s Manual Programmer’s Guide 6-2 Flash Memory Map Partition sizes are hard coded into th e kernel bina ry. To change the partition sizes, you will need to rebuild the kernel. The flash memory map is shown in the following table.
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 Linu x standard buzzer control, with the W311/321/3 41’s buzzer running at a fixe d frequency of 100 Hz.
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, fro m the swtd_op en() return valu e.
ThinkCore W311/321/341 Linux User’s Manual Programmer’s Guide 6-5 int swtd_ack(int fd) Description Acknowledge sWatchDog. When the user applica tion enable sWatchDog. It need to call this function periodically with user pr ed efined time in the application program.
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.
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 de vice node is located at /dev/ttyM0 … ttyM3 . The W311/321/341 suppo rt Linux standard termios contro l.
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/Targ et Baud Rate.
7 7 Chapter 7 Software Lock “Software Lock” is an innovative technology develop ed by the Moxa engineering team. It can be adopted by a system integrator or developer t o protect his applications fr om being co pied.
8 8 Chapter 8 UC Finder UC Finder c omes in han dy if you for get the IP addre ss of the target c omputer whi le you have a demand for troublesho o ting field problems. This utility works by sending a broadcast message over the LAN to search for IP addresses of targ et computers .
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 Sof tware 1. Once the Setup program starts running, click on Next to proceed.
ThinkCore W311/321/341 Linux User’s Manual UC Finder 8-3 3. Click on Next to install program files in the default dir ectory, or select an alternative location.
ThinkCore W311/321/341 Linux User’s Manual UC Finder 8-4 1. Click o n the Broadcast Sear ch button to start searching. 2. The Searching window displays the Model , MA C Ad dress , and IP Address of devices that were located.. 3. When the search is complete, the same information is displayed in the UC Finder window.
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.
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 f ile context 4. mknod make device node 5.
B B Appendix B Service Information This appen dix shows y ou how to co ntact Moxa for inform ation about t his and othe r product s, and how to repo rt problems.
ThinkCore W311/321/341 Linux User’s Manual Service Information B-2 MOXA Internet Services Customer satisfaction is our num b er one concern, and to ensure that customers receive the full benefit of .
ThinkCore W311/321/341 Linux User’s Manual Service Information B-3 Problem Report Form MOXA ThinkCore W31 1/321/341 Customer name: Comp any: T el: Fax: Email: Date: 1.
ThinkCore W311/321/341 Linux User’s Manual Service Information B-4 Product Return Procedure For product repair, exc hange, or re fund, the customer m ust: Provide e vidence of origi nal purchase. Obtain a Product Return Agreement (PRA) from the sales representative or dealer.
デバイスMoxa Technologies W321の購入後に(又は購入する前であっても)重要なポイントは、説明書をよく読むことです。その単純な理由はいくつかあります:
Moxa Technologies W321をまだ購入していないなら、この製品の基本情報を理解する良い機会です。まずは上にある説明書の最初のページをご覧ください。そこにはMoxa Technologies W321の技術情報の概要が記載されているはずです。デバイスがあなたのニーズを満たすかどうかは、ここで確認しましょう。Moxa Technologies W321の取扱説明書の次のページをよく読むことにより、製品の全機能やその取り扱いに関する情報を知ることができます。Moxa Technologies W321で得られた情報は、きっとあなたの購入の決断を手助けしてくれることでしょう。
Moxa Technologies W321を既にお持ちだが、まだ読んでいない場合は、上記の理由によりそれを行うべきです。そうすることにより機能を適切に使用しているか、又はMoxa Technologies W321の不適切な取り扱いによりその寿命を短くする危険を犯していないかどうかを知ることができます。
ですが、ユーザガイドが果たす重要な役割の一つは、Moxa Technologies W321に関する問題の解決を支援することです。そこにはほとんどの場合、トラブルシューティング、すなわちMoxa Technologies W321デバイスで最もよく起こりうる故障・不良とそれらの対処法についてのアドバイスを見つけることができるはずです。たとえ問題を解決できなかった場合でも、説明書にはカスタマー・サービスセンター又は最寄りのサービスセンターへの問い合わせ先等、次の対処法についての指示があるはずです。