ThinkCore IA241/240 Linux User’s Manual First Edition, July 2006 www.moxa.com/product MOXA Systems Co., Ltd. Tel: +886-2-8919-1230 Fax: +886-2-8919
22 Chapter 2 Getting Started In this chapter, we explain how to connect the IA241/240, how to turn on the power, how to get started programming, a
ThinkCore IA241/240 Linux User’s Manual UC Finder 8-2Windows UC Finder The UC Finder utility is used to search the LAN or intranet for Moxa embedded
ThinkCore IA241/240 Linux User’s Manual UC Finder 8-33. Click on Next to install program files in the default directory, or select an alternative l
ThinkCore IA241/240 Linux User’s Manual UC Finder 8-4Broadcast Search The Broadcast Search function is used to locate all IA241/240 units that are c
ThinkCore IA241/240 Linux User’s Manual UC Finder 8-53. When the search is complete, the same information is displayed in the UC Finder window. N
AA 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 ma
ThinkCore IA241/240 Linux User’s Manual System Commands A-2Process 1. kill kill process 2. ps display now running process Other 1. dmesg dump k
BB Appendix B Service Information This appendix shows you how to contact Moxa for information about this and other products, and how to report pro
ThinkCore IA241/240 Linux User’s Manual Service Information B-2MOXA Internet Services Customer satisfaction is our number one concern, and to ensure
ThinkCore IA241/240 Linux User’s Manual Service Information B-3Problem Report Form MOXA ThinkCore IA241/240 Customer name: Company: Tel: Fax: Emai
ThinkCore IA241/240 Linux User’s Manual Service Information B-4Product Return Procedure For product repair, exchange, or refund, the customer must:
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-2Powering on the IA241/240 Connect the SG wire to the shielded contact located in the uppe
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-3Once the connection is established, the following window will open. To log in, type the
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-4 You can proceed with configuring the network settings of the target computer when you re
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-5 Linux Users From a Linux machine, use the “ssh” command to access the IA241/240’s conso
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-6Configuring the Ethernet Interface The network settings of the IA241/240 can be modified
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-7Default Setting for LAN1 Dynamic Setting using DHCP iface eth0 inet static address 192.
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-8 3. Additional WLAN parameters are contained in the file RT2500STA.dat. To open the file,
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-9CountryRegion—Sets the channels for your particular country / region Setting Explanation
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-10EncrypType—Sets encryption type Setting NONE WEP TKIP AES DefaultKeyID—Sets default key
ThinkCore IA241/240 Linux User’s Manual The software described in this manual is furnished under a license agreement and may be used only in accordan
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-11TxRate—Sets the TxRate Setting Explanation 0 Auto 1 1 Mbps 2 2 Mbps 3 5.5 Mbps 4 11 Mbp
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-12Test Program—Developing Hello.c In this section, we use the standard “Hello” programming
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-13Checking the Flash Memory Space If the flash memory is full, you will not be able to sav
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-14the GDB debug tool). NOTE Since Moxa’s tool chain places a specially designed Makefile
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-15 Testing Environment The tcps2 example demonstrates a simple application program that de
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-16 root@server11:/home/ia240241/1st_application [root@server11 1st_application]# pwd /h
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-17530 Please login with USER and PASS. KERBEROS_V4 rejected as an authentication type Name
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-18root@Moxa:~# NOTE Use the kill command for job number 1 to terminate this program: #
ThinkCore IA241/240 Linux User’s Manual Getting Started 2-19 The testing environment is illustrated in the following figure. However, note that the
33 Chapter 3 Managing Embedded Linux This chapter includes information about version control, deployment, updates, and peripherals. The informatio
Table of Contents Chapter 1 Introduction...1-1 Overvi
ThinkCore IA241/240 Linux User’s Manual Managing Embedded Linux 3-2System Version Information To determine the hardware capability of your IA241/240
ThinkCore IA241/240 Linux User’s Manual Managing Embedded Linux 3-3/dev/mtdblock3 6.0M 488.0k 5.5M 8% /tmp /dev/mtdblock3 6.0M 488.0k
ThinkCore IA241/240 Linux User’s Manual Managing Embedded Linux 3-43. Next, use the upfirm command to upgrade the kernel and root file system: #up
ThinkCore IA241/240 Linux User’s Manual Managing Embedded Linux 3-5Deploying the User Directory to Additional IA241/240 Units For some applications,
ThinkCore IA241/240 Linux User’s Manual Managing Embedded Linux 3-6Type the command “ps –ef” to list all processes currently running. 192.168.3.1
ThinkCore IA241/240 Linux User’s Manual Managing Embedded Linux 3-7 25 root SW [pdflush] 27 root SW< [aio/0] 26 ro
ThinkCore IA241/240 Linux User’s Manual Managing Embedded Linux 3-8KxxRUNFILE stands for K: start the run file while linux shuts down or halts. xx:
ThinkCore IA241/240 Linux User’s Manual Managing Embedded Linux 3-9Visit http://www.ntp.org for more information about NTP and NTP server addresses.
ThinkCore IA241/240 Linux User’s Manual Managing Embedded Linux 3-10mm h dom mon dow user command min hour date month week user command 0-59 0-23
44 Chapter 4 Managing Communications In this chapter, we explain how to configure the IA241/240’s various communication functions. The following t
IPTABLES... 4-6 NAT...
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-2Telnet / FTP In addition to supporting Telnet client/server and FTP client/server,
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-3/home/httpd/cgi-bin/ Before you modify the homepage, use a browser (such as Micros
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-4To open the default CGI test script report page, type http://192.168.3.127/cgi-bin
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-5Step 2: Type ‘upramdisk’ to get the free space ram disk to save the package. 19
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-6Step 5: Run ‘install.sh’ and select to install php 192.168.3.127 – PuTTY root@M
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-7Each chain is a list of rules that apply to a certain type of packet. Each rule sp
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-8 The IA241/240 supports the following sub-modules. Be sure to use the module that
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-9NOTE The IA241/240 does NOT support IPV6 and ipchains. The basic syntax to enabl
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-10Define policy for chain rules Usage: # iptables [-t tables] [-P] [INPUT, OUTPUT,
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-11# iptables –A INPUT –i eth0 –p tcp --dport 25 –j LOG Example 8: Drop all packets
Problem Report Form ...B-3 Product Return
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-12Enabling NAT at Bootup In most real world situations, you will want to use a simp
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-13#pppd connect ‘chat -v “ “ ATDT5551212 CONNECT” “ ogin: username word: password’
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-14Example 2: Connecting to a PPP server over a hard-wired link If a username and pa
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-15ppp0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 129.67.1.165 0.0.0
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-16 “[email protected]” is the username obtained from the ISP to log in to the ISP
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-176. Add one of two files: /etc/ppp/options.eth0 or /etc/ppp/options.eth1. The cho
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-18NOTE Click on the following links for more information about NFS: http://www.tld
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-193: sysUpTime.0 (timeticks) 0 days 03h:50m:11s.00th (1381100) 4: sysContact.0 (oct
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-2070: ifInUcastPkts.2 (counter) 28224 71: ifInUcastPkts.3 (counter) 0 72: ifInUcast
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-21137: ifSpecific.3 (object identifier) (null-oid) zeroDotZero 138: ifSpecific.4 (o
11 Chapter 1 Introduction The MOXA ThinkCore IA241 and IA240 are RISC-based ready-to-run embedded computers. Available features include four RS-23
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-22204: ipNetToMediaPhysAddress.1.192.168.27.139 (octet string) 00.90.E8.10.02.41 (h
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-23271: tcpConnLocalAddress.192.168.27.139.1025.0.0.0.0.0 (ipaddress) 192.168.27.139
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-24338: tcpConnRemPort.192.168.4.127.9.0.0.0.0.0 (integer) 0 339: tcpConnRemPort.192
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-25405: rs232PortOutSigNumber.2 (integer) 2 406: rs232PortOutSigNumber.3 (integer) 2
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-26472: rs232OutSigPortIndex.1.4 (integer) 1 [1] 473: rs232OutSigPortIndex.2.4 (inte
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-27# mknod /dev/net/tun c 10 200 An Ethernet bridge is used to connect different Eth
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-28 while read f1 f2 f3 f4 r3 do if [ “$f1” = “iface” -a “$f2” = “$iface” -a “$f3
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-29 # the bridge receives data from any port and forwards it to other ports. i=`
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-30 exit 1 esac exit 0 #---------------------------------- end --------------------
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-315. On each OpenVPN machine, check the routing table by typing the command: # rou
ThinkCore IA241/240 Linux User’s Manual Introduction 1-2Overview The ThinkCore IA241/IA240 embedded computers, which are designed for industrial aut
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-322. The configuration procedure is almost the same as for the previous example. T
ThinkCore IA241/240 Linux User’s Manual Managing Communication 4-33# value after “-net” is the subnet behind the remote peer route add -net 192.168.
55 Chapter 5 Development Tool Chains This chapter describes how to install a tool chain in the host computer that you use to develop your applicat
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-2Linux Tool Chain The Linux tool chain contains a suite of cross compilers and oth
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-3size Lists object file section sizes strings Prints strings of printable charac
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-4-rw-r--r-- 1 stephen_ mkpasswd 3262 Jan 10 22:03 insight.ico drwxr—xr-x 5 step
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-52. Browse to the directory where you prefer to set the root directory for the to
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-64. All packages are selected by default. Choose Next to continue. y Category co
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-75. The Progress window opens. The installer will install all packages that were
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-87. Click on OK to complete the installation process. Using the BASH Shell A com
ThinkCore IA241/240 Linux User’s Manual Introduction 1-3APAPIProtocolStackDeviceDriverMicrokernelUser ApplicationDaemon (Apache, Telnet, FTPD, SNMP)
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-9 / Mkpasswd –l [-d] > /etc/passwd Mkgroup –l [-d] > /etc/group Note that
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-10After that, use FTP to upload the executable file to the UC, and then run the ex
ThinkCore IA241/240 Linux User’s Manual Development Tool Chains 5-11
66 Chapter 6 Programmer’s Guide This chapter includes important information for programmers. The following functions are covered in this chapter:
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-2Flash Memory Map Partition sizes are hard coded into the kernel binary. To change the
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-3ioctl(fd, KDMKTONE, unsigned int arg); Description: The buzzer’s behavior is determine
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-4Output OK will be zero. The other has some error, to get the error code from errno().
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-5Output OK will be zero. The other has some error, to get error code from errno(). 4.
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-6 time.tv_sec = msec / 1000; time.tv_usec = (msec % 1000) * 1000; select(1, NULL,
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-71. Function: MOXA_SET_OP_MODE int ioctl(fd, MOXA_SET_OP_MODE, &mode) Description
ThinkCore IA241/240 Linux User’s Manual Introduction 1-4inside the file system design, and support for hard links. The key features of JFFS2 are: y
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-8Special Note 1. If the target baudrate is not a special baudrate (e.g. 50, 75, 110, 1
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-9to except the error signal. If you set to zero, it will not detect the duration time.
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-10Example Example 1 File Name: tdio.c Description: The program indicates to connect DO1
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-11 } printf(“\n”); } else if ( i == 3 ) { // set low to high event printf
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-12Example 2 File Name: tduration.c Description: The program indicates to connect DO1 to
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-13 printf(“1.Test for Din duration!=0.\n”); printf(“9.Quit.\n” ); printf(“Please
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-14 } } } while(1); pthread_exit(NULL); } void init_sigaction(void) { str
ThinkCore IA241/240 Linux User’s Manual Programmer’s Guide 6-15 clean: rm -f $(OBJS) hello core *.gdb
77 Chapter 7 Software Lock “Software Lock” is an innovative technology developed by the Moxa engineering force. It can be adopted by a system inte
88 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 fi
Comments to this Manuals