Home
UC-7420/7410 User`s Manual
Contents
1. A Test Page This page is used to test the proper operation of the Apache Web server after it has been installed If you can read this page it means that the Apache Web server installed at this site is working properly If you are the administrator of this website You may now add content to this directory and replace this page Note that until you do so people visiting your website will see this page and not your content If you are a member of the general public The fact that you are seeing this page indicates that the website you just visited is either experiencing problems or is undergoing routine maintenance If you would like to let the administrator of this website know that you ve seen this page instead of the page you expected you should send them e mail In general mail sent to the name webmaster and directed to the website s domain should reach the appropriate person For example if you experienced problems while visiting www gnomovision com you should send e mail to webmaster gnomovision com The Apache document has been included with this distribution For documentation and information on MontaVista Linux please visit the Monta Vista Software Inc website You are free to use the image below on an Apache powered Web server Thanks for using Apache NePowered by 1 m Done To open the default CGI page type http 192 168 3 127 cgi bin printenv in your browser s ad
2. terminated because it was idle holdoff lt n gt Wait for up n milliseconds after the connect script finishes for a valid PPP packet from the peer At the end of this time or when a valid PPP packet is received from the peer pppd will commence negotiation by sending its first LCP packet The default value is 1000 1 second This wait period only applies if the connect or pty option is used plug n pppoe so lt End of File gt options line 1 of 342 4 15 UC 7420 7410 User s Manual Managing Communication 10 11 Add one of two files ete ppp options ixp0 or etc ppp options ixp1 The choice depends on which LAN is connected to the ADSL modem If you use LAN1 to connect to the ADSL modem then add ete ppp options ixp0 If you use LAN2 to connect to the ADSL modem then add ete ppp options ixp1 The file context is shown below name username hinet net mtu 1499 mru 1492 defaultroute noipdefault options ixp8 line 1 of 5 20 Type your username the one you set in the ete ppp pap secrets and etc ppp chap secrets files after the name option You may add other options as desired Set up DNS If you are using DNS servers supplied by your ISP edit the file etc resolv conf by adding the following lines of code nameserver ip_addr_of_first_dns_server nameserver ip_addr_of_second_dns_server For example nameserver 168 95 1 1 nameserver 139 175 10 20 Use
3. Configuring the Ethernet Interface UC 7420 7410 s network settings can be modified with the serial Console or online over the network Modifying Network Settings with the Serial Console In this section we use the serial console to modify UC 7420 7410 s network settings 1 Follow the instructions given in a previous section to access UC 7420 7410 s Console Utility via the serial Console port and then type cd etc network to change directories omm Terminal Emulator COM1 115200 None 8 1 T100 jesl x rofile Edit Port Manager Window Help a BIR alale 28 3COM1 115200 None 2 1 TINN Poot Moxa cd fetc network YO oTt etka StateOPEN M m mm eee 2 Type vi interfaces to edit the network configuration file with vi editor You can configure UC 7420 7410 s Ethernet ports for static or dynamic DHCP IP addresses Static IP addresses As shown below 4 network addresses need to be modified address network netmask and broadcast The default IP addresses are 192 168 3 127 for LANI and 192 168 4 127 for LAN2 with default netmask of 255 255 255 0 2 5 UC 7420 7410 User s Manual Getting Started 3 E3 PComm Terminal Emulator COM1 115200 None 8 1 T100 Profile Edit PortManager Window Help 4 BIA alale ale y COM1 115200 None 8 1 T100 See the interfaces 5 manpage for information on what options are oR lg available eMrerttitierettiirrrrtisirrriisirrri
4. If you use this ioctl to set a special baud rate the termios cflag will be B4000000 in which case the B4000000 define will be different If the baud rate you get from termios or from calling tcgetattr is B4000000 you must call ioctl with MOXA _ GET_SPECIAL BAUD RATE to get the actual baud rate Example to set the baud rate include lt moxadevice h gt include lt termios h gt struct termios term int fd speed fd open dev ttyM0 O_RDWR tcgetattr fd amp term term c_cflag amp CBAUD CBAUDEX term c_cflag B4000000 tcsetattr fd TCSANOW amp term speed 500000 ioctl fd MOXA _SET_SPECIAL BAUD_RATE amp speed Example to get the baud rate include lt moxadevice h gt include lt termios h gt struct termios term int fd speed fd open dev ttyM0 O_RDWR tcgetattr fd amp term if term c_cflag amp CBAUD CBAUDEX B4000000 follow the standard termios baud rate define else ioctl fd MOXA_GET SPECIAL BAUD _RATE amp speed 5 9 UC 7420 7410 User s Manual Programmer s Guide Baud rate inaccuracy Divisor 921600 Target Baud Rate Only Integer part ENUM 8 921600 Targer Divisor Round up or down Inaccuracy Target Baud Rate 921600 Divisor ENUM 8 100 E g To calculate 500000 bps Divisor 1 ENUM 7 Inaccuracy 1 7 The Inaccuracy should less than 2 for work reliably Special N
5. Problem Description Please describe the symptoms of the problem as clearly as possible including any error messages you see A clearly written description of the problem will allow us to reproduce the symptoms and expedite the repair of your product UC 7420 7410 User s Manual Service Information 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 Report Form PRF Include as much detail as possible for a shorter product repair time Carefully pack the product in an anti static package and send it pre paid to the dealer The PRA should be visible on the outside of the package and include a description of the problem along with the return address and telephone number of a technical contact
6. lo Link encap Local Loopback inet addr 127 0 0 1 Beast 127 255 255 255 Mask 255 0 0 0 UP LOOPBACK RUNNING MTU 2000 Metric 1 RX packets 0 errors 0 dropped 0 overrun 0 ppp Link encap Point to Point Protocol inet addr 192 76 32 3 P t P 129 67 1 165 Mask 255 255 255 0 UP POINTOPOINT RUNNING MTU 1500 Metric 1 RX packets 33 errors 0 dropped 0 overrun 0 TX packets 42 errors 0 dropped 0 overrun 0 Now type ping z z z z where z z z z is the address of your name server This should work Here s what the response could look like waddington p ping 129 67 1 165 PING 129 67 1 165 129 67 1 165 56 data bytes 64 bytes from 129 67 1 165 icmp_seq 0 ttl 225 time 268 ms 64 bytes from 129 67 1 165 icmp_seq 1 ttl 225 time 247 ms 64 bytes from 129 67 1 165 icmp_seq 2 ttl 225 time 266 ms AG 129 67 1 165 ping statistics 3 packets transmitted 3 packets received 0 packet loss round trip min avg max 247 260 268 ms waddington Try typing netstat nr 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 129 67 1 165 0 0 0 0 UG 0 0 6298 ppp0 If your output looks similar but doesn t have the destination 0 0 0 0 line which refers to the default route used for connections you may have run pppd without the defaultroute option At this poi
7. 3 CD ROM or equivalent 4 Ethernet connect to download the application program to UC 7420 7410 5 Be able to log in as administrator 6 Use a Windows username without spaces You will be using a BASH shell window to enter commands In addition for editing text files such as configuration files you should use vi editor Do NOT use WordPad which could cause problems when the files are transferred to a bona fide Linux environment UC 7420 7410 User s Manual Windows Tool Chain Introduction Installation Procedure 1 Insert the CD into your PC s CD ROM drive and run tool chain windows compiler setup exe to start installation Once the Setup program starts running click on Next to proceed lt a Moxa UC Tool Chain Setup Welcome E 5 x Moxa Universal Communicator Tool Chain 1 0 Thank you for selecting Moxa Universal Communicator Tool Chain 1 0 Moxa Universal Communicator Tool Chain Copyright 2004 Moxa Technologies Co Ltd http 2w moxa com lt Back Cancel 2 Select the Root Directory Note If the directory C UC was created during a previous installation it will be displayed as the Root Directory Use this directory if you do not wish to re install the UC windows tool chain again Under Install For All Users Recommended is selected by default Under Default Text File Type Unix Recommended is selected by default F Moxa UC Tool Chain Setup Choose Installation
8. Create a desktop icon Completing the UC Finder Setup Wizard Setup has finished installing UC Finder on your computer The application may be launched by selecting the installed icons Click Finish to exit Setup 6 3 UC 7420 7410 User s Manual Broadcast Search The Broadcast Search function is used to locate all UC 7420 7410 units that are connected to the same LAN as your Windows computer Since the Broadcast Search function searches by MAC address and not IP address all UC 7420 7410s connected to the LAN will be found regardless of whether or not they are on the same subnet as the host 1 2 Click o n the Broadcast Search button to start searching OR UC Finder File Function About Broadcast Search No Model MAC Address IP Address Search Result 0 UC The Searching window displays the Model MAC Address and IP Address of devices that were located Searching for UC Found 1 UC s remain timeout 3 second s No Model MAC Addhess IP Address uc 7110 00 90 E8 00 00 18 192 168 3 127 UC Finder UC 7420 7410 User s Manual NOTE When the search is complete the same information is displayed in the UC Finder window VS UC Finder File Function About 2 Broadcast Search No Model MAC Address 00 90 E8 00 00 18 IP Address 192 168 3 127 Search Result 1 UC s UC Finder is desi
9. Setting up UC 7420 7410 as an NFS Client Mail SNMP Open VPN UC 7420 7410 User s Manual Managing Communication Telnet FTP DNS In addition to supporting Telnet client server and FTP client server the UC 7420 7410 system also supports SSH and sftp client server To enable or disable the Telnet ftp server you first need to edit the file etc inetd conf Enabling the Telnet ftp server The following example shows the default content of the file etc inetd conf The default is to enable the Telnet ftp server discard dgram udp wait root bin discard discard stream tcp nowait root bin discard telnet stream tcp nowait root bin telnetd ftp stream tcp nowait root bin ftpd 1 Disabling the Telnet ftp server Disable the daemon by typing in front of the first character of the row to comment out the line UC 7420 7410 supports DNS client but not DNS server To set up DNS client you need to edit three configuration files etc hosts etc resolv conf and etc nsswitch conf etc hosts This is the first file that the Linux system reads to resolve the host name and IP address etc resolv conf This is the most important file that you need to edit when using DNS for the other programs For example before you using ntpdate time nist goc to update the system time you will need to add the DNS server address to the file Ask your network administrator which DNS server address you should use The DNS server s IP addre
10. a serial link PPP can be used for direct serial connections using a null modem cable over a Telnet link and links established using a modem over a telephone line Modem PPP access is almost identical to connecting directly to a network through UC 7420 7410 s Ethernet port Since PPP is a peer to peer system UC 7420 7410 can also use PPP to link two networks or a local network to the Internet to create a Wide Area Network WAN Click on the following links for more information about ppp http tldp org HOWTO PPP HOWTO index html http axion physics ubc ca ppp linux html The pppd daemon is used to connect to a PPP server from a Linux system For detailed information about pppd see the man page Example 1 Connecting to a PPP server over a simple dial up connection The following command is used to connect to a PPP server by modem Use this command for old ppp servers that prompt for a login name replace username with the correct name and password replace password with the correct password Note that debug and defaultroute 192 1 1 17 are optional pppd connect chat v ATDT5551212 CONNECT ogin username word password dev ttyMO 115200 debug crtscts modem defaultroute If the PPP server does not prompt for the username and password the command should be entered as follows Replace username with the correct username and replace password with the correct password pppd connect chat v
11. mnt cdrom xrpm ivh mnt cdrom mxscaleb 3 3 2 6 i386 rpm Wait for a few minutes while the Tool Chain is installed automatically on your Linux PC Once the host environment has been installed add the directory usr local mxscaleb bin to your path and the directory usr local mxscaleb man to your manual path You can do this temporarily for the current login session by issuing the following commands export PATH usr local mxscaleb bin PATH export MANPATH usr local mxscaleb man PATH Alternatively you can add the same commands to HOME bash_ profile to cause it to take effect for all login sessions initiated by this user 5 2 UC 7420 7410 User s Manual Programmer s Guide Obtaining help Use the Linux man utility to obtain help on many of the utilities provided by the tool chain For example to get help on the armv5b linux gee compiler issue the command man armv5b linux gcc Cross Compiling Applications and Libraries To compile a simple C application just use the cross compiler instead of the regular compiler mxscaleb gcc o example Wall g 02 example c mxscaleb strip s example mxscaleb gcc ggdb o example debug example c Tools Available in the Host Environment Most of the cross compiler tools are the same as their native compiler counterparts but with an additional prefix that specifies the target system In the case of x86 environments the prefix is i386 linux and in the case of UC 7420 7
12. 10 100 Mbps Ethernet UC 7420 7410 User s Manual Introduction Robust fanless design PCMCIA CompactFlash expansion UC 7420 only USB Host for mass storage device UC 7420 only LCM display and Keypad for HMI Linux ready communication platform DIN Rail or wall mounting installation Product Hardware Specifications UC 7410 LX UC7420 LX CPU Intel Xscale IXP 422 266 MHz RAM 128 MB Flash 32 MB LAN Auto sensing 10 100 Mbps x 2 LAN Protection Built in 1 5 KV magnetic isolation Serial Ports Eight RS 232 422 485 ports RS 232 signals TxD RxD DTR DSR RTS CTS DCD GND RS 422 signals TxD TxD RxD RxD GND 4 wire RS 485 signals TxD TxD RxD RxD GND 2 wire RS 485 signals Data Data GND Serial Protection 15 KV ESD for all signals Data bits 5 6 7 8 Stop bits 1 1 5 2 Parity None even odd space mark Flow Control RTS CTS XON XOFF Speed 50 bps to 921 6 Kbps 50 bps to 230 4 Kbps for Hardware version V1 0 Serial Console PPP RS 232 x 1 RJ45 USB 2 0 Host N A 2 USB 1 1 Client 1 1 PCMCIA N A PCMCIA type I II socket x 1 Compact Flash N A CompactFlash type I II socket x 1 Real Time Clock Yes LCM 128 x 64 dots Buzzer Yes LEDs Serial x 8 Console PPP x 1 PWR x 1 Ready x 1 LAN 10 100 x 2 Key Pad 5 buttons Power input 12 48 VDC Power Consumption 10W 12W Dimensions 197 x 125 x 44mm Gr
13. 2 Use the following command on the host to change to the directory that contains hello debug cd my_work_directory myfilesystem testprograms 3 Enter the following command ddd debugger mxscaleb gdb hello debug amp 4 Enter the following command at the GDB DDD command prompt Target remote 192 168 4 99 2000 The command produces another line of output on the target console similar to the following Remote debugging using 192 168 4 99 2000 192 168 4 99 is the machine s IP address and 2000 is the port number You can now begin debugging in the host environment using the interface provided by DDD 5 Seta breakpoint on main by double clicking or entering b main on the command line 6 Click the cont button Device API UC 7420 7410 supports control devices with the ioctl system API You will need to include lt moxadevice h gt and use the following ioctl function int ioctl int d int request Input int d open device node return file handle int request argument in or out Use the desktop Linux s man page for detailed documentation man ioctl RTC Real Time Clock Buzzer The device node is located at dev rte UC 7420 7410 supports Linux standard simple RTC control You must include lt linux rtc h gt 1 Function RTC_RD_TIME int ioctl fd RTC_RD TIME struct rtc_time time Description read time information from RTC It will return the value on argument 3 2 Function RTC_SET_ TIME int ioctl fd
14. 7410 s Windows Tool Chain is a cross development environment that simulates the Linux root file system allowing users to develop applications in a Windows environment Install the Windows tool chain to set up a Linux like environment on your Windows machine The following figure shows an example of what the Windows Tool Chain environment looks like Your group is currently mkpasswd This indicates that The etc passwd and possibly etc group files should be rebuil See the man pages for mkpasswd and mkgroup then for example ru mkpasswd 1 d gt etc passwd mkpasswd 1 d gt etc group Note that the d switch is necessary for domain users eal total i drwxr xr x drwxr xr x drwxr xr x drwxr xr xX Seyi drwxr xr x DEWR E XTX _ mkpasswd Jan 10 17 24 _ mkpasswd Jan 10 17 24 _ mkpasswd Jan 10 19 48 bin _ mkpasswd Jan 10 19324 ete _ mkpasswd AGA aw LO 22502 ASAE o Peo _ mkpasswd O Jan 10 19 48 lib _ mkpasswd 53 Jan 10 22 03 moxa bat _ mkpasswd 3262 Jan 10 03 moxa ico _ mkpasswd 0 Jan 10 19 48 tmp _ mkpasswd 0 Jan 10 19 48 usr _ mkpasswd O Jan 10 18 12 var Sie io drwxr xr x drWwxr xr x drwxr xr x A a E eS Your Windows OS you use must satisfy the following requirements 1 Operating System Windows 2000 workstation or Windows XP professional 2 Minimum of 500 MB of free hard drive space to install the tool chain and develop programs All of the disk space must be on a single drive
15. 7420 7410 Via FTP or NFS Step 6 Debug the program gt If bugs are found return to Step 4 gt If no bugs are found continue with Step 7 Step 7 Back up the user directory distribute the program to additional UC 7420 7410 units if needed Installing the Tool Chain Linux The PC must have the Linux Operating System pre installed before installing the UC 7420 7410 GNU Tool Chain Redhat 7 3 8 0 Fedora core and compatible versions are recommended The Tool Chain requires about 100 MB of hard disk space on your PC The UC 7420 7410 Tool Chain software is located on the UC 7420 7410 CD To install the Tool Chain insert the CD into your PC and then issue the following commands Cross Compiler mount dev cdrom mnt cdrom rpm ivh mnt cdrom mxscaleb 3 3 2 6 i386 rpm The Tool Chain will be installed automatically on your Linux PC within a few minutes Before compiling the program be sure to set the following path first since the ToolChain files including the compiler link library and include files are located in this directory PATH usr local mxscaleb bin PATH Setting the path allows you to run the compiler from any directory NOTE Refer to Appendix B for an introduction to the Windows Tool Chain In this chapter we use the Linux tool chain to illustrate the cross compiling process Checking the Flash Memory Space If the flash memory is full you will not be able to save data to the Flash ROM Use the followi
16. A ATTENTION Remember to type the sync command before you disconnect the USB mass storage device If you don t issue the command you may lose some data Remember to exit the mnt sda or mnt sdb directory when you disconnect the USB mass storage device If you stay in mnt sda or mnt sda the auto un mount process will fail If that happens type umount mnt sda to un mount the USB device manually UC 7420 7410 only supports certain types of flash disk USB Mass Storage device Some the USB flash disks and hard disks may not be compatible with UC 7420 7410 Check compatibility issues before you purchase a USB device to connect to UC 7420 7410 CF Mass Storage The UC 7420 7410 supports PNP and hot pluggability for connecting a CF mass storage device UC 7420 7410 has a built in auto mount utility that eases the mount procedure The CF mass storage device will be mounted automatically by the mount command to mnt hda UC 7420 7410 will be un mounted automatically by umount when you disconnect it 4 Managing Communications In this chapter we explain how to configure UC 7420 7410 s various communication functions The following topics are covered in this chapter u Ooo Ooo Telnet FTP DNS Web Service Apache gt Saving a Web Page to the CF Card IPTABLES NAT gt Enabling NAT Bootup Dial up Service PPP PPPoE NES Network File System gt Setting up UC 7420 7410 as an NFS Server gt
17. A tun sh bin sh value after net is the subnet behind the remote peer route add net 192 168 4 0 netmask 255 255 255 0 gw 5 Pretec A ee cg aes a end N Create a configuration file named B tun conf and an executable script file named B tun sh on OpenVPN B remote 192 168 8 173 dev tun secret etc openvpn secrouter key cipher DES EDE3 CBC auth MD5 tun mtu 1500 tun mtu extra 64 ping 40 ifconfig 192 168 4 174 192 168 2 173 up etc openvpn B tun sh bin sh value after net is the subnet behind the remote peer route add net 192 168 2 0 netmask 255 255 255 0 gw 5 Pe sae ae end u Note that the parameter ifconfig defines the first argument as the local internal interface and the second argument as the internal interface at the remote peer Note that 5 is the argument that the OpenVPN program passes to the script file Its value is the second argument of ifconfig in the configuration file 3 Check the routing table after you run the OpenVPN programs by typing the command route Destination Gateway Genmsk Flags Metric Ref Use Iface 192 168 4 174 A 255 255 255 255 UH 0 0 0 tun0 192 168 4 0 192 168 4 174 255 255 255 0 UG 0 0 0 tun0 192 168 2 0 4 255 255 255 0 U 0 0 0 ixpl 192 168 8 0 x 255 255 255 0 U 0 0 0 ixp0 4 26 Programmer s Guide This chapter includ
18. ATDT5551212 CONNECT user username password password dev ttyMO 115200 crtscts modem 4 11 UC 7420 7410 User s Manual Managing Communication The pppd options are described below connect chat etc This option gives the command to contact the PPP server The chat program is used to dial a remote computer The entire command is enclosed in single quotes because pppd expects a one word argument for the connect option The options for chat are given below y verbose mode log what we do to syslog ww Double quotes don t wait for a prompt but instead do note that you must include a space after the second quotation mark ATDT5551212 Dial the modem and then CONNECT Wait for an answer ww Send a return null text followed by the usual return ogin username word password Log in with username and password Refer to the chat man page chat 8 for more information about the chat utility dev Specify the callout serial port 115200 The baud rate debug Log status in syslog crtscts Use hardware flow control between computer and modem at 115200 this is a must modem Indicates that this is a modem device pppd will hang up the phone before and after making the call defaultroute Once the PPP link is established make it the default route if you have a PPP link to the Internet this is probably what you want 192 1 1 17 This is a degenerate case of a
19. Directory E ioj x Select Root Install Directory P Select the directory where you want to install Also choose a few installation parameters m Root Directory euc Browse Install For All Users Recommend C Just Me Default Text File Type C DOS Unix Recommend lt Back Cancel B 3 UC 7420 7410 User s Manual Windows Tool Chain Introduction 3 By default the Local Package Directory is the same as on the CD ROM tool chain windows compiler Click on Next to proceed Note It may take anywhere from 5 to 20 minutes to check the packages in the CD ROM after you click on Next a Moxa UC Tool Chain Setup Select Local Package Directory i Select Local Package Directory f Select the directory where the package files of Tool Chain exist m Local Package Directory E tool chaini Windows compile Browse E 4 All required package are selected by default Click on Next to continue F3 Moxa UC Tool Chain Setup Select Packages Oj x Select Packages Select packages to install Niew Category Category Cun New Bi Sr Package All 4 Default Admin 4 Default Base 4 Default Devel amp Default Doc 4 Default Editors 4 Default Graphics amp Default Interpreters 4 Default Libs 4 Default Math 4 Default aft lt Back Cancel e Category column Shows a hierarchical di
20. EAEE EEA T E E E EA E E O E E dese T 4 2 WebService Apac hereni in E T NRE OR OE eos 4 2 Saving a Web Page to the CF Card s sssssssesessseserssseesessreresresesstsresressrsreseesesseeeesse 4 4 PTAB ER S a o ER E A E E E E ENE 4 6 NAT EA E E E EE E ERSA 4 10 NAT EXaMPle sn E A A hae Sites se eee 4 10 Enabling NAT at Bootup ccccceccceceesseesseeseeesceeeeeecesecesecaecaecaaecaeecaeesaeceeeaeeeneeaes 4 10 Dialup Service PPP a a a a a a eA RA 4 11 12d age S I A E A A E A A A A ET 4 14 NFS Network File System anren E O E E O EA 4 16 Setting up UC 7420 7410 as an NFS Server ccccesccesecsecseeeseeeseeeeeeeeeeeeenseeneeensees 4 17 Setting up UC 7420 7410 as an NFS Client eceescesecsceeseeeeeeeeeeseeeeeenseeneeneees 4 18 M eE aia a E AA TENO E AEREE E AARAA 4 18 SNMP 5 2 sions sy cey sagen stsleyeculcscowven deste ony edoevsueus EEEE EEE EEEE E EEEE E 4 19 Open VPN ceiiasscsnnssbestavianes antepetian E A E 4 20 Pro tramme r s GUNS eesti cists neste dvinvtaeneae eee aana saia aaaea Edane 5 1 Flash Memory Map fccvescvacs resist onstenestabhsthvenis a a vba dese EE a eaea aa ties 5 2 Linux Tool Chain Introduction ce eccecsssscessecseesecseesecneeeeceaeceeesecaeesecnesseenaeecesaceaseeeaeeaeeaes 5 2 Debugging with GDB vi secon Rte obeh H Reena heh Waa Heat ean Oa 5 3 Device API ernai ginie o Ratha ied aoe Seah eee ele eases Deter EEN 5 4 RUG Real Time Clock iors cists decn a eee ade catoes Achoet Meatenedh cosh bhatedadens
21. Edit View Favorites Tools Help Rp Back ED ag A JO Search OA DDr eee E tal Se El 29 Address CAuClustilocal mxscalebisharelinsight1 O helplindex htm C UC usr localimxscaleb share insight1 O help index html e Breakpoint Window e Console Window e Function Browser e Locals Window e Memory Window e Register Window e Sessions e Source Window e Stack Window e Target Window e Thread Window e Watch Window C 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 L MOXA Internet Services Q Problem Report Form CL Product Return Procedure UC 7420 7410 User s Manual Service Information 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 product information and user s manual updates The following services are provided E mail for technical suppott cceeesceereee support moxa com tw World Wide Web WWW Site for product information meee eee http www moxa com UC 7420 7410 User s Manual Service Information Problem Report Form MOXA UC 7420 7410 Customer name 1 Moxa Product O UC 7410 LX O UC 7420 LX 2 Serial Number
22. Help 2 BIA alale 22 E COM1 115200 None 8 1 T100 embedded ethernet LANL iface ixpO inet static address 192 168 3 127 network 192 168 3 0 netmask 255 255 255 0 broadcast 192 168 3 255 embedded ethernet LANZ iface ixpl inet static address 192 168 4 127 network 192 168 4 0 netmask 255 255 255 0 802 llg Gigabyte Cardbus wireless card iface ethO inet static address 192 168 5 127 network 192 168 5 0 netmask 255 255 255 0 broadcast 192 168 5 255 n example ethernet card setup broadcast and gateway are optional etc network interfaces line 1 of 162 0 StateOPEN M mEnE UC 7420 7410 User s Manual Getting Started 3 Additional WLAN parameters are contained in the file RT2500STA dat To open the file navigate to the RT2500STA folder and invoke vi or type the following command vi etc Wireless RT2500STA RT2500STA dat to edit the file with vi editor Setting options for the various parameters are listed below the figure PComm Terminal Emulator COM1 115200 None 8 1 T100 Profile Edit Port Manager Window Help a BIA S le5 sex S28 Sag 41 1 100 Default ETR CountryRegion 0 FATS fvirelessMode 0 ssID any etworkType Infra paPsk abcdefghijklmmopagqrstuyvywxyz TxHBurst 0 TurboRate 0 GProtection 0 ShortSlot 0 TxRate 0 RTSThreshold 2312 FragThreshold 2312 SMode Can fetc Wireless RTZSOOSTA SRTZSOOSTA dat line 1
23. RTC_SET TIME struct rtc_time time Description set RTC time Argument 3 will be passed to RTC The device node is located at dev console UC 7420 7410 supports Linux standard buzzer control with UC 7420 7410 s buzzer running at a fixed frequency of 100 Hz You must include lt sys kd h gt 1 Function KDMKTONE ioctl fd KDMKTONE unsigned int arg Description The buzzer s behavior is determined by the argument arg The high word part of arg gives the length of time the buzzer will sound and the low word part gives the frequency The buzzer s on off behavior is controlled by software If you call the ioctl function you MUST set the frequency at 100 Hz If you use a different frequency the system could crash 5 4 UC 7420 7410 User s Manual Programmer s Guide WDT Watch Dog Timer This function is only available for firmware version V1 5 and later versions 1 Introduction The WDT works like a watch dog function You can enable it or disable it When the user enables WDT but the application does not acknowledge it the system will reboot You can set the ack time from a minimum of 50 msec to a maximum of 60 seconds How the WDT works The sWatchDog is enabled when the system boots up The kernel will auto ack it The user application can also enable ack When the user does not ack it will let the system reboot Kernel boot User application running and enable user ack The
24. View Go Bookmarks Tools Help KE X M 3 A http 192 168 3 127 cgi bin test cgi v Go eN Getting Started E Latest Headlines CGI 1 0 test script report 0 9 text plain q 0 8 image png q 0 5 The CGI function is enabled by default If you want to disable the function modify the file etc apache httpd conf When you develop your own CGI application make sure your CGI file is executable 192 168 3 127 PUTTY root Moxa usr www cgi bin ls al Orwxr xr x 2 OOE root O Aug 24 1999 arver re 3 AalolOhe TOOR OQ Nov 5 erie SHEN GES GO IL OOR root 268 Dec 19 2002 SEWER bX L CEOL root 757 Aug 24 1999 root Moxa usr www cgi bin Saving a Web Page to the CF Card Since some applications will have web pages that take up a lot of memory space you will need to be able to run the homepage and other pages from the CF card In this section we use a simple example to illustrate how to save web pages to the CF card and then configure the Apache web server to open the pages The files used in this example can be downloaded from Moxa s website Step 1 Prepare web page and put pages to CF card Click on the following link to download the web page test suite http www w3 org MarkUp Test HTML401 zip Uncompress the zip file to your desktop PC and then use FTP to transfer it to UC 7420 s mnt hda directory T92 168 3 127 PUTTY root Moxa mnt hda ls al drwxr xr x 4 root FOOL 16384 Dec 11 14 18 drwxr xr xX
25. address settings will appear on the LCM display NOTE After connecting UC 7420 7410 to the power supply it will take about 30 to 60 seconds for the operating system to boot up The green Ready LED will not turn on until the operating system is ready Connecting UC 7420 7410 to a PC There are two ways to connect UC 7420 7410 to a PC through the serial Console port or via Telnet over the network Serial Console The serial console port gives users a convenient way of connecting to UC 7420 7410 s console utility This method is particularly useful when using UC 7420 7410 for the first time The signal is transmitted over a direct serial connection so you do not need to know either of UC 7420 7410 s two IP addresses in order to connect to the serial console utility Use the serial console port settings shown below Baud rate 115200 bps Parity None Data bits 8 Stop bits 1 Flow Control None Terminal VT100 Once the connection is established the following window will open RASCOM1 115200 None 8 1 T100 oxa Embedded Linux Professional Edition oxa login root Password LEE ES EEES ggss sgg SHSH 2 g 8 gg 888 FF FF sg Sf g gg 8 g g gf 8 ggg g 88 88 g S88 8 8 88 sgg 8 8 ggg sg g ss g HHFSKE F gsgsss LE EEEE EES LEESE EE EEE E EE E E EE E MEE E E EEE EEEE E E4 88 sgg sgg sgg 8 sgg 88 8 sgg SHSKSHS HHKSHS ggss sss sgg 8 88
26. different Flash disks have different sizes it s 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 d h command to list the size of each memory block and how much free space is available in each block root Moxa df h Filesystem Size Used Available Use Mounted on dev mtdblock3 26 0M 8 9M AoA 3 dev mtdblock3 26 0M 8 9M 17 1M 34 dev ram2 2 0M 40 0k 1 8M 2 var tmpfs 62 1M Q 62 10 dev shm root Moxa upramdisk root Moxa df h Filesystem Size Used Available Use Mounted on dev mtdblock3 26 0M 8 9M dev mtdblock3 26 0M 8 9M dev ram2 M 40 0k R tmpfs 62 1M QO 62 10 dev shm dev raml 29 0M 13 0k 27 5M 0 mnt ramdisk root Moxa cd mnt ramdisk root Moxa mnt ramdisk The following instructions give the steps required to save the firmware file to UC 7420 7410 s RAM disk and then upgrade the firmware 1 Type the following commands to enable the RAM disk upramdisk cd mnt ramdisk 2 Type the following commands to use UC 7420 7410 s built in FTP client to transfer the firmware file uc7400 x x x frm from the PC to UC 7420 7410 mnt ramdisk gt ftp lt destination PC s IP gt Login Name xxxx Login Password xxxx ftp gt bin ftp gt get uc7400 x x x frm root Moxa mnt ramdisk ftp 192 168 3 193 Connected to 192 168 3 193 192 168 3 1937 220 TYPSOft FIP Server 1 10 ready N
27. firmware V1 5 are 1 Before but not including V1 5 the user must jump to the Mini File System and use the bf command 2 For V1 5 and later versions the user can use upfirm command Enabling and Disabling Daemons The following daemons are enabled when UC 7420 7410 boots up for the first time snmp SNMP Agent daemon telnetd Telnet Server Client daemon inetd Internet Daemons ftpd FTP Server Client daemon sshd Secure Shell Server daemon httpd Apache WWW Server daemon nfsd Network File System Server daemon Type the command ps ef to list all processes currently running UC 7420 7410 User s Manual Managing Embedded Linux root Moxa cd etc root Moxa etc ps ef PID vid VmSize Stat Command root 29G S apake root keventd toot ksoftirqd CPUO rot kswapd BOO bdflush root kupdated root mtdblockd root khubd root Laaeres4 efetol jumeols root ixp425 csr root ixp425 ixp0 root stdef TElOLONE ixp425 ixpl1 BOSE usr sbin inetd POOE usr sbin httpd nobody usr sbin httpd nobody usr sbin httpd nobody usr sbin httpd nobody usr sbin httpd nobody usr sbin httpd Bam sbin portmap 104 root usr sbin rpc statd 108 x2OOt usr sbin snmpd s 1 dev null 110 soot usr sbin snmptrapd s 130 2Oot sbin cardmgr lAa aetolone usr sbin rpce nfsd 145 root usr sbin rpc mountd INA OOt usr sbin sshd 16
28. g sgg fg S888 sss sgg HFEF 88 sgg SESE g F g 8 g 88 LLE EEEE sg For further information check top wins moxa com ount user file system root Moxa StateOPEN m Got Break Signa To log in type the Login name and password as requested The default values are both root Login root Password root UC 7420 7410 User s Manual Getting Started Telnet Console If you know at least one of the two IP addresses and netmasks then you can use Telnet to connect to UC 7420 7410 s console utility The default IP address and Netmask for each of the two ports are given below Default IP Address Netmask LAN 1 192 168 3 127 255 255 255 0 LAN 2 192 168 4 127 255 255 255 0 Use a cross over Ethernet cable to connect directly from your PC to UC 7420 7410 You should first modify your PC s IP address and netmask so that your PC is on the same subnet as one of UC 7420 7410 s two LAN ports For example if you connect to LAN 1 you can set your PC s IP address to 192 168 3 126 and netmask to 255 255 255 0 If you connect to LAN 2 you can set your PC s IP address to 192 168 4 126 and netmask to 255 255 255 0 To connect to a hub or switch connected to your local LAN use a straight through Ethernet cable The default IP addresses and netmasks are shown above To login type the Login name and password as requested The default values are both root Login root Pas
29. general option of the form x x x x y y y y Here x x x x is the local IP address and y y y y is the IP address of the remote end of the PPP connection If this option is not specified or if just one side is specified then x x x x defaults to the IP address associated with the local machine s hostname located in ete hosts and y y y y is determined by the remote machine 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 7 noipdefault dev ttyM0O 19200 crtscts If a username and password is required use the following command note that noipdefault is optional and root is both the username and password pppd connect chat v user root password root noipdefault dev ttyMO 19200 crtscts 4 12 UC 7420 7410 User s Manual Managing Communication How to check the connection Once you ve set up a PPP connection there are some steps you can take to test the connection First type sbin ifconfig The folder ifconfig may be located elsewhere depending on your distribution You should be able to see all the network interfaces that are UP ppp0 should be one of them and you should recognize the first IP address as your own and the P t P address or point to point address the address of your server Here s what it looks like on one machine
30. home public home nfs public smtpclient is a minimal SMTP client that takes an email message body and passes it on to an SMTP server It is suitable for applications that use email to send alert messages or important logs to a specific user Click on the following link for more information about smtpclient http www engelschall com sw smtpclient To send an email message use the smtpclient utility which uses SMTP protocol Type smtpclient help to see the help message Example smtpclient s test f sender company com S IP_address receiver company com lt mail body message 4 18 UC 7420 7410 User s Manual Managing Communication SNMP NOTE s The mail subject f Sender s mail address S SMTP server IP address The last mail address receiver company com is the receiver s e mail address mail body message is the mail content The last line of the body of the message should contain ONLY the period character You will need to add your hostname to the file etc hosts UC 7420 7410 has built in SNMP V1 Simple Network Management Protocol agent software It supports RFC1317 RS 232 like group and RFC 1213 MIB II The following simple example allows you to use an SNMP browser on the host site to query the UC 7420 7410 which is the SNMP agent UC 7420 7410 will respond ttit SNMP QUERY STARTED sysDescr 0 octet string Linux Moxa 2 4 18_mv130 ixdp425 1049 Tue Oct 26 09 34 15 CST 20
31. of 34 Z StateOPEN E ER ST Seo eE CountryRegion Sets the channels for your particular country region Setting Explanation use channels 1 to 11 use channels 1 to 11 use channels to 13 use channels 10 11 use channels 10 to 13 use channel 14 use channels 1 to 14 NYE DI AJS Nje oS use channels 3 to 9 WirelessMode Sets the wireless mode Setting Explanation 0 11b g mixed 1 11b only 2 11g only SSID Sets the softAP SSID Setting Any 32 byte string 2 10 UC 7420 7410 User s Manual Getting Started Network Type Sets the wireless operation mode Setting Explanation Infra Infrastructure mode uses access points to transmit data Adhoc Adhoc mode transmits data from host to host Channel Sets the channel Setting Explanation 0 auto 1 to 14 the channel you want to use AuthMode Sets the authentication mode Setting OPEN SHARED WPAPSK WPANONE EncrypType Sets encryption type Setting NONE WEP TKIP AES DefaultKeyID Sets default key ID Setting 1to4 Key1Str Key2Str Key3Str Key4Str Sets strings Keyl to Key4 Setting The keys can be input as 5 ascii characters 10 hex numbers 13 ascii characters or 26 hex numbers TxBurst WPA pre shared key Setting 8 to 64 ascii characters Wpa
32. root Moxa fsversion AS root Moxa The kernel version and user file system version numbers are the same for the factory default configuration and if you download the latest firmware version from Moxa s website and then upgrade UC 7420 7410 s hardware the two version numbers will be the same However to help users define the user file system the kernel and user file system are separate and hence could have different version numbers For this reason we provide two utilities called kversion and fsversion that allow you to check the version numbers of the kernel and file system respectively System Image Backup Upgrading the Firmware A ATTENTION Upgrading the firmware will erase all data on the Flash ROM UC 7420 7410 s bios kernel mini file system and user file system are combined into one firmware file which can be downloaded from Moxa s website www moxa com The name of the file has the form uc7400 x x x frm with x x x indicating the firmware version To upgrade the firmware download the firmware file to a PC and then transfer the file to the UC 7420 7410 unit via a serial Console or Telnet Console connection If you are using the ramdisk to store code for your applications beware that updating the firmware will erase all of the data on the Flash ROM You should back up your application files and data before updating the firmware UC 7420 7410 User s Manual Managing Embedded Linux Since
33. the following command mknod dev net tun c 10 200 An Ethernet bridge is used to connect different Ethernet networks together The Ethernets are bundled into one bigger logical Ethernet Each Ethernet corresponds to one physical interface or port that is connected to the bridge On each OpenVPN machine you should generate a working directory such as etc openvpn where script files and key files reside Once established all operations will be performed in that directory Setup 1 Ethernet Bridging for Private Networks on Different Subnets 1 Set up four machines as shown in the following diagram local net eth1 192 168 2 173 eth0 192 168 2 171 eth0 192 168 8 173 Internet ixp0 192 168 8 174 eth0 192 168 4 172 ixp1 192 168 4 174 local net Host A B represents one of the machines that belongs to OpenVPN A B The two remote subnets are configured for a different range of IP addresses When this setup is moved to a public network the external interfaces of the OpenVPN machines should be configured for static IPs or connect to another device such as a firewall or DSL box first 2 Generate a preset shared key by typing the command openvpn genkey secret secrouter key Copy the file that is generated to the OpenVPN machine 3 Generate a script file named openvpn bridge on each OpenVPN machine This script reconfigures interface ixp1 as IP less creates logical bridge s an
34. then run the executable ftp gt bye S ieee LOA Oe 4 Connected to 192 168 14 9 220 Moxa FTP server lt Version wu 2 6 1 lt 2 gt Mon Nov 24 12 17 04 CST 2003 gt ready User lt 192 168 14 9 lt none gt gt root 331 Password required for root Password 230 User root logged in gas Igay 200 PORT command successful 150 Opening BINARY mode data connection for hello release 226 Transfer complete ftp 2744 bytes sent in 0 00Seconds 2744000 00Kbytes sec ftp gt bye 221 You have transferred 2744 bytes in 1 files ecl Total traffic for this seseiion was 2101 bytes im I Eranstere 221 Thank you for using the FTP service on Moxa 221 Goodbye root Moxa chmod 777 hello release root Moxa hello release Hello GDB debug tool lInsight Insight is a graphical user interface that accompanies GDB the GNU Debugger written in Tcl Tk by people working at Red Hat Inc and Cygnus Solutions Red Hat was generous enough to make Insight available for public use and continues to maintain the program Click on for more information about using Insight or click on Help Topics under the Help menu to read the user manual B 8 UC 7420 7410 User s Manual Windows Tool Chain Introduction File Run View Control Preferences Help f 2 Ju EE sopp olte About GDB Ss source Help Topics a Ep I 7 Source Window emi t Insight Index Microsoft Internet Explorer Fie
35. to attach a wireless LAN card The pre installed Linux operating system provides an open software operating system for your software program development Software written for desktop PCs can be easily ported to the UC 7420 7410 platform with a GNU cross compiler without needing to modify the source code All of the necessary device drivers such as a PCMCIA Wireless LAN module and Keypad LCM and Buzzer control are also included with UC 7420 7410 The Operating System device drivers and the software you develop for your own application can all be stored in UC 7420 7410 s Flash memory Package Checklist UC 7410 LX RISC based Universal Communicator with 8 Serial Ports Dual Ethernet Linux OS UC 7420 LX RISC based Universal Communicator with 8 Serial Ports Dual Ethernet PCMCIA Compact Flash USB Linux OS UC 7420 7410 is shipped with the following items UC 7410 or UC 7420 Wall Mounting Kit DIN Rail Mounting Kit UC 7420 7410 Quick Installation Guide UC 7420 7410 Documentation amp Software CD Cross over Ethernet cable CBL RJ45M9 150 150 cm 8 pin RJ45 to Male DB9 serial port cable CBL RJ45F9 150 150 cm 8 pin RJ45 to Female DB9 console port cable Power Adaptor Product Warranty Booklet NOTE Notify your sales representative if any of the above items is missing or damaged Product Features o Intel XScale IXP 422 266 MHz Processor e On board 128 MB RAM 32 MB Flash ROM e Eight RS 232 422 485 serial ports Dual
36. user API The user application must include lt moxadevic h gt and link moxalib a A makefile example is shown below all mxscaleb gcc o xxxx xxxx c lmoxalib int swtd_open void Description Open the file handle to control the sWatchDog If you want to do something you must first to this And keep the file handle to do other Input None Output The return value is file handle If has some error it will return lt 0 value You can get error from errno 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 ack sWatchDog periodically You must ack the sWatchDog before timeout If you do not ack the system will be reboot automatically The minimal time is 50 msec the maximum time is 60 seconds The time unit is msec Output OK will be zero The other has some error to get the error code from errno 5 5 UC 7420 7410 User s Manual Programmer s Guide int swtd_disable int fd Description Disable the application to ack sWatchDog And the kernel will be auto ack it User does not to do it at periodic Input int fd the file handle from swtd_open return value Output OK will be zero The other has some error to get error code from errno int swtd_get int fd int mode unsigned long time Description Get curr
37. wires are perpendicular at the intersection point NOTE Do not run signal or communication wiring and power wiring in the same wire conduit To avoid interference wires with different signal characteristics should be routed separately UC 7420 7410 User s Manual Introduction e You can use the type of signal transmitted through a wire to determine which wires should be kept separate The rule of thumb is that wiring that shares similar electrical characteristics can be bundled together e Keep input wiring and output wiring separate e Where necessary it is strongly advised that you label wiring to all devices in the system Connecting the Power Connect the 12 48 VDC power line with UC 7420 7410 s terminal block If the power is properly supplied the Ready LED will illuminate with a solid green color after 30 to 60 seconds have passed Grounding UC 7420 7410 Grounding and wire routing helps limit the effects of noise due to electromagnetic interference EMI Run the ground connection from the ground screw to the grounding surface prior to connecting devices A ATTENTION This product is intended to be mounted to a well grounded mounting surface such as a metal panel SG The Shielded Ground sometimes called Protected Ground contact is the left most contact of the 3 pin power terminal block connector when viewed from the angle shown here Connect the SG wire to an appropriate grounded metal surface DC 12 48V C
38. 0 root bin reportip IL roct bin massupfirm 162 root sbin getty 115200 ttysol 163 aooe sbin getty 115200 ttyS1 166 xroot bin massupfirm 167 ooe bin massupfirm 170 zeot usr sbin sshd UL OGE bash 182 root ps eE root Moxa ect nN NOUONNnNNnNNNN NNNNNnNNMN nn NNNNHNN nnn NNNNnNHNN nN To run a private daemon you can edit the file rc local as follows cd etc rc d vi rc local root Moxa cd etc rc d root Moxa etc rc d vi rc local Next use the vi open your application program We use the example program teps2 release and put it to run in the background bin sh Add you want to run daemon root tcps2 release amp Then you will find the enabled daemons after you reboot the system 3 7 UC 7420 7410 User s Manual Managing Embedded Linux root Moxa ps ef PID Uid root root root root TOOG root root root root root root TASSE root root root nobody nobody nobody nobody nobody hin root 105 Fowe AOE rooe LL ooe O ooe 144 root 146 root Usk Zoor Gk roct 162 root 163 LOSE 164 root 166 Toot 168 root I TEOR LIA AOE 174 root root Moxa NnnNn ANANNNNNNNNDHNHNMNNHnNN NNNNnNHN EN pin pep A U o U U nn Setting the Run Level In this section we outline the steps you should take to set the Linux run level and execute requests VmSize Stat Command 1296 EME keventd ksoftirqd CPUO kswapd bdflush k
39. 04 armvSteb sysObjectID 0 object identifier enterprises 2021 250 10 sysUpTime 0 timeticks 0 days 00h 41m 54s 47th 251447 sysContact 0 octet string Root lt root localhost gt configure etc snmp snmp local conf sysName 0 octet string Moxa sysLocation 0 octet string Unknown configure etc snmp snmp local conf system 8 0 timeticks 0 days 00h 00m 00s 22th 22 system 9 1 2 1 object identifier mib 2 31 9 system 9 1 2 2 object identifier internet 6 3 1 10 system 9 1 2 3 object identifier mib 2 49 11 system 9 1 2 4 object identifier ip 12 system 9 1 2 5 object identifier mib 2 50 13 system 9 1 2 6 object identifier internet 6 3 16 2 2 1 14 system 9 1 2 7 object identifier internet 6 3 10 3 1 1 15 system 9 1 2 8 object identifier internet 6 3 11 3 1 1 16 system 9 1 2 9 object identifier internet 6 3 15 2 1 1 17 system 9 1 3 1 octet string The MIB module to describe generic objects for network interface sub layers 18 system 9 1 3 2 octet string The MIB module for SNMPv2 entities 19 system 9 1 3 3 octet string The MIB module for managing TCP implementations 20 system 9 1 3 4 octet string The MIB module for managing IP and ICMP implementations 21 system 9 1 3 5 octet string The MIB module for managing UDP implementations 22 system 9 1 3 6 octet string View based Access Control Model for SNMP 23 system 9 1 3 7 octet string The SNMP Management Architecture MIB 24 s
40. 14 Jared _ Wu mkpasswd 0 Nov 4 18 07 Taror Ts AQVQAAQLTIIOR Q969 Nasr p EEs B Ue drwxrwx Jared Wu 4294967295 O Nov 4 11 Ywxr xX Jared Wu 4294967295 53 Nov 4 10 12 moxa bat Ywxr xX Jared Wu 4294967295 SAGA New 4A abil gil meore ieo drwxrwx Jared Wu 4294967295 0 Noy 4 18 11 tmp drwxrwx 13 Jared Wu 4294967295 M New A al Oo wene drwxrwx 6 Jared Wu 4294967295 0 Nov 4 11 06 var Next enter the hello directory and invoke the make program that will execute the compilation instructions written in the Makefile to compile the hello project drwxrwx 7 Jared Wu 4294967295 O Nov 4 11 10 ete 2 Jared_Wu mkpasswd 0 Nov 4 18 07 hello Jared Wu 4294967295 3262 Nov 4 11 12 insight ico Jared Wu 4294967295 0 Nov 4 11 10 lib SEVR Ee drwxrwx DEWR EERE drwxrwx drwxrwx 1 Jared Wu 4294967295 3262 Nov 4 11 12 moxa ico Jared Wu 4294967295 0 Nov 4 18 11 tmp Jared Wu 4294967295 0 Nov 4 11 06 usr 1 5 mees 1 Jared Wu 4294967295 53 Nov 4 10 12 moxa bat il 4 3 B 7 UC 7420 7410 User s Manual Windows Tool Chain Introduction drwxrwx 6 Jared Wu 4294967295 0 Nov 4 11 06 var cd hello make usr local mxscaleb bin mxscaleb gec o hello release hello c usr local mxscaleb bin mxscaleb strip s hello release usr local mxscaleb bin mxscaleb gec ggdb o hello debug hello c Sis Makefile README hello debug hello release hello c After that use FTP to upload the executable file to the UC and
41. 410 Xscale boards it is mxscaleb For example the native C compiler is gcc and the cross C compiler for Xscale in UC 7420 7410 is mxscaleb gcc The following cross compiler tools are provided ar Manage archives static libraries as Assembler c gH C compiler cpp C preprocessor gcc C compiler gdb Debugger Id Linker nm Lists symbols from object files objcopy Copies and translates object files objdump Displays information about object files ranlib Generates indexes to archives static libraries readelf Displays information about ELF files size Lists object file section sizes strings Prints strings of printable characters from files usually object files strip Removes symbols and sections from object files usually debugging information Debugging with GDB First compile the program must with option ggdb Use the following steps 1 To debug a program called hello debug on the target use the command gdbserver 192 168 4 142 2000 hello debug This is where 2000 is the network port number on which the server waits for a connection from the client This can be any available port number on the target Following this are the name of the program to be debugged hello debug plus that program s arguments Output similar to the following will be sent to the console Process hello debug created pid 38 5 3 UC 7420 7410 User s Manual Programmer s Guide
42. Developing Your First Application We use the tcps2 example to illustrate how to build an application for UC 7420 7410 The procedure outlined in the following subsections will show you how to build a TCP Server program plus serial port communication that runs on the UC 7420 7410 Testing Environment The tcps2 example demonstrates a simple application program that delivers transparent bi directional data transmission between UC 7420 7410 s serial and Ethernet ports As illustrated in the following figure the purpose of this application is to transfer data between PC 1 and the UC 7420 7410 via an RS 232 connection At the remote site data can be transferred between UC 7420 7410 s Ethernet port and PC 2 over an Ethernet connection PC 1 PC 2 a tcps2 c Serial Rx Buffer E LAN Rx Buffer UC 7420 7410 User s Manual Getting Started Compiling tcps2 c NOTE The source code for the tcps2 example is located on the CD ROM at CD ROM example TCPServer2 tcps2 c Use the following commands to copy the file to a specific directory on your PC We use the direrctory home uc7400 1st_application Note that you need to copy 3 files Makefile tcps2 c tcpsp c from the CD ROM to the target directory mount t iso9660 dev cdrom mnt cdrom cp mnt cdrom example TCPServer2 tcps2 c home uc7400 1st_application tcps2 c cp mnt cdrom example TCPServer2 tcpsp c home uc7400 1st_application tcpsp c cp mnt cdro
43. HTML Test Suite Documentation Documentation for the HTML4 01 Test Suite 2 HTML Test Suite Assertions Assertions from the W3C HTML 4 01 Specification 3 HTML Test Suite Tests Tests created to test assertions from the W3C HTML 4 01 Specification Feedback regarding the HTML4 Test Suite should be sent to www html testsuite w3 org The HTML4 Test Suite is an effort of the World Wide Web Consortium based on a contribution Copyright Microsoft Corporation All Rights Reserved 2002 from Microsoft on lad behalf of Microsoft Corporation Openvave S Inc and America Online Inc W3C MIT ERCIM Keio All Rights Reserved W3C liability trademark document use and softwere licensing rules apply Copyright 2002 2003 y NOTE Visit the Apache website at http httpd apache org docs for more information about setting up an Apache server 4 5 UC 7420 7410 User s Manual Managing Communication 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 defined chains Each chain is a list of rules that apply to a certain type of packet Each rule specifies what to do with a matching packet A rule such as a jump to a user defined chain in the same table is called a target UC 7420 7410 supports 3 types of IPTABLES table Fi
44. NARY mode data connection for tcps2 release 226 Transfer complete 4996 bytes sent in 0 00013 seconds 3 9e 04 Kbytes s Ttp gt ILS 22 7 Entering Passive Mode 192 168 3 127 106 196 ilo OO ol soluble ga ASCH mocs beira Comieco sen Momo les sssssss TP EGOOt TOOT 899 Jun 10 08 11 bash_history Saw eae Al roog root 4996 Jun 12 02 15 tcps2 release 226 Transfer complete ftp gt 3 From the UC 7420 7410 type chmod x tcps2 release tcps2 release amp root Moxa ls al GEWE ro 2TOON root 0 wia ANZ O2 drwxr xr x 15 root root Maen i 1970 l root GoOg 899 Jun 10 08 11 bash_history Srn ronro i rocr root 4996 Jun 12 02 15 tcps2 release root Moxa chmod x tcps2 release root Moxa ls al 5 drwxr xr x 2 root root win 12 drwxr xr x I5 root root weer il l RODE root 899 Jun 10 08 11 bash_ history Yaiipcie ae 1 root root ASG Tuin A 02 2 aL root Moxa 2 17 UC 7420 7410 User s Manual Getting Started 4 The program should start running in the background Use either the jobs or ps ef command to check if the tcps2 program is actually running in the background jobs use this command to check if the program is running root Moxa ls al GIA WEGIs Sur 2 Ia Ot drwxr xr x I5 root 1 root Siete e a ll sete YONE IEXCIONE roat root root O awin A O geam il LAO SSIS giem O Oes L 4996 Jun 12 bash history tcps2 release root Moxa chmod x tcps2 release root Mo
45. NAT Table PREROUTING Chain NAT Table POSTROUTING Chain Outgoing Packets Other Host Packets FORWARD Chain FORWARD Chain POSTROUTING Chain Mangle Table Filter Table Mangle Table UC 7420 7410 supports the following sub modules Be sure to use the module that matches your application ip_conntrack ipt MARK ipt_ah ipt_state ip_conntrack_ftp ipt MASQUERADE ipt esp ipt_tcpmss ipt_conntrack_irc ipt MIRROT ipt_length ipt_tos ip_nat_ftp ipt REDIRECT ipt_limit ipt ttl ip_nat irc ipt REJECT ipt_mac ipt_unclean ip_nat_snmp_basic ipt_ TCPMSS ipt_mark ip_queue ipt TOS ipt_multiport ipt LOG ipt ULOG ipt_owner 4 7 NOTE UC 7420 7410 does NOT support IPV6 and ipchains UC 7420 7410 User s Manual Managing Communication NOTE The basic syntax to enable and load an IPTABLES module is as follows 1smod modprobe ip tables modprobe iptable filter Use 1smod to check if the ip_tables module has already been loaded in the UC 7420 7410 Use modprobe to insert and enable the module Use the following command to load the modules iptable_filter iptable_mangle iptable_nat modprobe iptable filter Use iptables iptables restore iptables save to maintain the database IPTABLES plays the role of packet filtering or NAT Take care when setti
46. Psk Enables or disables TxBurst Setting Explanation 0 disable 1 enable UC 7420 7410 User s Manual Getting Started TurboRate Enables or disables TurboRate Setting Explanation 0 disable 1 enable BGProtection Sets 11b 11g protection this function is for engineering testing only Setting Explanation 0 auto 1 always on 2 always off ShortSlot Enables or disables the short slot time Setting Explanation 0 disable 1 enable TxRate Sets the TxRate Setting Explanation Auto 1 Mbps 2 Mbps 5 5 Mbps 11 Mbps 6 Mbps 9 Mbps 12 Mbps 18 Mbps 24 Mbps 10 36 Mbps 11 48 Mbps 12 54 Mbps OILIN IAI nal AJ SINJ oS RTS Threshold Sets the RTS threshold Setting 1 to 2347 FragThreshold Sets the fragment threshold Setting 256 to 2346 UC 7420 7410 User s Manual Getting Started Test Program Developing Hello c In this section we use the standard Hello programming example to illustrate how to develop a program for UC 7420 7410 In general program development involves the following seven steps Step 1 A Connect UC 7420 7410 to a Linux PC Step 2 Install Tool Chain GNU Cross Compiler amp glibc Step 3 Set the cross compiler and glibc environment variables Step 4 Code and compile the program Step 5 Download the program to UC
47. The kernel will not change to auto ack This can cause a serious problem causing your system to reboot again and again 5 User application example Example 1 include lt stdio h gt include lt stdlib h gt include lt string h gt include lt moxadevice h gt int main int argc char argv int fd fd swtd_open if fd lt 0 printf Open sWatchDog device fail n exit 1 swtd_enable fd 5000 enable it and set it 5 seconds while 1 do user application want to do swtd_ack fd swtd_close fd exit 0 The makefile is shown below all mxscaleb gcc O xxxx xxxx c lmoxalib Example 2 include lt stdio h gt include lt stdlib h gt include lt signal h gt include lt string h gt 5 7 UC 7420 7410 User s Manual Programmer s Guide include lt sys stat h gt include lt sys ioctl h gt include lt sys select h gt include lt sys time h gt include lt moxadevice h gt static void mydelay unsigned long msec struct timeval time time tv_sec msec 1000 time tv_usec msec 1000 1000 select 1 NULL NULL NULL amp time static int swtdfd static int stopflag 0 static void stop_swatchdog stopflag 1 static void do_swatchdog void swtd_enable swtdfd 500 while stopflag 0 mydelay 250 swtd_ack swtdfd swtd_disable swtdfd intmain int argc char argv pid_t sonpid si
48. UC 7420 7410 User s Manual Fourth Edition November 2005 www moxa com product Moxa Technologies Co Ltd Tel 886 2 8919 1230 Fax 886 2 89 19 1231 Web www moxa com MOXA Technical Support Worldwide support moxa com tw The Americas support moxa com UC 7420 7410 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 2005 Moxa Technologies Co Ltd All rights reserved Reproduction without permission is prohibited Trademarks MOXA is a registered trademark of The Moxa Group All other trademarks or registered marks in this manual belong to their respective manufacturers Disclaimer Information in this document is subject to change without notice and does not represent a commitment on the part of Moxa Moxa provides this document as is without warranty of any kind either expressed or implied including but not limited to its particular purpose Moxa reserves the right to make improvements and or changes to this manual or to the products and or the programs described in this manual at any time Information provided in this manual is intended to be accurate and reliable However Moxa Technologies assumes no responsibility for its use or for any infringements on the rights of third parties that may result from its use This product might include unintentional technica
49. a cess thtavedadees tata 5 4 BUZZ OR E E E EEE AE ale wade ee ede ei sated erated ale ay se 5 4 WDT Watch Dog Timer c 4 ancien dha nanan odo adn ned Sates 5 5 ART nnee n setae seaweed e Poe ih ek ait Ba na gn nee 5 9 LCM Geet het ac cas hen veal as Bat oad ok abe haa ct Maer oe ath athe Bats haan alate 5 10 KeeyPad its ceeioreciens2ee eet R E ATEN hel RES aa Es I Es HR RER 5 10 Chapter 6 Appendix A Appendix B Appendix C UC PING Or iinicciesis coed ieesiiveatcvcsadvewscacwavaswovtswocdiewsduvsdtuvebduveboivandutsanjibaddieeaivenbine 6 1 Windows UC Findet ri caves coed sages is bete deed seca oe ae TRE aa sect E cath es hoes 6 2 Installing the Software sie nunca Skane au Kin AAU ens 6 2 Broadeast S Gare Meenen ihc ei ENN sed oooh cb ie E a ERR 6 4 SUX UC EI CF seo EAE AEN EEA abate gsc suet scpistnats ame dees ateeuhin E AE 6 5 System COMMMAMGS sicshesict Gi capsededeesshsautiaresndeereacraridewed Javed annacedcniuadeneranntars A 1 busybox V0 60 4 Linux normal command utility collection ceceeceseeteeeteeeseeneeeseeees A 1 Pile aerate r E EET S E E TS E EE Gat A 1 Edot srin een a E AN R A E A A R A 1 NetWork anen etter A AE A ee et A 1 Process ae ae A 2 OE a a a A 2 MOXA special Utilities ssrin ancars nan n a EE E a A 2 Windows Tool Chain Introduction ccccssssececcssseceecesseeeeeesseeeeenees B 1 Introductions 22 8 2 42 AE AEEA R RETE E oak aunts aati et B 2 Installation Procedure is 223066 oceecteite ec
50. ame Cie ailteyers Sis ie eieaetoyeye 3 TOOGE 331 Password required for root Password 220 User oct Yogged in Remote system type is UNIX Using binary mode to transfer files ftp gt cd newsw 250 CWD command successful C ftproot newsw is current directory Ego gt onin 200 Type set to I ftp gt ls 200 Port command successful 150 Opening data connection for directory list drw rw rw il imo SeA O Now Sid IOs 0S drw rw rw IL oreg CE9 0 Nov 30 10203 rw rw rw Loga EES CSEPEL Nov 29 10 24 UCT420 1 5 E I see CES 8778996 Nov 29 10 24 UC7420 usrdisk 1 5 frm EW Wis ews 3 3 UC 7420 7410 User s Manual Managing Embedded Linux 226 Transfer complete ftp gt get UC7420 local UC7420 1 5 frm remote UC7420 1 5 frm 200 Port command successful 150 Opening data connection for UC7420 1 5 frm 226 Transfer complete SHGWT Te Newiacers receives im ily secs O05 ADAS ftp gt 3 Next use the up irm command to upgrade the kernel and root file system upfirm uc7400 x x x frm root Moxa mnt ramdisk upfirm UC7420 1 5 Upgrade firmware utility version 1 0 To check source firmware file context The source firmware file conext is OK This step will destroy all your firmware DO You Want EO continue it 2 CAN X Now upgrade the file redboot Format MTD device dev mtd0 MTD device dev mtd0 erase 128 Kibyte 60000 100 complete Wait to write file Compleleted 100 Now upg
51. ardware Connection Description Wiring Requirements Connecting the Power Grounding UC 7420 7410 Connecting to the Network Connecting to a Serial Device Connecting to the Console Port PCMCIA CompactFlash Q Software Introduction gt Software Architecture gt Journaling Flash File System JFFS2 gt Software Package VVVVVVV V gt Software Version Comparison Table UC 7420 7410 User s Manual Introduction Overview UC 7420 7410 RISC based Communication Platforms are ideal for embedded applications UC 7420 7410 has eight RS 232 422 485 serial ports dual 10 100 Mbps Ethernet ports a PCMCIA interface for wireless LAN communication and CompactFlash and USB port for mass storage flash disk expansion UC 7420 7410 uses an Intel XScale XP 422 266 Mhz RISC CPU Unlike the X86 CPU which uses a CISC design the XP 422 s RISC design architecture and modern semiconductor technology provide UC 7420 7410 with a powerful computing engine and communication functions but without generating a lot of heat The built in 32 MB NOR Flash ROM and 128 MB SDRAM give you enough memory to put your application software directly on UC 7420 7410 And since the dual LAN ports are built right into the IXP 422 CPU UC 7420 7410 makes an ideal communication platform for Network Security applications If your application requires placing UC 7420 7410 in a location that is not located near an Ethernet LAN connection you can use UC 7420 7410 s PCMCIA port
52. assword chap secrets line 1 of 3 33 username hinet net is the username obtained from the ISP to log in to the ISP account password is the corresponding password for the account 4 14 UC 7420 7410 User s Manual Managing Communication 5 Edit the file etc ppp pap secrets and add the following username hinet net password password if you don t use the login option of pppd The mgetty Debian package already provides this option make sure you don t change that INBOUND connections Every regular user can use PPP and has to use passwords from etc passwd D gt username hinet net password UserIDs that cannot use PPP at all Check your etc passwd and add any other accounts that should not be able to use pppd guest hostname eee master hostname Ta root hostname support hostname stats hostname OUTBOUND connections Here you should add your userid password to connect to your providers via PAP The means that the password is to be used for ANY host you connect to Thus you do not have to worry about the foreign machine name Just replace password with your password pap secrets line 1 of 42 2 username hinet net is the username obtained from the ISP to log in to the ISP account password is the corresponding password for the account 6 Edit the file ete ppp options and add the following line plugin pppoe
53. ate 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 i expr 0 while do generate a tap0 interface on tun openvpn mktun dev tap i connect tap device to the bridge brctl addif br0 tap i null ip address of tap device ifconfig tap i 0 0 0 0 promisc up i expr i 1 if i ge maxtap then break fi done null ip address of internal interface ifconfig iface 0 0 0 0 promisc up enable bridge ip ifconfig brO IPADDR netmask S NETMASK broadcast BROADCAST ipf proc sys net ipv4 ip_ forward enable IP forwarding echo 1 gt ipf echo ip forwarding enabled to cat Sipf stop echo shutdown openvpn bridge ifcfg_vpn i expr 0 while do disconnect tap device from the bridge brctl delif brO tap i openvpn rmtun dev tap i i expr i 1 if i ge maxtap then break fi done brctl delif br0 iface brctl delbr br0 ifconfig br0 down ifconfig iface S IPADDR netmask NETMASK broadcast BROADCAST killall TERM openvpn 4 22 Managing Communication UC 7420 7410 User s Manual Managing Communication case 1 in start start stop stop restart stop start an echo Usage 0 start stop restart exit 1 esac exit 0 Create link symbols to enable this script at boot time ln s etc o
54. ber to chmod 744 home nat sh Edit the rc local file to make this shell startup automatically vi etc rce d rce local Add a line in the end of rc local home nat sh EXIF ixpO This is an external interface for setting up a valid IP address EXNET 192 168 4 0 24 This is an internal network address 4 10 UC 7420 7410 User s Manual Managing Communication Step 1 Insert modules Here 2 gt dev null means the standard error messages will be dump to null device modprobe ip tables 2 gt dev null modprobe ip nat ftp 2 gt dev null modprobe ip nat irc 2 gt dev null modprobe ip conntrack 2 gt dev null modprobe ip conntrack ftp 2 gt dev null modprobe ip conntrack_ire 2 gt dev null Step 2 Define variables enable routing and erase default rules PATH bin sbin usr bin usr sbin usr local bin usr local sbin export PATH echo 1 gt proc sys net ipv4 ip forward sbin iptables F sbin iptables X sbin iptables Z sbin iptables F t nat sbin iptables X t nat sbin iptables Z t nat sbin iptables P INPUT ACCEPT sbin iptables P OUTPUT ACCEPT sbin iptables P FORWARD ACCEPT sbin iptables t nat P PREROUTING ACCEPT sbin iptables t nat P POSTROUTING ACCEPT sbin iptables t nat P OUTPUT ACCEPT Step 3 Enable IP masquerade Dial up Service PPP NOTE PPP Point to Point Protocol is used to run IP Internet Protocol and other network protocols over
55. block device It is designed for use on flash ROM chips and recognizes the special write requirements of a flash ROM chip JFFS2 implements wear leveling to extend the life of the flash disk and stores the flash directory structure in the RAM A log structured file system is maintained at all times The system is always consistent even if it encounters crashes or improper power downs and does not require fsck file system check on boot up JFFS2 is the newest version of JFFS It provides improved wear leveling and garbage collection performance improved RAM footprint and response to system memory pressure improved concurrency and support for suspending flash erases marking of bad sectors with continued use of the remaining good sectors which enhances the write life of the devices native data compression inside the file system design support for hard links The key features of JFFS2 are Targets the Flash ROM Directly Robustness Consistency across power failures No integrity scan fsck is required at boot time after normal or abnormal shutdown Explicit wear leveling e Transparent compression Although JFFS2 is a journaling file system this does not preclude the loss of data The file system will remain in a consistent state across power failures and will always be mountable However if the board is powered down during a write then the incomplete write will be rolled back on the next boot but writes that have already been complete
56. d drwxr xXr X mkpasswd Jan 10 19 48 bin drwxr xr x mkpasswd Jan 10 19 24 etc icy A mkpasswd B26 Wan MO 22502 Beto hh Tee drwxr xXr X mkpasswd O van LO Sgae tap Jan 10 17 24 Jan 10 17 24 0 0 0 0 B 6 UC 7420 7410 User s Manual Windows Tool Chain Introduction AVP ese X mkpasswd So dan 10 203 moxa bat Sei ea mkpasswd 3262 Jan 1 203 moxa ico drwxr xXr X mkpasswd 0 Jan 10 19 48 tmp Arwxr xXr X mkpasswd O Jan 10 19348 usr dArwxr xXr X mkpasswd O van MO Tes lo vas Compilation 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 this section we describe the procedures you should follow to compile a project with the Windows tool chain First copy the source codes of your project in the Windows tool chain s installation directory In the example shown here we want to compile the hello example provided in our CD ROM We will copy the source code to UC which is the root directory of the Windows tool chain Check the root directory where you can find the hello directory Mkpasswd 1 d gt etc passwd Mkgroup l1 d gt etc group Note that the d switch is necessary for domain users S cel le al toral amp drwxrwx Jared Wu 4294967295 Nov 4 18 drwxrwx Jared Wu 4294967295 Nov 48 drwxrwx Jared Wu 4294967295 Nov 4 1l A TarndA Ws AVONAOETIAG Nor
57. d C library Insight V60 1 Windows environment source level debug utility Device Drivers PCMCIA amp Card Bus Wireless LAN Card Bus CF Mass storage CompactFlash USB Flash Disk The following table is Software Version Comparison Table presented to give you a better understanding of the software capabilities of the firmware version you are using Note that some versions including versions that just involved bug fixes may not be included in this table Contact Moxa directly for detailed version information and visit Moxa s website to download the most up to date firmware version The firmware versions discussed here differ in the types and versions of BIOS Kernel Root File System Mini File System and User Directory that they bundle V1 1 V1 4 3 V1 5 Serial port 230 4 Kbps 230 4 Kbps a x EDPS CHILLY WLAN 802 11b 802 11b 802 11b Prism2 0 2 5 Prism2 0 2 5 Prism2 0 2 5 802 11g Gigabyte USB Host N A N A Mass Storage PNP USB Client N A N A N A Reset to Factory Default button N A N A Yes with HW V1 5 Share Memory N A N A Yes UC 7420 7410 User s Manual Introduction Protocol stacks and utilities Arp utility N A Yes Yes iptable N A N A Yes Open VPN N A N A Yes WatchDog API N A N A Yes Crontable N A N A Yes upfirm N A N A Yes backupuf N A N A Yes backupfs bf Yes Yes N A minicom Yes Yes Replace by
58. d TAP interfaces loads modules enables IP forwarding etc 4 20 UC 7420 7410 User s Manual Managing Communication bin sh iface ixp1 defines the internal interface maxtap expr 1 defines the number of tap devices I e of tunnels IPADDR NETMASK BROADCAST it is not a great idea but this system doesn t support etc sysconfig network scripts ifcfg ixpl ifcfg_vpn while read f1 f2 3 f4 r3 do if f1 iface a f2 Siface a f3 inet a f4 static then i expr 0 while do if i gt 5 then break fi i expr i 1 read f1 f2 case f1 in address IPADDR f2 netmask NETMASK f2 broadcast BROADCAST f2 esac done break fi done lt etc network interfaces get the ip address of the specified interface mname module _ up oIFS SIFS IFS FOUND no for LINE in lsmod do TOK echo SLINE cut d f1 if TOK Smname then FOUND yes break fi done IFS SoIFS if SFOUND no J then modprobe mname fi start ifcfg_vpn if d dev net then mkdir dev net 4 21 UC 7420 7410 User s Manual fi if r dev net tun then create a device file if there is none mknod dev net tun c 10 200 fi load modules tun and bridge mname tun module up mname bridge module up cre
59. d to explicitly specify a hostname for DHCE requests DHCE_HCSTNAME gt Sagress netmask IPADDR 92 168 5 127 NETMASK 255 255 255 0 arport opts wireless network address broadcast ada mlYUCRK 192 168 5 0 BRCADCAST 1592 lee TS Perte 7 Gateway address for static routing wlan ng cont GATEWAY 10 0 1 1 fetc pemcia network opts am etc pemcia network opts line 1 of 48 2 3 Configure the Wireless LAN card s default SSID setting profile Default SSID is any vi etc wlan wlan conf fetc wlancfg wlancfg DEFAULT are used for example SSID_wlan0 linux wlan This expects a file called etc wlan wlancfg linux wlan to be present Use a SSID of to associate with any network in range LEE EEEE EEI gt SID_wlan0 any ENABLE wlan0 y ENABLE_wlani n SSID_wlan2 ENABLE wlanz n Consult your network administrator for SSID required in your wireless network For example SSID_waln0 any Enable_wlan0 y 4 Duplicate the configuration profile to a new profile cp etc wlan wlancfg DEFAULT etc vlan wlancfg any Copy configuration profile DEFAULT to new configuration profile any 5 Configure the WEP setting if WEP is required on your wireless network vi etc wlan wlancfg any WE PassssssssssSSsSS5SSSS5SS5SSSSS 5 5 J Jable Settings only matter if PrivacyInveked is true inxreq hostWEPEncrypt false true fal
60. d will not be affected Additional information about JFFS2 is available at http sources redhat com jffs2 jffs2 pdf http developer axis com software jffs http www linux mtd infradead org Software Package Boot Loader Redboot V1 92 Kernel MontaVista embedded Linux 2 4 18 Protocol Stack ARP PPP CHAP PAP IPv4 ICMP TCP UDP DHCP FTP SNMP V1 V3 HTTP NTP NFS SMTP SSH 1 0 2 0 SSL Telnet PPPoE OpenVPN File System JFFS2 NFS Ext2 Ext3 VFAT FAT 1 13 UC 7420 7410 User s Manual Introduction OS shell command bash Busybox Linux normal command utility collection Utilities tinylogin login and user manager utility telnet telnet client program ftp FTP client program smtpclient email utility scp Secure file transfer Client Program Daemons pppd dial in out over serial port daemon snmpd snmpd agent daemon telnetd telnet server daemon inetd TCP server manager program ftpd ftp server daemon apache web server daemon sshd secure shell server nfs user server network file system server openvpn virtual private network openssl open SSL Linux Tool Chain Gee V3 3 2 C C PC Cross Compiler GDB V5 3 Source Level Debug Server Glibe V2 2 5 POSIX standard C library Windows Tool Chain Gece V3 3 2 C C PC Cross Compiler GDB V5 3 Source Level Debug Server Glibe V2 2 5 POSIX standar
61. ddresses used on another network One network is designated the inside network and the other is the outside network Typically UC 7420 7410 connects several devices on a network and maps local inside network addresses to one or more global outside IP addresses and un maps the global IP addresses on incoming packets back into local IP addresses NOTE Click on the following link for more information about iptables and NAT http www netfilter org documentation HOWTO NAT HOWTO html NAT Example The IP address of all packets leaving LAN1 are changed to 192 168 3 127 you will need to load the module ipt MASQUERADE IP Netmask 192 168 3 100 24 Gateway 192 168 3 127 PC1 Linux or Windows LANI LAN1 ixp0 192 168 3 127 24 UC 7420 LAN2 ixp1 192 168 4 127 24 LAN2 PC2 Linux or Windows IP Netmask 192 168 4 100 24 Gateway 192 168 4 127 NAT Area Private IP ehco 1 gt proc sys net ipv4 ip forward modprobe iptable nat modprobe ip_conntract modprobe ipt_MASQUERADE iptables t nat A POSTROUTING o ixp0 j SNAT to source 192 168 3 127 or 6 iptables t nat A POSTROUTING o ixp0 j MASQUERADE oF WYN BF Enabling NAT at Bootup In the most of real world situations you will want to use a simple shell script to enable NAT when UC 7420 7410 boots up The following script is an example bin bash If you put this shell script in the home nat sh Remem
62. dress box Mozilla Firefox File Edit View Go Bookmarks Tools Help E gt B O amp O QM O tips 1683 17 e binrprintenv Getting Started E Latest Headlines a ES lt amp i DOCUMENT_ROOT usr www html GATEWAY_INTERFACE CGI 1 1 HTITP_ACCEPT text xml1 application xml application xhtml xml text html q 0 9 text plain q 0 8 image png q 0 5 HTTP_ACCEPT_CHARSET ISO 8859 1 ut 8 q 0 7 q 0 7 HITP_ACCEPT_ENCODING gzip deflate HITP_ACCEPT_LANGUAGE en us en q 0 5 HITP_CONNECTION keep alive HITP_HOST 192 168 3 127 HITP_KEEP ALIVE 300 HITP_USER_AGENT Mozilla 5 0 Windows U Windows NT 5 1 en US rv 1 7 5 Gecko 20041107 Firefox 1 0 PATH bin uszr bin sbin usr sbin QUERY_STRING REMOTE_ADDR 192 168 3 105 REMOTE_PORT 3634 REQUEST _METHOD GET REQUEST_URI cgi bin printenv SCRIPT_FILENAME usr www cgi bin printenv SCRIPT_NAME cgi bin printenv SERVER_ADDR 192 168 3 127 SERVER_ADMIN root localhost SERVER_NAME localhost SERVER_PORT 80 SERVER_PROTOCOL HITP 1 1 SERVER_SIGNATURE lt address gt Apache 2 0 42 Server at localhost Port 80 lt address gt n SERVER_SOFTWARE Apache 2 0 42 Unix 4 3 UC 7420 7410 User s Manual Managing Communication NOTE 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 5 Mozilla Firefox DES Fie Edit
63. e UC 7420 7410 shares the tmp directory to everyone gives everyone both read and write authority The root user on the client machine will have the same level of access to files on the system as the root on the server 4 17 UC 7420 7410 User s Manual Managing Communication NOTE Example 2 home public 192 168 0 0 24 rw ro In this example UC 7420 7410 shares the directory home public to a local network 192 168 0 0 24 with read and write authority NFS clients can just read home public they do not have write authority Example 3 home test 192 168 3 100 rw In this example UC 7420 7410 shares the directory home test to an NFS Client 192 168 3 100 with both read and write authority After editing the NFS Server configuration file remember to use the following command to restart and activate the NFS server etc init d nfs user server restart Setting up UC 7420 7410 as an NFS Client Mail NOTE The following procedure is used to mount a remote NFS Server 1 Scan the NFS Server s shared directory 2 Establish a mount point on the NFS Client site 3 Mount the remote directory to a local directory Step 1 showmount e HOST showmount Show the mount information for an NFS Server e Show the NFS Server s export list HOST IP address or DNS address Steps 2 amp 3 mkdir p home nfs public mount t nfs NFS Server IP directory mount point Example mount t nfs 192 168 3 100
64. eboot to protect the integrity of data being transmitted or processed Reset to default Button Press the Reset to default button continuously for at least 5 seconds to load the factory default configuration After the factory default configuration has been loaded the system will reboot automatically The Ready LED will blink on and off for the first 5 seconds and then maintain a steady glow once the system has rebooted We recommend that you only use this function if the software is not working properly and you want to load factory default settings To reset an embedded linux system always use the software reboot command gt reboot to protect the integrity of data being transmitted or processed The Reset to default button is not designed to hard reboot UC 7420 7410 A ATTENTION Reset to default preserves user s data The Reset to default button will NOT format the user directory and erase the user s data Pressing the Reset to default button will only load the configuration file All files in the ete directory will revert to their factory defaults but other User Data will still exist in the Flash ROM If you need to load the default System Image file refer to the System Image Backup section in Chapter 3 Reset to Default supported by hardware versions V1 2 and higher The Reset to default button is only supported after hardware version V1 2 You can identify the hardware version from UC 7420 7410 s bottom label You
65. ed The GUI version works in Windows environments and the command line utility works in Linux environments The following topics are covered in this chapter Windows UC Finder gt Installing the Software gt Broadcast Search Q Linux ucfinder UC 7420 7410 User s Manual UC Finder Windows UC Finder The UC Finder utility is used to search the LAN or intranet for Moxa Universal Communicators Installing the Software 1 Once the Setup program starts running click on Next to proceed i Setup UC Finder Welcome to the UC Finder Setup Wizard This will install UC Finder on your computer It is recommended that you close all other applications before continuing Click Next to continue or Cancel to exit Setup 2 Click on Next when the Select Additional Tools window opens to proceed with the installation i Setup UC Finder Select Additional Tasks Which additional tasks should be performed Select the additional tasks you would like Setup to perform while installing UC Finder then click Next Additional icons UC 7420 7410 User s Manual UC Finder 3 Click on Next to install program files in the default directory or select an alternative location 2 Setup UC Finder Ready to Install Setup is now ready to begin installing UC Finder on your computer Click Install to continue with the installation or click Back if you want to review or change any settings Additional tasks
66. ent setting values mode 1 for user application enable sWatchDog need to do ack 0 for user application disable sWatchdog does not need to do ack time The time period to ack sWatchDog Input int fd the file handle from swtd_open return value int mode the function will be return the status enable or disable user application need to do ack unsigned long time the function will return the current time period Output OK will be zero The other has some error to get error code from errno 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 swtd_open return value Output OK will be zero The other has some error to get error code from errno 5 6 UC 7420 7410 User s Manual Programmer s Guide int swtd_close int fd Description Close the file handle Input int fd the file handle from swtd_open return value Output OK will be zero The other has some error to get error code from errno 4 Special Note When you kill the application with 9 or kill without option or Ctrl c the kernel will change to auto ack the sWatchDog When your application enables the sWatchDog and does not ack your application may have a logical error or your application has made a core dump
67. epending on the speed of your system When the installation is complete the Complete the Installation window will appear F Moxa UC Tool Chain Setup z loj x Progress This page displays the progress of the installation Parsing ini file Package EEE B 5 UC 7420 7410 User s Manual Windows Tool Chain Introduction 6 Checkmark Create icon on Desktop to place a Moxa BASH Shell icon on your desktop and then click on Finish P Moxa UC Tool Chain Setup Create Icons j loj x Create Icons To create a icon for convenient access to the UC Tool Chain IV Create icon on Desktop lt Back Cancel 7 Click on OK to close the Installation Complete window Mona Setup ET Installation Complete 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 gt Programs gt UC Tool Chain gt Moxa Bash Shell or lick on the desktop Moxa Bash Shell icon 7 Your group is currently mkpasswod This indicates that The etc passwd and possibly etc group files should be rebuil See the man pages for mkpasswd and mkgroup then for example ru mkpasswd 1 d gt etc passwd mkpasswd 1 d gt etc group Note that the d switch is necessary for domain users ls al total 9 drwxr xr X mkpasswd drwxr xt x mkpassw
68. es important information for programmers This following functions are covered in this chapter Flash Memory Map Linux Tool Chain Introduction Debug with GDB Device API RTC Real Time Clock Buzzer WDT Watch Dog Timer UART LCM KeyPad Make File Example OOOOOOOCOCUD UC 7420 7410 User s Manual Programmer s Guide Flash Memory Map NOTE 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 0x0005FFFF 384 KB Boot Loader Read ONLY 0x00060000 0x0015FFFF 1 MB Kernel object code Read ONLY 0x00160000 0x0055FFFF 4 MB Mini root file system EXT2 Read ONLY 0x00560000 0x01 F5FFFF 26 MB User root file system JFFS2 Read Write 0x01F60000 0x01FBFFFF 384 KB Not used 0x01FC0000 0x01 FDFFFF 128 KB Boot Loader configuration Read ONLY 0x01FE0000 0x01 FFFFFF 128 KB Boot Loader directory Read ONLY Mount the user file system to mnt usrdisk with the root file system Check to see if the user file system was mounted correctly If user file system is okay the kernel will change the root file system to mnt usrdisk If the user file system is not okay the kernel will use the default Moxa file system To finish boot process run the init program 1 The default Moxa file system only enables the networ
69. etite syed eeseded locas te sta s eek Moe tieed esa ses Btcdgeaieees B 3 Using the BASH Shell metoni e geben Sass sacvuadesdncdpeeduesgabagtneiseeglevysdadtathes B 6 Compilation sto csv see had ee eS el ee I RS B 7 GDB debug tool Insight cccceccsceesseecessceeeceseceecesecaecaecaaecseecaeeeaeseaeeeeeseeeeeeneeeeenseeaees B 8 SEFVICE Information iiss availa Peveees cadvaneavs vvees waveveuen dance skaad okta a ai anaia suneessvnens C 1 MOXA Internet Services icc hee see eke Re eae ee wna hein A eee C 2 Problemi Report Porn 23 ccccece lt Seccicienstdeceeiles ce sencveds ide sce dite coc detee e E E a C 3 Product Return Procedures 22 300 bic58 woeste vedo Mie ade Go cath Mordee nse lng amp wees HALE C 4 1 Introduction Welcome to MOXA UC 7420 7410 RISC based Communication Platforms Available features include eight RS 232 422 485 serial ports dual 10 100 Mbps Ethernet ports a PCMCIA interface for wireless LAN communication and CompactFlash and USB ports for mass storage disk expansion making UC 7420 7410 ideal for your embedded applications The following topics are covered in this chapter 0 Overview gt Package Checklist gt Product Features gt Product Hardware Specifications Q Hardware Introduction gt Appearance and Dimensions gt Hardware Block Diagram gt LED Indicators gt Reset type Buttons gt Real Time Clock Q Placement Options gt Wall or Cabinet gt DIN Rail Mounting Q H
70. fig A tap0 br conf amp openvpn config B tap0 br conf amp If you see the line Peer Connection Initiated with 192 168 8 173 5000 on each machine the connection between OpenVPN machines has been established successfully on UDP port 5000 6 Oneach 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 brO 192 168 2 0 fi 255 255 255 0 U 0 0 0 brO 192 168 8 0 7 255 255 255 0 U 0 0 0 ixp0 Interface ixp1 is connected to the bridging interface br0 to which device tap0 also connects whereas the virtual device tun sits on top of tap0 This ensures that all traffic from internal networks connected to interface ixp1 that come to this bridge write to the TAP TUN device that the OpenVPN program monitors Once the OpenVPN program detects traffic on the virtual device it sends the traffic to its peer 7 To create an indirect connection to Host B from Host A you need to add the following routing item route add net 192 168 4 0 netmask 255 255 255 0 dev eth0 To create an indirect connection to Host A from Host B you need to add the following routing item route add net 192 168 2 0 netmask 255 255 255 0 dev eth0 Now ping Host B from Host A by typing ping 192 168 4 174 A successful ping indicates that you have created a VPN system that only allows authorized users from one internal netwo
71. g Factory Defaults 0 ccecececceseescessceesceeecesecesecsaeneecaecaaecaeecaeeeaeeeneeeeeeeseserens 3 4 Backing Up the User File System cccceccceeseessceseeeseceseceeeceeeeseeseeeeeeeeeeseeeneeneenaees 3 5 Deploying the User File System to Additional UC 7420 7410 Units cece 3 5 Enabling and Disabling Daemons ccceecceessessceeeceecesecesecssecseecaeeeseeeeeeseeseeeseeneeneenseenaees 3 6 Setting the RumsLevel v scfsceccs fees elSovseags sda decgades ceases ad doedes Seagt deduce dhs causes dda Woven bacstisatsagecensoaeuess 3 8 Adjusting the System Time arine e n E E A ees ee ee 3 9 Setting the Time Manually 0 0 ccecccccssesssesscesseeesceeeceeceseceaeceaecaaeeaeeaeceeeeneecaeeeneeaes 3 9 SIPC s ies seis ete chs re ved ce ote ait A Es Seta eden lec teste scons Needles te oes tee 3 10 Updating the Time Automatically ccececccesccesecesecseeceeeseeeaeeeeeeeeeeeeneeeeetereeerens 3 10 Cron daemon to Execute Scheduled Commands eee ceeeceeeeceseeeceseceeeeceeseecsaeeeeeaeenees 3 11 Connecting Peripherals ccccccccsessseescessceescesecesecaecnsecaeecaeeeaeeeneseeeeeesseeneeceseceaeenaeeneeeneeenes 3 12 USB Mass Stota Ses ciscesccesectee diestied i ai a i e a e a a ea iii 3 12 CEMasS Storad E muaa ea eA AEA A aA NA An a AERE eena aA Ea 3 12 Managing Communications aasssssssnunnnnrennnnnnunnnrnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nenna 4 1 Telnet F PPa a a a ean eek a a ee eet 4 2 IDIN R
72. gnal SIGUSR1 stop _swatchdog swtdfd swtd_open if swtdfd lt 0 printf Open sWatchDog device fail n exit 1 if sonpid fork 0 do_swatchdog do user application main function end user application kill sonpid SIGUSR1 swtd_close swtdfd exit 1 The makefile is shown below all mxscaleb gcc O xxxx xxxx c lmoxalib 5 8 UC 7420 7410 User s Manual Programmer s Guide UART The normal tty device node is located at dev ttyMO ttyM7 and the modem tty device node is located at dev cum0 cum7 UC 7420 7410 supports Linux standard termios control The Moxa UART Device API allows you to configure ttyM0 to ttyM7 as RS 232 RS 422 4 wire RS 485 or 2 wire RS 485 UC 7420 7410 supports RS 232 RS 422 2 wire RS 485 and 4 wire RS485 You must include lt moxadevice h gt define RS232_MODE 0 define RS485_2WIRE_ MODE 1 tdefine RS422 MODE 2 define RS485_4WIRE MODE 3 1 Function MOXA_SET OP MODE int ioctl fd MOXA_SET OP MODE amp mode Description Set the interface mode Argument 3 mode will pass to the UART device driver and change it 2 Function MOXA GET OP MODE int ioctl fd MOXA_GET_OP MODE amp mode Description Get the interface mode Argument 3 mode will return the interface mode There are two Moxa private ioctl commands for setting up special baud rates Function MOXA SET SPECIAL BAUD RATE Function MOXA GET SPECIAL BAUD RATE
73. gned to determine the IP addresses of all UC units connected to the same LAN the host that is running UC Finder To configure UC s IP addresses or other configuration parameters use Telnet over the network or connect directly to the serial Console port to access UC 7420 7410 s Console utility Linux ucfinder Copy ucfinder from the Documentation and Software CD to your Linux PC and then use the following command to start the program UC Finder will automatically locate all UC 7420 7410 units on the LAN and then report their IP addresses ucfinder 6 5 UC Finder A System Commands busybox V0 60 4 Linux normal command utility collection File manager Editor Network ee SOO AON A eh OO LONE aD cp Is In mount rm chmod chown chgrp sync Mv pwd df mkdir rmdir vi cat zcat grep cut find more test sleep echo ping route netstat ifconfig tracerout tftp telnet ftp copy file list file make symbolic link file mount and check file system delete file change file owner amp group amp user change file owner change file group sync file system let system file buffer be saved to hardware move file display now file directly list now file system space make new directory delete directory text editor dump file context compress or expand files search string on file get string on file find file where are there dump file by one page test file exist o
74. iles have the following format mm h dom mon dow user command month hour date month week user command 0 59 0 23 1 31 1 12 0 6 0 is Sunday The following example demonstrates how to use Cron How to use cron to update the system time and RTC time every day at 8 00 STEP1 Write a shell script named fixtime sh and save it to home bin sh ntpdate time nist gov hwelock systohc exit 0 STEP2 Change mode of fixtime sh chmod 755 fixtime sh STEP3 Modify etc cron d crontab file to run fixtime sh at 8 00 every day Add the following line to the end of crontab 8 root home fixtime sh STEP4 Enable the cron daemon manually etc init d cron start STEPS Enable cron when the system boots up Add the following line in the file etc init d re local etc init d cron start 3 11 UC 7420 7410 User s Manual Managing Embedded Linux Connecting Peripherals USB Mass Storage This function is only available for firmware version V1 5 and later versions The UC 7420 7410 supports PNP plug n play and hot pluggability for connecting USB mass storage devices UC 7420 7410 has a built in auto mount utility that eases the mount procedure The first connected USB mass storage device will be mounted automatically by mount to mnt sda and the second device will be mounted automatically to mnt sdb UC 7420 7410 will be un mounted automatically with umount when the device is disconnected
75. ill still show the old IP address To update the LCM display you will need to reboot the UC 7420 7410 Modifying Network Settings over the Network IP settings can be activated over the network but the new settings will not be saved to the flash ROM without modifying the file etc network interfaces For example type the command ifconfig ixp0 192 168 1 1 to change the IP address of LANI to 192 168 1 1 Ea PComm Terminal Emulator COM1 115200 None 8 1 TL00 a 10 x Profile Edit Port Manager Window Help 4 BIA alale l2 EA COM1 115200 None 8 1 T100 ro root Moxa ifconfig ixpO 192 168 1 1 root Moxa StateOPEN m mm m me eerie Configuring the WLAN via the PCMCIA Interface IEEE802 11b The following IEEE802 11b wireless modules are supported NDC NWHI1010 Senao NL 2511CD PLUS F200 Senao NL 2511CD PLUS EXT2 MERCURY ETSI Senao NJ3 2511CD PLUS3 DARK DKW11 330HP DARK XI 330H Planex PCI GW NS11H Corega CG WLPCCL 11 To configure the WLAN for IEEE802 1 1b 1 Unplug the PCMCIA Wireless LAN card first 2 Configure the Wireless LAN card s default IP setting profile Default IP address is 192 168 5 127 netmask 255 255 255 0 Edit network opts with the following command to edit Wireless LAN s default setting vi etc pcmcia network opts UC 7420 7410 User s Manual Getting Started Use DHCE via sbin dhcped sbin dhclient or sbin pump y n DCHCE n If you nee
76. in 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 UC 7420 7410 4 8 UC 7420 7410 User s Manual Managing Communication OUTPUT For locally generated packets FORWARD For packets routed out through the UC 7420 7410 PREROUTING To alter packets as soon as they come in POSTROUTING To alter packets as they are about to be sent out Examples iptables P INPUT DROP iptables P OUTPUT ACCEPT iptables P FORWARD ACCEPT iptables t nat P PREROUTING ACCEPT iptables t nat P OUTPUT ACCEPT iptables t nat P POSTROUTING ACCEPT In this example the policy accepts outgoing packets and denies incoming packets Append or delete rules Usage iptables t table AI INPUT OUTPUT FORWARD io interface p tcp udp icmp all s IP network sport ports d IP network dport ports j ACCEPT DROP A Append one or more rules to the end of the selected chain I Insert one or more rules in the selected chain as the given rule number 1 Name of an interface via which a packet is going to be received 0 Name of an interface via which a packet is going to be sent p The protocol of the rule or of the packet to check S Source address network name host name network IP address or plain IP address sport Source port number d De
77. ions 2 20 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 UC 7420 7410 units The following topics are covered in this chapter Q System Version Information Q System Image Backup gt Upgrating the Firmware gt Loading Factory Defaults gt Backing Up the User File System gt Deploying the User File System to Additional UC 7420 7410 Units Enabling and Disabling Daemons Setting the Run Level Adjusting the System Time gt Setting the Time Manually gt NTP Client gt Updating the Time Automatically L Cron daemon to Execute Scheduled Commands Ooo Q Connecting Peripherals gt USB Mass Storage gt CF Mass Storage UC 7420 7410 User s Manual Managing Embedded Linux System Version Information NOTE To determine the hardware capability of your UC 7420 7410 and what kind of software functions are supported check the version numbers of your UC 7420 7410 s hardware kernel and user file system Contact Moxa to determine the hardware version You will need the Production S N Serial number which is located on UC 7420 7410 s bottom label To check the kernel version type kversion To check the user file system version type f sversion 192 168 3 127 PUTTY root Moxa kversion AS
78. isk backupfs mnt ramdisk usrdisk Firmware version V1 5 and later versions First type the following command to enable the RAM disk upramdisk Next use the file system backup utility provided by Moxa backupuf mnt ramdisk usrfs backup Alternatively you may type the following command to back up the file system to the CF card backupuf mnt hda usrfs backup 2 Once the file system is backed up use FTP to transfer the file usrfs backup to your PC 192 168 3127 PulTy root Moxa upramdisk root Moxa cd mnt ramdisk root Moxa mnt ramdisk df h Filesystem Size Used Available Use Mounted on dev mtdblock3 26 0M 9 0M LP SOM Sats dev mtdblock3 26 0M 9 0M IVOM S55 dev ram2 2 0M 42 0k 1 8M 2 var tmpfs 62m 1M 0 62 1M 0 dev shm dev raml 29 0M 13 0k 27 5M 0 mnt ramdisk root Moxa mnt ramdisk backupuf mnt ramdisk usrfs backup Sync the file system Now backup the user root file system Please wait Backup user root file system OK root Moxa mnt ramdisk Deploying the User File System to Additional UC 7420 7410 Units For some applications you may need to ghost one UC 7420 7410 user file system to other UC 7420 7410 units The specific commands used to carry out this procedure depend on whether the firmware version is earlier or later than version V1 5 Firmware versions earlier than V1 5 not including V1 5 Type the following commands to force the system to jump to the Mini File System m
79. itirrrtiiieretititertrititireriiiir ts We always want the loopback interface auto ixpO ixpl lo iface lo inet loopback iface ixp inet static address 192 168 3 127 network 192 168 3 0 netmask 255 255 255 0 broadcast 192 168 3 255 address 192 168 4 127 network 192 168 4 0 netmask 255 255 255 0 broadcast 192 168 4 255 Jn example ethernet card setup broadcast and gateway are optional Insert State OPEN m m RNS Dynamic IP addresses By default UC 7420 7410 is configured for static IP addresses To configure one or both LAN ports to request an IP address dynamically replace static with dhep and then delete the address network netmask and broadcast lines Default Setting for LAN1 Dynamic Setting using DHCP iface ixp0 inet static iface ixp0 inet dhep address 192 168 3 127 network 192 168 3 0 netmask 255 255 255 0 broadcast 192 168 3 255 Tone 8 1 T100 Profile Edit Port Manager Window Help 2 BIA el l2 OM1 100 auto ixpO ixpl lo iface lo inet loopback iface ixpO inet dhcp iface ixpl inet dhcp After the boot settings of the LAN interface have been modified issue the following command to activate the LAN settings immediately etc init d networking restart UC 7420 7410 User s Manual Getting Started NOTE After changing the IP settings use the networking restart command to activate the new IP address However the LCM display w
80. k and CF It lets users recover the user file system when it fails 2 The user file system is a complete file system Users can create and delete directories and files including source code and executable files as needed 3 Users can create the user file system on the PC host or target platform and then copy it to the UC 7420 7410 Linux Tool Chain Introduction To ensure that an application will be able to run correctly when installed on UC 7420 7410 you must ensure that it is compiled and linked to the same libraries that will be present on the UC 7420 7410 This is particularly true when the RISC Xscale processor architecture of the UC 7420 7410 differs from the CISC x86 processor architecture of the host system but it is also true if the processor architecture is the same The host tool chain that comes with UC 7420 7410 contains a suite of cross compilers and other tools as well as the libraries and headers that are necessary to compile applications for UC 7420 7410 The host environment must be running Linux to install the UC 7420 7410 GNU Tool Chain We have confirmed that the following Linux distributions can be used to install the tool chain Redhat 7 3 8 0 9 0 Fefora core 1 amp 2 The Tool Chain will need about 100 MB of hard disk space on your PC The UC 7420 7410 Tool Chain is located on the UC 7420 7410 CD To install the Tool Chain insert the CD into your PC and then issue the following commands mount dev cdrom
81. l or typographical errors Changes are periodically made to the information herein to correct such errors and these changes are incorporated into new editions of the publication Chapter 1 Chapter 2 Table of Contents Introduction sssrinin aeaa r da vasa vi dvs aie aaia e dvs eau aeaaeai eset 1 1 OVETVIE W e Te ai a a a al e a en ice R a a ean 1 2 Package Checklists n 0s eee eare taare E aa aa aeaea a raa a A shoes AE ALATAS EEE as as 1 2 Prod ct Features iien rie eie a e a E a a E 1 2 Product Hardware Specifications cccccesccesscesecscececeseceecseeeseeeeeeseeeeeeeeeeeeeeeensees 1 3 Hardware IntroductlOniAs aei tal naichik nance ea ee UGA Riel ned A a 1 4 Appearance and Dimensions cesccesecsceeseeeseeeeceneecseceseeeeeseeesecnseenaeeaecaeeaeeeneeenes 1 4 Hardware Block Diaeta nran o E ri O EE E ERE 1 6 LED Indicators ennaa E ons aaa baka a E ales croton AT n ATS 1 6 Reset type Buttons sennie ianei aneii i e E n a E R E a dese E 1 7 Real TIME COOK e ae ea ER Eei a eA EA A RELA AEE R EEA 1 7 Placement Options hen a E E E A R R EE ee 1 8 W allsor Cabinets oi Js fos stisatecancase ctaveasestensbeen sites taba a e a A 1 8 DIN Ratl Mounting ess 62 2250 et eh ek RGR a ee EAS 1 9 Hardware Connection Description ccccccccsessssssceesceeeceseceseeesecseecaeecseeeeeeeseseeseeneeeareneennees 1 9 Witing Requirements sanra re ceded eee tees 1 9 Connecting the POWer enneren aeee a aa as ea E e e EEEa a R AR 1 10 Grou
82. layout for UC 7410 is slightly different Ethernet USB PCI to cardbus controller Bridge PCI Bus Moxa UART ASIC RS 232 422 485 LED Indicators UC 7420 7410 has 12 LED indicators on the top panel Refer to the following table for information about each LED LED Name Color Meaning Ready Green Power is ON and system is ready after booting up Yellow 10 Mbps Ethernet connection LANU LANE Green 100 Mbps Ethernet connection Console Yellow _ Console port is receiving RX data from the serial device Green __ Console port is transmitting TX data to the serial device P1 P2 P3 P4 Yellow Serial port is receiving RX data from the serial device P5 P6 P7 P8 Green Serial port is transmitting TX data to the serial device UC 7420 7410 User s Manual Introduction Reset type Buttons UC 7420 7410 has two reset type buttons The button labeled Reset has the same effect as unplugging the power and then plugging the power back in The button labeled Reset to default returns UC 7420 7410 to the factory default parameter configuration Reset Button Pressing the Reset button initiates a hardware reboot The button plays the same role as a desktop PC s reset button In normal use you should NOT use the Reset Button You should only use this function if the software is not working properly To reset an embedded linux system always use the software reboot command gt r
83. le The Mini File System will only be activated if the boot loader fails to load the User Root File System User AP User Directory Mini Root File System User Configuration Configuration Linux Kernel amp Root Boot Loader HW To improve system reliability UC 7420 7410 has a built in mechanism that prevents the system from crashing The procedure is as follows When the Linux kernel boots up the kernel will mount the root file system and then enable 1 12 UC 7420 7410 User s Manual Introduction services and daemons During this time the kernel will start searching for system configuration parameters via rc or inittab Normally the kernel uses the User Root File System to boot up the system The Mini Root File System is protected and cannot be changed by the user providing a safe zone The kernel will only use the Mini Root File System when the User Root File System crashes For more information about the memory map and programming refer to Chapter 5 Programmer s Guide Journaling Flash File System JFFS2 The User Root File System in the flash memory is formatted with the Journaling Flash File System JFFS2 The formatting process places a compressed file system in the flash memory transparent to the user The Journaling Flash File System JFFS2 which was developed by Axis Communications in Sweden puts a file system directly on the flash instead of emulating a
84. llo c usr local mxscaleb bin mxscaleb strip s hello release usr local mxscaleb bin mxscaleb gcc ggdb o hello debug hello c root localhost hello _ Next execute the hello exe to generate hello release and hello debug which are described below hello release an IXP platform execution file created specifically to run on UC 7420 7410 hello debug an IXP platform GDB debug server execution file see Chapter 5 for details about the GDB debug tool Be sure to type the make command from within the tmp example hello directory since UC s tool chain puts a specially designed Makefile in that directory This special Makefile uses the mxscale gcc compiler to compile the hello c source code for the Xscale environment If you type the make command from any other directory Linux will use the x86 compiler for example cc or gcc Refer to Chapter 5 to see a Make file example 2 14 UC 7420 7410 User s Manual Getting Started Uploading Hello to UC 7420 7410 and Running the Program Use the following command to upload hello release to the UC 7420 7410 via FTP 1 From the PC type ftp 192 168 3 127 2 Use bin command to set the transfer mode to Binary mode and the put command to initiate the file transfer ftp gt bin ftp gt put hello release 3 From the UC 7420 7410 type chmod x hello release hello release The word Hello will be printed on the screen root Moxa hello re Hello
85. low 1 Insert the top of the DIN Rail into the 2 The DIN Rail attachment unit will snap slot just below the stiff metal spring into place as shown below metal spring L metal spring La DIN Rail DIN Rail To remove UC 7420 7410 from the DIN Rail simply reverse Steps 1 and 2 above Hardware Connection Description This section describes how to connect UC 7420 7410 to serial devices for first time testing purposes We cover Wiring Requirements Connecting the Power Grounding UC 7420 7410 Connecting to the Network Connecting to a Serial Device Connecting to the Console Port PCMCIA and CompactFlash Wiring Requirements A ATTENTION Safety First Be sure to disconnect the power cord before installing and or wiring your UC 7420 7410 Wiring Caution Calculate the maximum possible current in each power wire and common wire Observe all electrical codes dictating the maximum current allowable for each wire size If the current goes above the maximum ratings the wiring could overheat causing serious damage to your equipment Temperature Caution Be careful when handling UC 7420 7410 When plugged in UC 7420 7410 s internal components generate heat and consequently the outer casing may feel hot to the touch You should also observe the following common wiring rules e Use separate paths to route wiring for power and devices If power wiring and device wiring paths must cross make sure the
86. lter tables NAT tables and Mangle tables A Filter Table includes three chains INPUT chain OUTPUT chain FORWARD chain B NAT Table includes three chains PREROUTING chain transfers the destination IP address DNAT POSTROUTING chain works after the routing process and before the Ethernet device process to transfer the source IP address SNAT OUTPUT chain produces local packets sub tables Source NAT SNAT changes the first source packet IP address Destination NAT DNAT changes the first destination packet IP address MASQUERADE a special form for SNAT If one host can connect to internet then other computers that connect to this host can connect to the Internet when it the computer does not have an actual IP address REDIRECT a special form of DNAT that re sends packets to a local host independent of the destination IP address C Mangle Table includes two chains PREROUTING chain pre processes packets before the routing process OUTPUT chain processes packets after the routing process It has three extensions TTL MARK TOS The following figure shows the IPTABLES hierarchy 4 6 UC 7420 7410 User s Manual Managing Communication Mangle Table INPUT Chain Filter Table INPUT Chain Mangle Table OUTPUT Chain NAT Table OUTPUT Chain Filter Table OUTPUT Chain Local Host Packets Local Process Incoming Packets Mangle Table PREROUTING Chain
87. m example TCPServer2 Makefile c home uc7400 1st_application Makefile c Type make to compile the example code You will get the following response indicating that the example program was compiled successfully root server11 home uc7400 1st_application root serverll lst_application pwd home uc7400 1st_application root serverll lst_application 11 total 20 lt rw r r i root root 514 Nov 27 11 52 Makefile rw r r ij root root 4554 Nev 27 T1252 tepe2 c tw r r root root 6164 Nov 27 11255 tepe2 c root serverll 1lst_anppaeredtion make _ usr local mxseadleb bin mxscaleb gcec o tcps2 release eans2 c usr logat mxscaleb bin mxscaleb strip s tcps2 release ustfocal mxscaleb bin mxscaleb gcc o tcpsp release tcpsp c wEr local mxscaleb bin mxscaleb strip s tcpsp release fusr local mxscaleb bin mxscaleb gcec ggdb o tcps2 debug tcps2 c usr local mxscaleb bin mxscaleb gcec ggdb o tcpsp debug tcpsp c You have new mail in var spool mail root root serverll 1 application 11 corall S2 Saye root root 514 Nov 27 Makefile rwxr xXr X root root 25843 Nov 27 EURI root root 4996 Nov 27 Sie We Se root root 4554 Nov 27 2 ECpe2 oc rwx gx r X root root 26823 Nov 27 rwxr x i coe ooe Se Nov 27 Da e e ae root 6164 Nov 27 CCPSPHE root serverll lst_apptcation Two executable files teps2 release and tcps2 debug are created teps2 release an IXP platform execution file created specifically
88. ment 3 returns the number of pressed keys 0 means no keys were pressed int ioctl fd IOCTL_KEYPAD GET KEY int key Gets the value of the last key that was pressed This functions only reads one key value for each function call The value of the key value is returned in argument 3 5 10 UC 7420 7410 User s Manual Programmer s Guide Special Note 1 UC 7420 7410 s kernel will store the pressed key history in a buffer The maximum buffer size 1s 31 keys If the buffer overflows the first key of the 31 that was pressed will be dropped without sounding the buzzer 2 Currently UC 7420 7410 does NOT support pressing more than key at the same time Make File Example The following Makefile file example codes are copied from the Hello example on UC 7420 7410 s CD ROM cc usr local mxscaleb mxscaleb gcc CPP usr local mxscaleb mxscaleb gcc SOURCES hello c OBJS SOURCES c 0 all hello hello OBJS CC o LDFLAGS LIBS clean rm f OBJS hello core gdb 5 11 UC Finder The UC Finder utility is used to search the LAN or intranet for Moxa Universal Communicators UC Finder comes in handy if you forget the IP address for troubleshooting field problems and for testing UC Finder works by sending a broadcast message over the LAN to search for UC 7420 7410 MAC addresses It will then query the UC 7420 7410 s for their IP addresses Two versions of UC Finder are provid
89. mpd SS5ssh S99showreadyled S24pcmcia S60tcps2 root Moxa etc rce d rc3 d KxxRUMFILE stands for K start the run file while linux shuts down or halts xx a number between 00 99 The smaller number has a higher priority RUNFILE is the file name For removing the daemon you can remove the run file from ete re d re3 d by using the following command rm f etc rce d rc3 d S60tcps2 Adjusting the System Time Setting the Time Manually UC 7420 7410 has two time settings One is the system time and the other is the RTC Real Time Clock time kept by the UC 7420 7410 hardware Use the date command to query the current system time or set a new system time Use hwclock to query the current RTC time or set a new RTC time Use the following command to query the system time date Use the following command to query the RTC time hwclock Use the following command to set the system time date MMDDhhmmYYYY MM Month DD Date hhmm hour and minute YYYY Year Use the following command to set the RTC time hwclock w Write current system time to RTC The following figure illustrates how to update thesystem time and set the RTC time UC 7420 7410 User s Manual Managing Embedded Linux 192168 3 L127 PUTTY root Moxa date Erai Jun 2 gt 2320an esT 2000 root Moxa hwclock ima gwm BS A580733 2000 M SSII GECCE root Moxa date 120910002004 Thu Dec S 10 00 00 CST 2004 root Moxa hwclock
90. n client on the system by updating etc resolv conf file hwclock systohc sleep 100 Updates every 100 seconds The min time is 100 seconds Change 100 to a larger number to update RTC less often 3 10 UC 7420 7410 User s Manual Managing Embedded Linux Save the shell script using any file name E g fixtime 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 file etc inittab Add the following line to the bottom of the file ntp 2345 respawn etc init d fixtime Use the command init q to re init the kernel Cron daemon to Execute Scheduled Commands This function is only available for firmware version V1 5 and later versions Start Cron from the directory etc re d rce 1local It will return immediately so you don t need to start it with amp to run the background The Cron daemon will search etc cron d crontab for crontab files which are named after accounts in etc passwd Cron wakes up every minute and checks each command to see if it should be run in the current minute When executing commands output is mailed to the owner of the crontab or to the user named in the MAILTO environment variable in the crontab if such a user exists Modify the file etc cron d crontab to set up your scheduled applications Crontab f
91. nditig UC 7420 74 10 i a tie E E E E ER A Ei 1 10 Connecting to the Network sssessessseseesesseeressesersresersesetsesersesseesessesesseseesreseesenses 1 10 Connectie toa Serial Device meio n ce ie e Re ees eee 1 11 Connecting to the Console Port ccsccesseessesseeesceesceeceseceseceaecaecaeecaeeaaeceeeeeeneeees 1 11 ROMGIA TEE th ceosnteteaitae ccdacttie ad tion asia ieleed icon E at 1 11 CompactFlash sis 4 At E tet hao N Sah ike hiss Ee Chae 3 1 11 Software Introductio oeno oine e e RE E EE E E E E E EE E 1 12 Software ArchitectUTe naien ea a aaa ae a a Oaie 1 12 Journaling Flash File System JFFS2 ccccscessseesesseceeeceeceeecesecseeeaeeeeecseeeeeeneeses 1 13 Software Package AE E ih E esha ceatos E obs oonncd ted loves bai 4b edi ci Se ok 88 1 13 Software Version Comparison Table c ceeccescessecesecssecseeceeeseeseeeeeeeeeenseeereeeeees 1 14 Getting Started oceicaiseiasceascicenigesaceebsedetwestnaxtanensdbectdiucstraduuaditeedaenetindeadanatocve 2 1 Powering On UC 7420 7410 E E 2 2 Connecting WC 7420 741 00 4 PE roion e e e E E EEE EA E eee seo nese 2 2 nE E O O EA E E E TE TT 2 2 Telnet Console iiviia sites oi aa iea Sea aie E R 2 3 SEL CONSOLE se sect sted doves EE se caneea cok Sree dataas cacetes E Se enctetease 2 4 Configuring the Ethernet Interface ccd icsdi nn a a o hecioen iets bation gah ates teees 2 5 Modifying Network Settings with the Serial Console eeeseesseseeeeeeecneeeeeneeereeee 2 5 M
92. ng command to calculate the amount of Available flash memory gt df h UC 7420 7410 User s Manual Getting Started NOTE 1 115200 None 8 1 T100 i done root Moxa fetc init d df h oTR Filesystem Size Used Available Use Mounted on RTS dev mtdblock3 26 0M 9 0M 17 0M 35 z6 0M 9 0M 17 0M 35 2 0M 40 0k 1 8M 2 var 62 1 0 62 18 0 dev shm root Moxa fetc init d State OPEN feg los Got Break Signal 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 UC 7420 7410 with the console cable and then use the console utility to delete the files from UC 7420 7410 s flash memory If the flash memory is full you will need to free up some memory space before saving files to the Flash ROM Compiling Hello c NOTE The UC 7420 7410 CD contains several example programs Here we use Hello c as an example to show you how to compile and run your applications Type the following commands from your PC to copy the files used for this example from the CD to your computer s hard drive cd tmp mkdir example cp r mnt cdrom example tmp example To compile the program go to the Hello subdirectory and issue the following commands cd example hello make You should receive the following response root localhost hello make usr local mxscaleb bin mxscaleb gcc o hello release he
93. ng up the IPTABLES rules If the rules are not correct remote hosts that connect via a LAN or PPP may be denied access We recommend using the Serial Console to set up the IPTABLES Click on the following links for more information about iptables http www linuxguruz com iptables http www netfilter org documentation HOWTO packet filtering HOWTO html Since the IPTABLES command is very complex to illustrate the IPTABLES syntax we have divided our discussion of the various rules into three categories Observe and erase chain rules Define policy rules and Append or delete rules Observe and erase chain rules Usage iptables t tables L n t tables Table to manipulate default filter example nat or filter L chain List List all rules in selected chains If no chain is selected all chains are listed n Numeric output of addresses and ports iptables t tables FXZ F Flush the selected chain all the chains in the table if none is listed X Delete the specified user defined chain Z Set the packet and byte counters in all chains to zero Examples iptables L n In this example since we do not use the t parameter the system uses the default filter table Three chains are included INPUT OUTPUT and FORWARD INPUT chains are accepted automatically and all connections are accepted without being filtered iptables F iptables X iptables Z Define policy for cha
94. nt you can try using Telnet ftp or finger bearing in mind that you ll have to use numeric IP addresses unless you ve set up etc resolv conf correctly 4 13 UC 7420 7410 User s Manual Managing Communication Setting up a Machine for Incoming PPP Connections This first example applies to using a modem and requiring authorization with a username and password pppd dev ttyMO 115200 crtscts modem 192 168 16 1 192 168 16 2 login auth You should also add the following line to the file ete ppp pap secrets wa The first star lets everyone login The second star lets every host connect The pair of double quotation marks is to use the file ete passwd to check the password The last star is to let any IP connect The following example does not check the username and password pppd dev ttyM0O 115200 crtscts modem 192 168 16 1 192 168 16 2 PPPoE How to use PPPoE on UC 7408 1 Update two files usr sbin pppd and usr lib pppd 2 4 1 pppoe so on the target UC 7408 for version V1 5 or earlier versions Copy the files from the web or CD ROM and directly update it by the copy command or FTP 2 Connect UC 7408 s LAN port to an ADSL modem with a cross over cable HUB or switch 3 Login to the UC 7408 as the root user 4 Edit the file etc ppp chap secrets and add the following username hinet net password Secrets for authentication using CHAP Helient 4 JP addregses p
95. odifying Network Settings over the Network c csccescesceeseeeeeeeeeeseeeeeneeeeeentens 2 7 Configuring the WLAN via the PCMCIA Interface 00 ccceesceseeeecseeeeeeseeeeeeseeeneeeeeenneeeeees 2 7 TEBE SOD TIE n a ENEN EN E 2 7 THEE SOD TTE E E E E E 2 9 Test Program Developing Hello c ceccecccssessseesseeseeeseeesceseeeeeeeeeeeeesecnseeeeeeeaeenseeseeeseeenes 2 13 Installing the Tool Chain Linux cccccecscessceesceeseeeeceeeesecenecsaecseecaeeeaeeseeenseeneeees 2 13 Checking the Flash Memory Space cccccccesssessseeseessceseceseeeseceaecseecaeeeneeseeeneeeneeaes 2 13 Compiling m li llo Ae EEE T A ETES 2 14 Uploading Hello to UC 7420 7410 and Running the Program 2 15 Developing Your First Application ccccesccesccsecseeescececseeeneeeceeeeeeeeeeecnseenaeeaeenaeceeeseeenes 2 15 Festina Environments en e E O ETRO R 2 15 Chapter 3 Chapter 4 Chapter 5 Compiling teps Ci cee hv esedere n e a teeth E E eee er eae 2 16 Uploading tcps2 release and Running the Program ccccecseeseeseeeseeeeeeeeeeteeeeees 2 17 Testing Procedure Summary cccecccssecsseessessceesceeteeseceseceseceaecseecaeecaeeeseeeneeneeeereeas 2 19 Managing Embedded Linux ccccccccceceeseneneeeeeeeeeeeeeneneeeeeeeeeeneeseeeeneneeeeeees 3 1 System Version Informaatiota a E E Saves diode E R E 3 2 System Image Back pr eorn e E R E E E E a ai 3 2 Upsrading the Firmware E A en O eaa Ea 3 2 Loadin
96. onnecting to the Console Port UC 7420 7410 s console port is an 8 pin RJ45 RS 232 port The port can be used to connect to the console utility from a remote console via a V90 or GPRS modem with PPP protocol The pin definition is the same as for the serial ports P1 to P8 For normal data acquisition applications you should connect to UC 7420 7410 s serial ports P1 to P8 via a V90 or GPRS modem If you would like to use the console port for normal data acquisition applications you can set the Console port to startup via PPP protocol For details refer to Dial up Service PPP section in Chapter 4 PCMCIA The PCMCIA slot supports the CardBus Card 32 Card standard and 16 bit PCMCIA 2 1 JEIDA 4 2 Card standard It supports 3 3V 5V and 12V at a working voltage of 120 mA Wireless LAN card expansion is optional The Wireless LAN card provided by Moxa lets you connect UC 7420 7410 to a Wireless LAN with both 802 1b and 802 11g interfaces supported If you need device drivers for other kinds of PCMCIA cards contact Moxa for information on how to initiate a cooperative development project CompactFlash UC 7420 provides one CompactFlash slot that supports CompactFlash type I II card expansion Currently Moxa provides a CompactFlash disk for plug amp play mass storage expansion You may also use flash disks available from most computer supply outlets The CompactFlash will be mounted at mnt hda If you need device drivers f
97. onnecting to the Network Connect one end of the Ethernet cable to one of UC 7420 7410 s 10 100M Ethernet ports 8 pin RJ45 and the other end of the cable to the Ethernet network If the cable is properly connected UC 7420 7410 will indicate a valid connection to the Ethernet in the following ways 8 1 The bottom right corner LED indicator maintains a solid green color when the cable is properly Pin Signal connected to a 100 Mbps Ethernet network The 1 ETx bee LED will flash on and off when Ethernet packets 2 ETx are being transmitted or received 3 ERx 4 26 8 1 The bottom left corner LED indicator maintains a 5 solid orange color when the cable is properly 6 ERx connected to a 10 Mbps Ethernet network The 7 LED will flash on and off when Ethernet packets 8 are being transmitted or received UC 7420 7410 User s Manual Introduction Connecting to a Serial Device Use properly wired serial cables to connect UC 7420 7410 to serial devices UC 7420 7410 s serial ports P1 to P8 use 8 pin RJ45 connectors The ports can be configured by software for RS 232 RS 422 or 2 wire RS 485 The precise pin assignments are shown in the following table Pin RS 232 RS 422 RS 485 1 DSR ae q 8 2 RTS TXD 7 3 GND GND GND 4 TXD TXD ce 5 RXD RXD Data 6 DCD RXD Data 7 CTS a 8 DTR i C
98. or other kinds of mass storage cards contact Moxa for information on how to initiate a cooperative development project UC 7420 7410 User s Manual Introduction Software Introduction Software Architecture The Linux operating system that is pre installed in UC 7420 7410 follows the standard Linux architecture making it easy to port programs that follow the POSIX standard to UC 7420 7410 Porting is done with the GNU Tool Chain provided by Moxa In addition to the Standard POSIX API device drivers for the LCM buzzer and Keypad controls USB CompactFlash mass storage UART and Wireless LAN PCMCIA card are also included in the UC 7420 7410 Linux system AP User Application Daemon Apache Telnet FTPD SNMP API Application Interface POSIX Socket Secure Socket Protocol Stack TCP IP UDP CMP ARP HTTP SNMP SMTP Device File Driver PCMCIA CF WLAN USB UART RTC LCM Keypad System Microkernel Memory control Schedule Process Hardware RS 232 422 485 Ethernet PCMCIA CompactFlash USB UC 7420 7410 s Flash ROM is partitioned into Boot Loader Linux Kernel Mini Root File System and User Root File System partitions In order to prevent user applications from crashing the Root File System UC 7420 7410 uses a specially designed Mini File System with Protected Configuration for emergency use This Mini File System comes with serial and Ethernet communication capability for users to load the Factory Default Image fi
99. oss Weight 875 g Operating temperature 10 to 60 C 14 to 140 F 5 to 95 RH Storage temperature 20 to 80 C 4 to 185 F 5 to 95 RH Regulatory Approvals EMC FCC Class A CE Class A Safety UL CUL TUV Warranty 5 years UC 7420 7410 User s Manual Introduction Hardware Introduction Appearance and Dimensions Appearance UC 7410 7420 Rear View 12 48 VDC Power Input 10 100 Mbps Ethernet x 2 DC 12 48V PCMCIA LAN1 LAN2 Console pile SB 2 0 H 2 EJL A Toe Connector USB 1 1 Client x 1 es RS 232 miniB Connector PCMCIA x 1 PPP Console CF V rh a S UC 7410 7420 Top View UC7420 Universal Communicator Ready B tant Graphics LCM a 128 x 64 Dots Console 5 Buttons UC 7410 7420 Front View RJ45 RS 232 422 485 Connectors x 8 RS 232 422 485 Reset to P1 P2 P3 P4 P5 PB P7 Pg default UC 7420 7410 User s Manual Introduction Dimensions OC Ready LAN1 LAN2 Console O O OOA D e2 P a 23 PE PD e ey Hec 125 mm 4 92 gt lt _____ 197 mm 7 76 UC 7420 7410 User s Manual Introduction Hardware Block Diagram The following block diagram shows the layout of UC 7420 s internal components the
100. ote LCM 1 Ifthe target baud rate is not a special baudrate e g 50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 19200 38400 57600 115200 230400 460800 921600 the termios cflag will be set to the same flag 2 Ifyou use stty to get the serial information you will get speed equal to 0 UC 7420 7410 only supports text mode display with screen size of 16 cols by 8 rows The device node is dev 1cm See the examples given below We provide a private struct defined as follows typedef struct lcm xy int x col value the arrange is 0 15 int y raw value the arrange is 0 7 lom_xy t Examples int ioctl fd IOCTL_LCM GOTO_XY lcm_xy t pos Move the cursor position to x col y raw position The argument 3 is the new position value int ioctl fd IOCTL_LCM CLS NULL Clears the LCM display int ioctl fd IOCTL LCM CLEAN LINE NULL To change one line to all spaces in the current row and move the cursor to the 0 column of this row int ioctl fd IOCTL_LCM GET XY lcm_xy t pos Get the current cursor position The value will be returned in argument 3 int ioctl fd IOCTL LCM BACK _LIGH_ON NULL Tums the LCM back light on int ioctl fd IOCTL LCM BACK LIGHT OFF NULL Turns the LCM back light off KeyPad The device node is dev keypad The key value is defined in moxadevice h int ioctl fd IOCTL KEYPAD HAS PRESS int flag Checks how many keys have been pressed Argu
101. penvpn openvpn bridge etc rc d rc3 d S32vpn br for example ln s etc openvpn openvpn bridge etc rc d rc6 d K32vpn br for example 4 Create a configuration file named A tap0 br conf and an executable script file named A tap0 br sh on OpenVPN A point to the peer remote 192 168 8 174 dev tap0 secret etc openvpn secrouter key cipher DES EDE3 CBC auth MD5 tun mtu 1500 tun mtu extra 64 ping 40 up etc openvpn A tap0 br sh bin sh value after net is the subnet behind the remote peer route add net 192 168 4 0 netmask 255 255 255 0 dev br0 2 0 9 nn 2 ANR OSSR end Create a configuration file named B tap0 br conf and an executable script file named B tap0 br sh on OpenVPN B point to the peer remote 192 168 8 173 dev tap0 secret etc openvpn secrouter key cipher DES EDE3 CBC auth MD5 tun mtu 1500 tun mtu extra 64 ping 40 up etc openvpn B tap0 br sh bin sh value after net is the subnet behind the remote peer route add net 192 168 2 0 netmask 255 255 255 0 dev br0 Ph armel ee tee ee ee eg end u Note Select cipher and authentication algorithms by specifying cipher and auth To see with algorithms are available type openvpn show ciphers openvpn show auths 4 23 UC 7420 7410 User s Manual Managing Communication 5 Start both of OpenVPN peers openvpn con
102. r not sleep seconds echo string ping to test network routing table manager display network status set network ip address trace route UC 7420 7410 User s Manual System Commands 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 zeat dump gz file context 4 mknod make device node 5 free display system memory usage 6 date print or set the system date and time 7 env run a program in a modified environment 8 clear clear the terminal screen 9 reboot reboot power off on the server 10 halt halt the server 11 du estimate file space usage 12 gzip gunzip compress or expand files 13 hostname show system s host name MOXA special utilities 1 backupfs backup file system user directory 2 bf built the file system user directory 3 kversion show kernel version 4 cat etc version show user directory version 5 upramdisk mount ramdisk 6 downramdisk unmount ramdisk Windows Tool Chain Introduction UC 7420 7410 s Windows Tool Chain is a cross development environment that simulates the Linux root file system allowing users to develop applications on a Windows PC The following topics are covered in this appendix Introduction Installation Procedure Using the BASH Shell Compilation GDB debug tool Insight OOoOoco UC 7420 7410 User s Manual Windows Tool Chain Introduction Introduction UC 7420
103. rade the file kernel Format MTD device dev mtd1 MTD device dev mtdl erase 128 Kibyte 100000 100 complete Wait to write file Compleleted 100 Now upgrade the file mini file system Format MTD device dev mtd2 MTD device dev mtd2 erase 128 Kibyte 400000 100 complete Wait to write file Compleleted 100 Now upgrade the file user file system Format MTD device dev mtd3 MTD device dev mtd3 erase 128 Kibyte 1a00000 100 complete Wait to write file Compleleted 100 Now upgrade the file directory Format MTD device dev mtd6 MTD device dev mtd6 erase 128 Kibyte 20000 100 complete Wait to write file Compleleted 100 Now upgrade the new configuration file Upgrade the firmware is OK Please press any key to reboot system Loading Factory Defaults The easiest way to load factory defaults is to update the firmware follow the instructions in the previous section to upgrade the firmware Note that if your user file is not working properly the system will mount the Mini File System In this case you will need to load factory defaults to resume normal operation UC 7420 7410 User s Manual Managing Embedded Linux Backing Up the User File System 1 Create a backup file The specific commands used to back up the user file system depend on whether the firmware version is earlier or later than version V1 5 Firmware versions earlier than V1 5 not including V1 5 upramd
104. rectory The file formats are shown below vi etc exports File Format directory machinel option11 option12 machine2 option21 option22 directory The directory that will be shared with the NFS Client machinel and machine2 Client machines that will have access to the directory A machine can be listed by its DNS address or IP address e g machine company com or 192 168 0 8 optionxx The option list for a machine describes the kind of access the machine will have Important options are ro Read only This is the default rw Readable and Writeable no_root_squash Ifno root squash is selected then the root on the client machine will have the same level of access to files on the system as the root on the server This can have serious security implications although it may be necessary if you want to do administrative work on the client machine that involves the exported directories You should only specify this option when you have a good reason root_squash Any file request made by the user root on the client machine is treated as if it is made by user nobody on the server Exactly which UID the request is mapped to depends on the UID of user nobody on the server not the client sync Sync data to memory and flash disk async The async option instructs the server to lie to the client telling the client that all data has been written to the stable storage Example 1 tmp rw no_root_squash In this exampl
105. rk to access users at the remote site For this system all data is transmitted by UDP packets on port 5000 between OpenVPN peers 8 To shut down OpenVPN programs type the command killall TERM openvpn 4 24 UC 7420 7410 User s Manual Managing Communication Setup 2 Ethernet Bridging for Private Networks on the Same Subnet 1 Set up four machines as shown in the following diagram local net eth1 192 168 2 173 eth0 192 168 2 171 eth0 192 168 8 173 Internet ixp0 192 168 8 174 eth0 192 168 2 172 ixp1 192 168 2 174 local net 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 3 Routed IP 1 Set up four machines as shown in the following diagram local net eth1 192 168 2 173 eth0 192 168 2 171 eth0 192 168 8 173 Internet ixp0 192 168 8 174 eth0 192 168 4 172 ixp1 192 168 4 174 local net 4 25 UC 7420 7410 User s Manual Managing Communication 2 Create a configuration file named A tun conf and an executable script file named A tun sh point to the peer remote 192 168 8 174 dev tun secret etc openvpn secrouter key cipher DES EDE3 CBC auth MD5 tun mtu 1500 tun mtu extra 64 ping 40 ifconfig 192 168 2 173 192 168 4 174 up etc openvpn
106. root root 0 See 29 17343 ERWA RE K root root 1768 Dec 11 14 16 drwxr xr x root root 4096 Dec 11 14 19 6 al 2 wx r xr x root root 36071 Dec 11 14 18 I root root SA DSe alal e ea CWXr xr l root root EXO Pec 1 abaya 2 EW toe drwxr xr x root root 24576 Dec 11 14 20 EWER x root root ASS DEE IHE alae al root Moxa mnt hda UC 7420 7410 User s Manual Managing Communication Step 2 Use the following commands to configure the Apache web server s DocumentRoot cd etc apache vi httpd conf DocumentRoot mnt hda Change the document root directory to your CF card 192 T683 t27 PUTTY ServerRoot etc apache PidFile var run httpd pid ScoreBoardFile var run httpd scoreboard Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 MinSpareServers 5 MaxSpareServers 10 StartServers 5 MaxClients 150 MaxRequestsPerChild 0 Listen 80 User nobody Group nobody ServerAdmin root localhost ServerName localhost DocumentRoot mnt had Step 3 Use the following commands to restart the Apache web server cd etc init d apache restart Step4 Open your browser and connect to the UC 7420 7410 by typing the current LAN1 IP address in the browser s address box HTML4 Test Suite Mozilla Firefox File Edit View Go Bookmarks Tools Help 3 PN C http92 168 3 127 7 co i Getting Started E Latest Headlines HTML4 Test Suite Contents 1
107. se inxreq hostwWEPLecrypt false true false otllPrivacyInveked false true false otl1lWEPDefaultkKeyID 0 0111213 otllExcludeUnencrypted false truel false in AP this means WEF is required If PRIV_GENSIR is not empty use FPRIV_GENISIR to generate keys just a convenience PRIV_GENERATCR sbin nwepgen nwepgen Neesus compatible PRIV_RKEY128 false keylength to generate ERIV_CENSTR ox set them explicitly Set genstr or keys not both ot11WEFLefaultKey0 format XXIXXIXXIXKIXX or dot11WEFLefaultKeyl XXIKXIXXIXXIXKIXXIKXXIXXIKXXIXKXIKXXIKXXIXX otllWEPLlefaultkKey2 e g 01 20 03 40 05 or dot11WEFLefaultKey3 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d SELECI STATICN MCDE IS_ADHCC n yin y adhoc n infrastructure UC 7420 7410 User s Manual Getting Started IEEE802 11g The following IEEE802 11g wireless modules are supported ASUS WL 107g CNET CWC 854 181D version Edmiax EW 7108PCg Amigo AWP 914W GigaByte GN WMGK Other brands that use the Ralink RT2560 series chip set To configure the WLAN for IEEE802 1 1g 1 2 Unplug the CardBus Wireless LAN card first Use the command vi etc networking interfaces to open the interfaces configuration file with vi editor and then edit the 802 1 1g network settings circled in red in the following figure E3 PComm Terminal Emulator COM1 115200 None 8 1 T100 BE Profile Edit Port Manager Window
108. se root 3 ps ef root Moxa NOTE Use the kill 9 command for PID 187 to terminate this program kill 9 187 Testing Procedure Summary Compile teps2 c make Upload and run teps2 release in the background tcps2 release amp Check that the process is running jobs or ps ef Use a serial cable to connect PC1 to UC 7420 7410 s serial port 1 Use an Ethernet cable to connect PC2 to UC 7420 7410 On PCI If running Windows use HyperTerminal 38400 n 8 1 to open COMn On PC2 Type telnet 192 168 3 127 4001 On PCI Type some text on the keyboard and then press Enter On PC2 The text you typed on PC1 will appear on PC2 s screen 2 AA a a a Sa The testing environment is illustrated in the following figure However note that there are limitations to the example program teps2 c PC 1 tcps2 c Serial Rx Buffer 2 19 UC 7420 7410 User s Manual Getting Started NOTE The teps2 c application is a simple example designed to give users a basic understanding of the concepts involved in combining Ethernet communication and serial port communication However the example program has some limitations that make it unsuitable for real life applications 1 The serial port is in canonical mode and block mode making it impossible to send data from the Ethernet side to the serial side i e from PC 2 to PC 1 in the above example 2 The Ethernet side will not accept multiple connect
109. sers Click on the link http www chiark greenend org uk sgtatham putty download html to download PuTTY free software to set up an SSH console for UC 7420 7410 in a Windows environment The following figure shows a simple example of the configuration that is required 2X PuTTY Configuration Session Basic options for your PuTTY session Logging Specify your connection by host name Terminal Host Name Port Keyboard 192 168 3 127 22 Bell yi Protocol Window C Raw Iene Rlogn SSH Appearance Translation Load save or delete a stored session Selection Saved Sessions Colours UC 7420 Console Setting Connection Delouk San Inet ault Settings r Load Tene UC 7420 Console Setting Rlogin Be SSH Swe _2eee Tunnels Delete Close window on exit C Always Never Only on clean exit Cancel UC 7420 7410 User s Manual Getting Started Linux Users From a Linux machine use the ssh command to access UC 7420 7410 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 192 168 3 127 192 168 3 127 can t be established RSA key fingerprint is b ee ff 64 41225 fe cd 2a f2 92 8ficb 1f 6b 2f Are you sure you want to continue connection yes no yes_ NOTE SSH provides better security compared to Telnet for accessing UC 7420 7410 s Console utility over the network
110. splay of packages with category name highest and package name lowest Click the plus sign next to category name to open the category and see the packages within that category B 4 UC 7420 7410 User s Manual Windows Tool Chain Introduction e 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 e Packages In the packages listing field package names are arranged by Category Full Partial according to the View by button When viewing by Category click the plus sign to open or close the packages under that category This is the same list you see in flat form when viewing by Full Partial By default named packages are installed e Install If the package was not previously installed select this option to install the package now e Reinstall If the package was previously installed select this option to install it again This will overwrite the previous installation e Uninstall If the package was previously installed select this option if you do NOT want to make any changes e Skip Ignores a package entirely regardless of whether it was previously installed or uninstalled Packages marked Skip are omitted from the Partial display 5 The Progress window will appear The installer will install all packages that were selected This process could take from 5 to 30 minutes d
111. ss is specified with the nameserver command For example add the following line to etc resolv conf if the DNS server s IP address is 168 95 1 1 nameserver 168 95 1 1 TO 120 53 100I PUTTY root Moxa etc cat resolv conf resolv conf This file is the resolver configuration file See resolver 5 nameserver 192 168 1 16 nameserver 168 95 1 1 nameserver 140 115 1 31 nameserver 140 115 236 10 root Moxa etc etc nsswitch conf This file defines the sequence to resolve the IP address by using etc hosts file or etc resolv conf Web Service Apache The Apache web server s main configuration file is etc apache httpd conf with the default homepage located at usr www html index html Save your own homepage to the following directory usr www html Save your CGI page to the following directory 4 2 UC 7420 7410 User s Manual Managing Communication usr www cgi bin Before you modify the homepage use a browser such as Microsoft Internet Explore or Mozilla Firefox from your PC to test if the Apache Web Server is working Type the LAN1 IP address in the browser s address box to open the homepage E g if the default IP address is still active type http 192 168 3 127 in address box Test Page for the Apache Web Server on MontaVista Linux Mozilla Firefox File Edit View Go Bookmarks Tools Help e 8 O A O mems21603127 v Go Getting Started E Latest Headlines i s E
112. stination address dport Destination port number j Jump target Specifies the target of the rules i e how to handle matched packets For example ACCEPT the packet DROP the packet or LOG the packet Examples Example 1 Accept all packets from lo interface iptables A INPUT i lo j ACCEPT Example 2 Accept TCP packets from 192 168 0 1 iptables A INPUT i ixp0 p tcp s 192 168 0 1 j ACCEPT Example 3 Accept TCP packets from Class C network 192 168 1 0 24 iptables A INPUT i ixp0 p tcp s 192 168 1 0 24 j ACCEPT Example 4 Drop TCP packets from 192 168 1 25 iptables A INPUT i ixp0 p tcp s 192 168 1 25 j DROP Example 5 Drop TCP packets addressed for port 21 iptables A INPUT i ixp0 p tcp dport 21 j DROP Example 6 Accept TCP packets from 192 168 0 24 to UC 7420 7410 s port 137 138 139 iptables A INPUT i ixp0 p tcp s 192 168 0 24 dport 137 139 j ACCEPT Example 7 Log TCP packets that visit UC 7420 7410 s port 25 iptables A INPUT i ixp0 p tcp dport 25 j LOG Example 8 Drop all packets from MAC address 01 02 03 04 05 06 iptables A INPUT i ixp0 p all m mac mac source 01 02 03 04 05 06 j DROP NOTE In Example 8 remember to issue the command modprobe ipt_mac first to load module ipt_mac 4 9 UC 7420 7410 User s Manual Managing Communication NAT NAT Network Address Translation protocol translates IP addresses used on one network different IP a
113. sword root ct Telnet 192 168 10 96 Moxa Embedded Linux Professional Edition Linux army5teb 2 4 18_mv138 ixdp425 Moxa login root Password HHHH HHHH HEH THEE HEHE Hit Hitt HHHH Hitt Ht HHHH HHHH HHH Hit HE Hit HHH HHH H HHH HHH HHHH Ht Ht HHH HHHH Hitt HHH Hitt HH HHH HH HH itt itt HHH HHH Ht HHHH Ht Hit HH HHO HH Ht HHHH Hitt tt HH HH Ht Ht THE tt tt HHH Hit HHHH tt Ht Hitt Hit HHH Hitt HH HHH HHH HHH HH Ht Ht HH HHH itt Ht HHH Ht Ht Ht HHH Ht HHH HO HHHH HEE EERI HIEI HHHH For further information check http 7 7 uuw moxa com Mount user file system rootEeMoxa You can proceed with the configuration of UC 7420 7410 s network settings when you reach the bash command shell Configuration instructions are given in the next section 2 3 UC 7420 7410 User s Manual Getting Started A ATTENTION Serial Console Reminder Remember to choose VT100 as the terminal type Use cable CBL RJ45F9 150 which comes with UC 7420 7410 to connect to the serial console port Telnet Reminder When connecting to UC 7420 7410 over a LAN you must configure your PC s Ethernet IP address to be on the same subnet as the UC 7420 7410 you wish to contact If you do not get connected on the first try re check the serial and IP settings and then unplug and re plug UC 7420 7410 s power cord SSH Console UC 7420 7410 supports an SSH Console to offer users with better security options Windows U
114. the following command to create a pppoe connection pppd ixp0 The ixp0 is what is connected to the ADSL modem LAN port The example above uses LAN1 To use LAN2 type pppd ixp1 Type ifconfig ppp0 to check if the connection is OK or has failed If the connection is OK you will see information about the ppp0 setting for the IP address Use ping to test the IP If you want to disconnect it use the kill command to kill the pppd process NFS Network File System The Network File System NFS is used to mount a disk partition on a remote machine as if it were on a local hard drive allowing fast seamless sharing of files across a network NFS allows users to develop applications for UC 7420 7410 without worrying about the amount of disk space that will be available UC 7420 7410 supports NFS protocol for both client and server 4 16 UC 7420 7410 User s Manual Managing Communication 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 UC 7420 7410 as an NFS Server By default UC 7420 7410 enables the service etc init d nfs user server The service link file S25nfs user server is located in the directory re d re2 d re5 d Edit the NFS server configuration file etc exports to set up the remote host NTF client list and access rights for a specific di
115. tip Directory Change var eee User File System Change to ramdisk System Apache root document ust html usr html ust www 2 Getting Started In this chapter we explain how to connect UC 7420 7410 turn on the power and then get started using the programming and other functions The following topics are covered in this chapter u u Powering on UC 7420 7410 Connecting UC 7420 7410 to a PC gt Serial Console gt Telnet Console gt SSH Console Configuring the Ethernet Interface gt Modifying Network Settings with the Serial Console gt Modifying Network Settings over the Netowork Configuring the WLAN via the PCMCIA Interface gt JEEE802 11b gt IEEE802 11g Test Program Developing Hello c gt Installing the Tool Chain Linux gt Checking the Flash Memory Space gt Compiling Hello c gt Uploading Hello to UC 7420 7410 and Running the Program Developing Your First Application gt Testing Environment gt Compiling tcps2 c gt Uploading tcps2 release and Running the Program gt Testing Procedure Summary UC 7420 7410 User s Manual Getting Started Powering on UC 7420 7410 Connect the SG wire to the Shielded Contact located in the upper left corner of the UC 7420 7410 and then power on UC 7420 7410 by connecting it to the power adaptor It takes about 30 to 60 seconds for the system to boot up Once the system is ready the Ready LED will light up and the Network
116. to run on UC 7420 7410 teps2 debug an IXP platform GDB debug server execution file see Chapter 5 for details about the GDB debug tool If you get an error message at this point it could be because you neglected to put teps2 c and tcpsp c in the same directory The example Makefile we provide is set up to compile both teps2 and tcpsp into the same project Makefile Alternatively you could modify the Makefile to suit your particular requirements 2 16 UC 7420 7410 User s Manual Getting Started Uploading tcps2 release and Running the Program Use the following commands to use FTP to upload teps2 release to the UC 7420 7410 1 From the PC type ftp 192 168 3 127 2 Next use the bin command to set the transfer mode to Binary and the put command to initiate the file transfer ftp gt bin ftp gt put tcps2 release root serverll lst_application ftp 192 168 3 127 COTOS Oe 2 168 3 127 220 Moxa FTP server Version wu 2 6 1 2 Mon Nov 24 12 17 04 CST 2003 ready 530 Please login with USER and PASS 530 Please login with USER and PASS KERBEROS V4 rejected as an authentication type Name 192 168 393 1l27 r00t Toot 331 Password required for root Password 230 User root logged in Remote SvStomestvne i UND Jeg binary mode to transfer files d ftp gt bin 200 Type set to I CUpeat tcps2 release local tcps2 rel ape remete ctepez release 217 Entering Passive Mode 192 166 3 127 82 253 150 Opening BI
117. updated mtdblockd khubd jffs2_gcd_mtd3 ixp425 csr ixp425 ixp0 ixp425 ixpl1 stdef usr sbin inetd usr sbin httpd usr sbin httpd usr sbin httpd usr sbin httpd usr sbin httpd usr sbin httpd SOT one e root tcps2 release ETENEE PT LC usr sbin snmpd s 1 dev null usr sbin snmptrapd s sbin cardmgr usr sbin rpc nfsd usr sbin rpc mountd usr sbin sshd bin reportip bin massupfirm sbin getty 115200 ttyso sbin getty 115200 ttyS1 bin massupfirm bin massupfirm usr sbin sshd bash ps ef Use the following command to enable or disable settings root Moxa ect rce d rc3 d 1s S19nfs common SZUsnmpd S24pcmcia root Moxa etc re o veo oT ed etc re d init d Edit a shell script to execute root tcps2 release and save to tcps2 as an example cd etc rc d rc3 d s25nfssuser server S99showreadyled S55ssh S99rmnologin ln s etc rc d init d tcps2 S60tcps2 3 8 UC 7420 7410 User s Manual Managing Embedded Linux SxxRUNFILE stands for S start the run file while linux boots up xx a number between 00 99 The smaller number has a higher priority RUMFILE the file name 19216823127 PUTTY root Moxa ect rc d rc3 d 1s SONES conmmon S25nfs user server S99showreadyled S20snmpd S55ssh S24pcmcia S99rmnologin root Moxa ect rc d rc3 d Ini s root tcps2 release S60tcps2 root Moxa ect rc d rc3 d 1s S 19nfs common S25nfs user server S99rmnologin S20sn
118. v etc inittab etc inittab bak reboot r now upramdisk Use ftp to download the backup file of the user file system from the PC to the mnt ramdisk directory bf mnt ramdisk usrdisk reboot r now Firmware version V1 5 and later versions 3 5 UC 7420 7410 User s Manual Managing Embedded Linux Back up the user file system to a PC refer to the previous subsection Backing Up the User File System for instructions and then type the following commands to copy the backup to additional UC 7420 7410 units upramdisk cd mnt ramdisk upfirm usrfs backup 192 168 3 t27 PUTTY root Moxa mnt ramdisk ls al drwat xeon 3 POOL root 1024 Jun 15 02 47 arwr sre SITOO TOON 0 Sep 29 2004 ll Toog root Jum 15 02 45 m l ooe root 27263140 Jun 15 02 48 root Moxa mnt ramdisk upfirm usrfs backup Upgrade firmware utility version 1 1 To check source firmware file context The source firmware file conext is OK This step will destroy all your firmware Do you want to continue it Y N Now upgrade the file user file systim Do you want to keep the network IP setting on etc network interfaces file Y N Backup the network setting Format MTD device dev mtd3 Wait to write file Compleleted 100 Now update the configuration file Upgrade the firmware is OK Please press any key to reboot system NOTE The differences between updating the User File System for firmware versions before and after
119. w root Moxa date hwclock Bayt Des Si IMO ele Oy caw ANA mme Dee SA INO gO gO BOOS 0 esis severely root Moxa NTP Client UC 7420 7410 has a built in NTP Network Time Protocol client that is used to initialize a time request to a remote NTP server Use ntpdate lt this client utility gt to update the system time ntpdate time stdtime gov tw hwclock w Visit http www ntp org for more information about NTP and NTP server addresses 10 120 53 100 PUTTY root Moxa date hwclock Sat Jam 1 00 00 36 CET 2000 sere dei il WOsSOOESi ZOO Oa 72k eeel root Moxa ntpdate time stdtion gov tw 9 Dec 10 58 53 ntpdate 207 step time server 2 ISO UG 52 offset 1559050379 84256 sec root Moxa hwclock w root Moxa date hwclock Thu Dec 9 10 59 11 CST 2004 Thu Dec 9 10 59 12 2004 0 844076 seconds root Moxa NOTE Before using the NTP client utility check your IP and DNS settings to make sure that an Internet connection is available Refer to Chapter 2 for instructions on how to configure the Ethernet interface and see Chapter 4 for DNS setting information Updating the Time Automatically In this subsection we show how to use a shell script to update the time automatically Example shell script to update the system time periodically bin sh ntpdate time nist gov You can use the time server s ip address or domain name directly If you use domain name you must enable the domai
120. will need to contact Moxa to determine the version of your product s hardware When contacting our customer support team you will need to provide the product s Serial Number S N which can be found on UC 7420 7410 s bottom label Real Time Clock UC 7420 7410 s real time clock is powered by a lithium battery We strongly recommend that you do not replace the lithium battery without help from a qualified Moxa support engineer If you need to change the battery contact Moxa RMA service team WARNING There is a risk of explosion if the battery is replaced by an incorrect type UC 7420 7410 User s Manual Introduction Placement Options Wall or Cabinet The two metal brackets that come standard with UC 7420 7410 are used to attach UC 7420 7410 to a wall or the inside of a cabinet Use two screws per bracket first to attach the brackets to the bottom of the UC 7420 7410 Fig A Next use two screws per bracket to attach the UC 7420 7410 to a wall or cabinet Fig B GL YAY Universal Communicator Ready Lam Lan2 Console Figure B UC 7420 7410 Universal Communicator Wall Mounting Brackets top view 1 8 UC 7420 7410 User s Manual Introduction DIN Rail Mounting The aluminum DIN Rail attachment plate is included in the package If you need to reattach the DIN Rail attachment plate to UC 7420 7410 make sure the stiff metal spring is situated towards the top as shown in the figures be
121. xa ls al iania aa 2 O Oite drwxr xr x IS roort I root root root root O Jun 0 Jan 899 Jun doesn history Sae a a l root Moxa sont porn 187 Start root Moxa jobs wal t Running root CMO ennai root NOTE root meeps release amp 4996 Jun tcps2 release Use the kill command for job number to terminate this program kill 1 ps ef use this command to check if the program is running 1 Running root Moxa ps ef PID Wel TOSE root rOOt root root root root TOSE root root root root root root roOt nobody nobody nobody nobody nobody Isala root root root root root root root root root 1296 NnnwW FUUG OA O U O U N nn NNNNHnNNMN ep tcps2 release amp VmSize Stat Command amie keventd ksoftirqd CEVO kswapd bdflush kupdated mtdblockd khubd see Gec meel ixp425 csr ixp425 ixp0 asx 425 also stdef usr sbin inetd usr sbin httpd usr sbin httpd usr sbin httpd usr sbin httpd usr sbin httpd usr sbin httpd sbin portmap usr sbin rpc statd usr sbin snmpd s 1 dev null usr sbin snmptrapd s sbin cardmgr usr sbin rpc nfsd usr sbin rpc mountd usr sbin sshd bin reportip sbin getty 115200 ttyso 2 18 UC 7420 7410 User s Manual Getting Started Toot 3 soin getty 115200 ttysl Loot usr sbin sshd root bash TODE 3 aael MIZ WA Si LOs eos DOLT EOOE 5 tcps2 relea
122. ystem 9 1 3 8 octet string The MIB for Message Processing and Dispatching 25 system 9 1 3 9 octet string The management information definitions for the SNMP User based Security Model 26 system 9 1 4 1 timeticks 0 days 00h 00m 00s 04th 4 27 system 9 1 4 2 timeticks 0 days 00h 00m 00s 09th 9 28 system 9 1 4 3 timeticks 0 days 00h 00m 00s 09th 9 29 system 9 1 4 4 timeticks 0 days 00h 00m 00s 09th 9 30 system 9 1 4 5 timeticks 0 days 00h 00m 00s 09th 9 31 system 9 1 4 6 timeticks 0 days 00h 00m 00s 19th 19 32 system 9 1 4 7 timeticks 0 days 00h 00m 00s 22th 22 33 system 9 1 4 8 timeticks 0 days 00h 00m 00s 22th 22 34 system 9 1 4 9 timeticks 0 days 00h 00m 00s 22th 22 wee SNMP QUERY FINISHED Click on the following links for more information about MIB II and RS 232 like group http www fags org rfcs rfc1213 html http www fags org rfcs rfc1317 html gt UC 7420 7410 does NOT support SNMP trap The following tables list the variables supported by UC 7420 7410 4 19 UC 7420 7410 User s Manual Managing Communication Open VPN This function is only available for firmware version V1 5 and later versions OpenVPN provides two types of tunnels for users to implement VPNS Routed IP Tunnels and Bridged Ethernet Tunnels Here we describe the second type of tunnel To begin with check to make sure that the system has a virtual device dev net tun If not issue
Download Pdf Manuals
Related Search
Related Contents
Product Specification TraqDash User Manual.. Betriebsanleitung VUP de - Jucknieß Pumpen Patton PUH9442M-RM Use and Care Manual #75283 - Trailer-Mate PDF版取扱説明書 SEWICONZ USER MANUAL reseñas bibliográficas para elaborar guías de práctica clínica Global Upholstery Co. 5440LM-1 User's Manual Copyright © All rights reserved.
Failed to retrieve file