Moxa Technologies W406 Manual de usuario

Busca en linea o descarga Manual de usuario para Redes Moxa Technologies W406. Moxa Technologies W406 User`s manual Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 89
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 0
W406-LX
Users Manual
Second Edition, November 2009
www.moxa.com/product
© 2009 Moxa Inc. All rights reserved.
Reproduction without permission is prohibited.
Vista de pagina 0
1 2 3 4 5 6 ... 88 89

Indice de contenidos

Pagina 1 - User’s Manual

W406-LX User’s Manual Second Edition, November 2009 www.moxa.com/product © 2009 Moxa Inc. All rights reserved. Reproduction without permission is p

Pagina 2

W406-LX User’s Manual Getting Started 2-2Powering on the W406-LX Connect the SG wire to the shielded contact located in the upper left corner of the

Pagina 3 - Table of Contents

W406-LX User’s Manual Getting Started 2-3Once the connection is established, the following window will open. Acquiring the IP Address of the W406-L

Pagina 4

W406-LX User’s Manual Getting Started 2-4Please note that when you turn on a computer that is not connected to the local network or there is no DHCP

Pagina 5 - Introduction

W406-LX User’s Manual Getting Started 2-5SSH Console The W406-LX supports an SSH Console to provide users with better security options. Windows User

Pagina 6 - Software Architecture

W406-LX User’s Manual Getting Started 2-6NOTE SSH provides better security compared to Telnet for accessing the W406-LX’s console utility over the

Pagina 7

W406-LX User’s Manual Getting Started 2-7NOTE After changing the IP settings, use the networking restart command to activate the new IP address. Mo

Pagina 8 - Software Package

W406-LX User’s Manual Getting Started 2-8Setting Up the Wireless Module Before using the W406, make sure the SIM card is properly installed and the

Pagina 9 - Getting Started

W406-LX User’s Manual Getting Started 2-9Verifying the SIM Card Status Use the sim_get_pin_status command to check the SIM card status. Four possib

Pagina 10 - Powering on the W406-LX

W406-LX User’s Manual Getting Started 2-10 To disable PIN code authentication, use sim_enable_pin-d –p command.

Pagina 11

W406-LX User’s Manual Getting Started 2-11Changing the PIN Code Use sim_change_pin -o old PIN code –n new PIN code command to change the PIN code.

Pagina 12 - Telnet Console

W406-LX 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

Pagina 13 - SSH Console

W406-LX User’s Manual Getting Started 2-12Unlocking the SIM Card When your SIM has been locked, you will need to enter the PUK code to unlock your S

Pagina 14

W406-LX User’s Manual Getting Started 2-13Connecting to the Internet To create a connection, use the gprs_connect command. For more detailed comman

Pagina 15 - USB Port for Expansion

W406-LX User’s Manual Getting Started 2-14Reconnecting to the Internet When an internet connection has been broken, use the gprs_reconnect –t seco

Pagina 16 - Entering the PIN Code

W406-LX User’s Manual Getting Started 2-15Detecting an Internet Connection Error To diagnose a connection problem, use the gprs_diagnose command. Th

Pagina 17

W406-LX User’s Manual Getting Started 2-16Sending and Reading an SMS Message To send an SMS message, use the sms_send_text_msg command. For example,

Pagina 18

W406-LX User’s Manual Getting Started 2-17Deleting an SMS Message To delete an SMS message, use the sms_remove_msg command. For example, the sms_rem

Pagina 19 - Changing the PIN Code

W406-LX User’s Manual Getting Started 2-18Installing the Tool Chain (Linux) The Linux Operating System must be pre-installed in the PC before instal

Pagina 20 - Unlocking the SIM Card

W406-LX User’s Manual Getting Started 2-19Compiling Hello.c The package CD contains several example programs. Here we use hello.c as an example to s

Pagina 21 - Connecting to the Internet

33 Chapter 3 Managing Embedded Linux This chapter includes information about version control, deployment, updates, and peripherals. The informatio

Pagina 22

W406-LX User’s Manual Managing Embedded Linux 3-2System Version Information To determine the hardware capability of your W406-LX, and what kind of s

Pagina 23

Table of Contents Chapter 1 Introduction ...1-1 Overv

Pagina 24

W406-LX User’s Manual Managing Embedded Linux 3-3Since different Flash disks have different sizes, it’s a good idea to check the size of your Flash

Pagina 25 - Deleting an SMS Message

W406-LX User’s Manual Managing Embedded Linux 3-4150 Opening data connection for W406-x.x.x.hfm 226 Transfer complete. 13167772 bytes received in 2

Pagina 26 - />df –h

W406-LX User’s Manual Managing Embedded Linux 3-5Type the command “ps” to list all processes currently running. 192.168.3.127 – PuTTY root@Moxa:~

Pagina 27 - Compiling Hello.c

W406-LX User’s Manual Managing Embedded Linux 3-6The enabled daemons will be available after you reboot the system. 192.168.3.127 – PuTTY root@Mo

Pagina 28 - Managing Embedded Linux

W406-LX User’s Manual Managing Embedded Linux 3-7 192.168.3.127 – PuTTY root@Moxa:/ect/rc.d/rc3.d# ls S19nfs-common S25nfs-user-server S99showre

Pagina 29 - System Version Information

W406-LX User’s Manual Managing Embedded Linux 3-8The following figure illustrates how to update the system time and set the RTC time. 192.168.3.1

Pagina 30

W406-LX User’s Manual Managing Embedded Linux 3-9Updating the Time Automatically In this subsection, we show how to use a shell script to update the

Pagina 31 - Loading Factory Defaults

W406-LX User’s Manual Managing Embedded Linux 3-10STEP5: Enable cron when the system boots up. Add the following line in the file /etc/rc.d/rc.local

Pagina 32

44 Chapter 4 Managing Communications In this chapter, we explain how to configure the W406-LX’s various communication functions. The following top

Pagina 33 - Setting the Run-Level

W406-LX User’s Manual Managing Communications 4-2Telnet / FTP In addition to supporting Telnet client/server and FTP client/server, the W406-LX also

Pagina 34 - Adjusting the System Time

Chapter 4 Managing Communications ...4-1 Telnet / FTP ...

Pagina 35 - NTP Client

W406-LX User’s Manual Managing Communications 4-3Web Service—Apache The Apache web server’s main configuration file is /etc/apache/conf/httpd.conf,

Pagina 36

W406-LX User’s Manual Managing Communications 4-4To open the default CGI page, type http://192.168.13.23/cgi-bin/test-cgi in your browser’s address

Pagina 37 - /etc/init.d/cron start

W406-LX User’s Manual Managing Communications 4-5Install PHP for Apache Web Server This embedded computer supports the PHP option. However, since th

Pagina 38 - Managing Communications

W406-LX User’s Manual Managing Communications 4-6IPTABLES IPTABLES is an administrative tool for setting up, maintaining, and inspecting the Linux k

Pagina 39 - Telnet / FTP

W406-LX User’s Manual Managing Communications 4-7The following figure shows the IPTABLES hierarchy. Incoming Packets Mangle Table PREROUT

Pagina 40 - Web Service—Apache

W406-LX User’s Manual Managing Communications 4-8 The W406-LX supports the following sub-modules. Be sure to use the module that matches your applic

Pagina 41

W406-LX User’s Manual Managing Communications 4-9Since the IPTABLES command is very complex, to illustrate the IPTABLES syntax we have divided our d

Pagina 42

W406-LX User’s Manual Managing Communications 4-10Append or delete rules: Usage: # iptables [-t table] [-AI] [INPUT, OUTPUT, FORWARD] [-io interface

Pagina 43 - IPTABLES

W406-LX User’s Manual Managing Communications 4-11NAT Example The IP address of LAN1 is changed to 192.168.3.127 (you will need to load the module i

Pagina 44

W406-LX User’s Manual Managing Communications 4-12echo “1” > /proc/sys/net/ipv4/ip_forward /bin/iptables -F /bin/iptables -X /bin/iptables -Z

Pagina 45

11 Chapter 1 Introduction The W406-LX is an embedded computer that features 2 software selectable RS-232/422/485 ports, 1 Ethernet port, and quad-

Pagina 46

W406-LX User’s Manual Managing Communications 4-13Double quotes—don’t wait for a prompt, but proceed with the following instead (note that you must

Pagina 47 - Append or delete rules:

W406-LX User’s Manual Managing Communications 4-14How to check the connection Once you’ve set up a PPP connection, there are some steps you can take

Pagina 48 - Enabling NAT at Bootup

W406-LX User’s Manual Managing Communications 4-15Setting up a Machine for Incoming PPP Connections This first example applies to using a modem, and

Pagina 49 - Dial-up Service—PPP

W406-LX User’s Manual Managing Communications 4-164. Edit the file /etc/ppp/pap-secrets and add the following: “[email protected]” * “password” *

Pagina 50

W406-LX User’s Manual Managing Communications 4-176. Add the following files: /etc/ppp/options.eth0. The file context is shown below: 7. Set up D

Pagina 51 - How to check the connection

W406-LX User’s Manual Managing Communications 4-18NFS (Network File System) The Network File System (NFS) is used to mount a disk partition on a rem

Pagina 52 - * * ““ *

W406-LX User’s Manual Managing Communications 4-19SNMP The W406-LX has built-in SNMP V1 (Simple Network Management Protocol) agent software. It supp

Pagina 53

W406-LX User’s Manual Managing Communications 4-20192.168.3.120 – Putty Installing libmysqlclient5 (5.1.23) to root... Stopping web server: apache.

Pagina 54

W406-LX User’s Manual Managing Communications 4-21Setup 1: Ethernet Bridging for Private Networks on Different Subnets 1. Set up four machines, as

Pagina 55 - NFS (Network File System)

W406-LX User’s Manual Managing Communications 4-22 address ) IPADDR=$f2 ;; netmask ) NETMASK=$f2 ;; broadcast ) BROADCAST

Pagina 56 - Package Management—ipkg

W406-LX User’s Manual Introduction 1-2Overview The W406-LX embedded computers, which are designed for industrial automation applications, feature 2

Pagina 57 - OpenVPN

W406-LX User’s Manual Managing Communications 4-23 ifconfig tap${i} 0.0.0.0 promisc up i=`expr $i + 1` if [ $i -ge $maxtap ]; then break

Pagina 58 - InternetInternet

W406-LX User’s Manual Managing Communications 4-243. Create a configuration file named A-tap0-br.conf and an executable script file named A-tap0-br

Pagina 59

W406-LX User’s Manual Managing Communications 4-25Interface eth1 is connected to the bridging interface br0, to which device tap0 also connects, whe

Pagina 60

W406-LX User’s Manual Managing Communications 4-26Setup 3: Routed IP 1. Set up the four machines as shown in the following diagram: OpenVPN AOpenVP

Pagina 61

W406-LX User’s Manual Managing Communications 4-27Note that the parameter “ifconfig” defines the first argument as the local internal interface and

Pagina 62 - # killall -TERM openvpn

55 Chapter 5 Development Tool Chains This chapter describes how to install a tool chain in the host computer that you use to develop your applicat

Pagina 63

W406-LX Linux User’s Manual Development Tool Chains 5-2Linux Tool Chain The Linux tool chain contains a suite of cross compilers and other tools, as

Pagina 64 - # route

W406-LX Linux User’s Manual Development Tool Chains 5-3The following cross compiler tools are provided with a prefix “arm-linux-“. ar Manages archiv

Pagina 65 - Development Tool Chains

66 Chapter 6 Programmer’s Guide This chapter includes important information for programmers. The following functions are covered in this chapter:

Pagina 66 - Linux Tool Chain

W406-LX Linux User’s Manual Programmer’s Guide 6-2Flash Memory Map Partition sizes are hard coded into the kernel binary. To change the partition si

Pagina 67 - On-Line Debugging with GDB

W406-LX User’s Manual Introduction 1-3The W406-LX’s built-in Flash ROM is partitioned into Boot Loader, Linux Kernel, Root File System, and User dir

Pagina 68 - Programmer’s Guide

W406-LX Linux User’s Manual Programmer’s Guide 6-3Buzzer The device node is located at /dev/console. The W406-LX supports Linux standard buzzer cont

Pagina 69 - RTC (Real Time Clock)

W406-LX Linux User’s Manual Programmer’s Guide 6-4Example to set the baudrate #include <moxadevice.h> #include <termios.h> struct termio

Pagina 70

W406-LX Linux User’s Manual Programmer’s Guide 6-5Digital I/O Digital Output channels can be set to high or low. The channels are controlled by the

Pagina 71 - Special Note

W406-LX Linux User’s Manual Programmer’s Guide 6-6int set_din_event(int diport, void (*func)(int diport), int mode, long int duration) Description:

Pagina 72 - Digital I/O

W406-LX Linux User’s Manual Programmer’s Guide 6-7(1): from high to low DIN_EVENT_LOW_TO_HIGH(0): from low to high DIN_EVENT_CLEAR(-1): clear this e

Pagina 73

W406-LX Linux User’s Manual Programmer’s Guide 6-82. get now data. \n\ 3. set low to high event \n\ 4. clear event \n\ 5. set high data. \n\ 6. set

Pagina 74 - Examples

W406-LX Linux User’s Manual Programmer’s Guide 6-9scanf("%d", &i); retval=set_dout_state(i, 1); } else if ( i == 6 ) { // set low data

Pagina 75

W406-LX Linux User’s Manual Programmer’s Guide 6-10case DIO_ERROR_DURATION: printf("DIO error duratoin\n"); case DIO_ERROR_DURATION_20MS:

Pagina 76

W406-LX Linux User’s Manual Programmer’s Guide 6-11 Closes a cellular modem handle. void cellular_modem_close(unsigned int fd); Inputs: <fd>

Pagina 77 - C Library

W406-LX Linux User’s Manual Programmer’s Guide 6-12 Aborts a GPRS connection. int cellular_modem_gprs_abort_connection(unsigned int fd); Inputs: <

Pagina 78

W406-LX User’s Manual Introduction 1-4 Although JFFS2 is a journaling file system, this does not preclude the loss of data. The file system will rem

Pagina 79

W406-LX Linux User’s Manual Programmer’s Guide 6-13 Gets the storage base of SIM messages. int cellular_modem_sms_get_storage_base(unsigned int fd);

Pagina 80

W406-LX Linux User’s Manual Programmer’s Guide 6-14 Receives an indexed SMS message. int cellular_modem_sms_recv_message(unsigned int fd, int index,

Pagina 81

W406-LX Linux User’s Manual Programmer’s Guide 6-15 When the SIM card status is set to PIN (2), this function retrieves the available PIN code attem

Pagina 82

W406-LX Linux User’s Manual Programmer’s Guide 6-16 When the SIM card status is ready (0) and the PIN code is enabled, this function assigns a PIN c

Pagina 83

W406-LX Linux User’s Manual Programmer’s Guide 6-17 Sets the UART interface. BOOL uart_setmode(int port, int mode); Inputs: <port> the serial

Pagina 84

W406-LX Linux User’s Manual Programmer’s Guide 6-18 Gets one of the DIN inputs. int mxdio_get_din(HANDLE hDIO, unsigned int port); Inputs: <hDIO&

Pagina 85

W406-LX Linux User’s Manual Programmer’s Guide 6-19Buzzer Turns on the buzzer. void mxbeep_on(void); Inputs: None Return Values: None Remark: Turn

Pagina 86

77 Chapter 7 Software Lock “Software Lock” is an innovative technology developed by the Moxa engineering force. It can be adopted by a system inte

Pagina 87 - Software Lock

AA Appendix A System Commands Linux normal command utility collection File manager 1. cp copy file 2. ls list file 3. ln make symbolic link fi

Pagina 88 - System Commands

W406-LX Linux User’s Manual System Commands A-2Process 1. kill kill process 2. ps display now running process Other 1. dmesg dump kernel log me

Pagina 89 - Moxa special utilities

22 Chapter 2 Getting Started In this chapter, we explain how to connect the W406-LX, how to turn on the power, how to get started programming, and

Comentarios a estos manuales

Sin comentarios