DA-683 Series Linux User's Manual: Fourth Edition, August 2012
DA-683 Series Linux User's Manual: Fourth Edition, August 2012
DA-683 Series Linux User's Manual: Fourth Edition, August 2012
www.moxa.com/product
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
Trademarks
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 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 technical 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.
www.moxa.com/support
Moxa Americas Moxa China (Shanghai office)
Toll-free: 1-888-669-2872 Toll-free: 800-820-5036
Tel: +1-714-528-6777 Tel: +86-21-5258-9955
Fax: +1-714-528-6778 Fax: +86-21-5258-5505
Thank you for purchasing a Moxa DA-683 x86 ready-to-run embedded computer. This manual introduces the
software configuration and management of the DA-683-LX, which runs the Linux operating system. For
hardware installation, connector interfaces, setup, and upgrading the BIOS, please refer to the “DA-683
Hardware User’s Manual.”
Linux is an open, scalable operating system that allows you to build a wide range of innovative, small footprint
devices. Software written for desktop PCs can be easily ported to the Linux computer with a GNU cross compiler
and a minimum of source code modifications. A typical Linux-based device is designed for a specific use, and
is often not connected to other computers, or a number of such devices connect to a centralized, front-end host.
Examples include enterprise tools such as industrial controllers, communications hubs, point-of-sale terminals,
and display devices, which include HMIs, advertisement appliances, and interactive panels.
Overview
Software Specifications
Software Components
DA-683-LX Introduction
Overview
DA-683 embedded computers are based on the Intel Atom D510 x86 processor and feature two serial ports,
dual 10/100 or 10/100/1000 Mbps LAN ports, four USB 2.0 hosts, and CF socket. The DA-683 series offers both
VGA and DVI-I outputs, making it exceptionally well suited for industrial applications such as SCADA and
factory automation.
The DA-683's two RS-232 ports make it ideal for connecting a wide range of serial devices, and the dual
10/100/1000 Mbps Ethernet ports offer a reliable solution for network redundancy, which taken together
promise continuous data communication and management operations. For added convenience, the DA-683
comes with 4 DIs and 4 DOs for connecting digital input/output devices. In addition, the SD, SATA HDD, and
USB ports provide DA-683 computers with data buffering and storage expansion, which provide the necessary
reliability for industrial applications.
Pre-installed with Linux, the DA-683 Series provides programmers with a friendly environment for developing
sophisticated, bug-free application software at a lower cost.
The DA-683's DPP-T models support a wide operating temperature range of -40 to 70°C for use in harsh
industrial environments.
Software Specifications
The Linux operating system pre-installed on the DA-683 embedded computer is the Debian Lenny
5.0 distribution. The Debian project is a worldwide group of volunteers who endeavor to produce an operating
system distribution that composed entirely of free software. The Debian GNU/Linux follows the standard Linux
architecture, making it easy to use programs that meet the POSIX standard. Program porting is possible with
the GNU Tool Chain provided by Moxa. In addition to Standard POSIX APIs, device drivers for Moxa UART and
other special peripherals are also included. The following is a software architecture example:
Protocol Stack TCP, IP, UDP, CMP, ARP, HTTP, SNMP, SMTP File
System
Linux Device Driver CF, USB, UART, RTC, VGA
Kernel
Micro Kernel Memory Control, Schedule, Process
ATTENTION
Refer to http://www.debian.org/ and http://www.gnu.org/ for information and documentation of the Debian
GNU/Linux and free software concept.
ATTENTION
The above software architecture is only an example. Different models or different build revisions of the Linux
operating system may include components not shown in the above graphic.
1-2
DA-683-LX Introduction
Software Components
The DA-683-LX pre-installed Debian Lenny 5.0 Linux distribution. For the software components, see Appendix
A.
1-3
2
2. Software Configuration
In this chapter, we explain how to operate a DA-683-LX computer directly or your desktop. There are three
ways to connect to the DA-683-LX computer: through VGA monitor, by using Telnet over the network, or by
using an SSH console from a Windows or Linux machine. This chapter describes basic Linux operating system
configurations. The advanced network management and configuration will be described in the next chapter
“Managing Communications.”
Moxa:~# umount /
To log in, type the login name and password as requested. The default values are both root.
Login: root
Password: root
2-2
DA-683-LX Software Configuration
Use a crossover Ethernet cable to connect your development workstation directly to the target computer, or
use a straight-through Ethernet cable to connect the computer to a LAN hub or switch. Next, use a Telnet client
on your development workstation to connect to the target computer. After a connection has been established,
type the login name and password as requested to log on to the computer. The default values are both root.
Login: root
Password: root
2-3
DA-683-LX Software Configuration
Windows Users
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 the DA-683-LX in a Windows environment. The
following screen shows an example of the configuration that is required.
Linux Users
From a Linux machine, use the ssh command to access the V2101-LX’s console utility via SSH.
#ssh 192.168.3.127
2-4
DA-683-LX Software Configuration
# date MMDDhhmmYYYY
MM: Month
DD: Date
YYYY: Year
Use the following command to write the current system time to the RTC.
# hwclock –w
MOXA:~# date
Wed Dec 16 03:34:46 CST 2009
MOXA:~# hwclock
Wed 16 Dec 2009 03:35:16 AM CST -0.017600 seconds
MOXA:~# date 121616352009
Wed Dec 16 16:35:00 CST 2009
MOXA:~# hwclock –w
MOXA:~# date ; hwclock
Wed Dec 16 16:36:12 CST 2009
Wed 16 Dec 2009 03:38:13 AM CST -0.016751 seconds
NTP Client
The DA-683-LX has a built-in NTP (Network Time Protocol) client that is used to initialize a time request to a
remote NTP server. Use ntpdate 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.
2-5
DA-683-LX Software Configuration
ATTENTION
Before using the NTP client utility, check your IP address and network settings (gateway and DNS) to make
sure an Internet connection is available.
#!/bin/sh
ntpdate time.stdtime.gov.tw
# /etc/resolv.conf file.
hwclock –w
sleep 100
Save the shell script using any file name. For example, fixtime.
How to run the shell script automatically when the kernel boots up
Because the root file system is mounted in Read-only mode, we need to re-mount it using writable permission.
Copy the example shell script fixtime to directory /etc/init.d, and then use chmod 755 fixtime to change
the shell script mode.
# vi /etc/inittab
After you finish writing or modifying the code, remember to execute “umount /” to change the root directory
back to Read-only mode.
# umount /
# init q
PTP Slave
The DA-683-LX has a built-in PTP ( Precision Time Protocol) slave that is used to initialize a time request to a
remote PTP server. Use ptpv2d to update the system time.
# ptpv2d –g
2-6
DA-683-LX Software Configuration
The DA-683-LX comes with a GUI-based configuration tool for IEEE 1588v2 settings. Please refer to the
Appendix B for detailed configuration procedure.
2-7
DA-683-LX Software Configuration
Moxa:~# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 00:02 ? 00:00:00 init [2]
root 2 0 0 00:02 ? 00:00:00 [kthreadd]
root 3 2 0 00:02 ? 00:00:00 [migration/0]
root 4 2 0 00:02 ? 00:00:00 [ksoftirqd/0]
root 5 2 0 00:02 ? 00:00:00 [watchdog/0]
root 6 2 0 00:02 ? 00:00:00 [migration/1]
root 7 2 0 00:02 ? 00:00:00 [ksoftirqd/1]
root 8 2 0 00:02 ? 00:00:00 [watchdog/1]
root 9 2 0 00:02 ? 00:00:00 [events/0]
root 10 2 0 00:02 ? 00:00:00 [events/1]
root 11 2 0 00:02 ? 00:00:00 [cpuset]
root 12 2 0 00:02 ? 00:00:00 [khelper]
root 13 2 0 00:02 ? 00:00:00 [netns]
root 14 2 0 00:02 ? 00:00:00 [async/mgr]
root 15 2 0 00:02 ? 00:00:00 [pm]
root 17 2 0 00:02 ? 00:00:00 [sync_supers]
root 18 2 0 00:02 ? 00:00:00 [bdi-default]
root 19 2 0 00:02 ? 00:00:00 [kintegrityd/0]
root 20 2 0 00:02 ? 00:00:00 [kintegrityd/1]
root 21 2 0 00:02 ? 00:00:00 [kblockd/0]
root 22 2 0 00:02 ? 00:00:00 [kblockd/1]
root 23 2 0 00:02 ? 00:00:00 [kacpid]
root 24 2 0 00:02 ? 00:00:00 [kacpi_notify]
root 25 2 0 00:02 ? 00:00:00 [kacpi_hotplug]
root 26 2 0 00:02 ? 00:00:00 [ata/0]
root 27 2 0 00:02 ? 00:00:00 [ata/1]
...
www-data 2707 2664 0 00:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 2708 2664 0 00:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 2709 2664 0 00:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 2710 2664 0 00:03 ? 00:00:00 /usr/sbin/apache2 -k start
root 2720 2700 0 00:15 tty1 00:00:00 -bash
root 2724 2 0 00:15 ? 00:00:00 [flush-8:0]
root 2745 2536 1 00:21 ? 00:00:00 sshd: root@pts/0
root 2747 2745 0 00:21 pts/0 00:00:00 -bash
To run a private daemon, you can edit the file rc.local as follows:
Because the root file system is mounted in Read-only mode, you need to re-mount it with write permission.
MOXA:~# cd /etc/
MOXA:/etc/# vi rc.local
Next, add the application daemon that you want to run. We use the example program tcps2-release, which
you can find in the CD to illustrate, and configure it to run in the background.
2-8
DA-683-LX Software Configuration
# !/bin/sh
# Add the daemon you want to run
/root/tcps2-release &~
After you finish writing or modifying the code, remember to execute “umount /” to change the root directory
back to Read-only mode.
MOXA:~# umount /
You should be able to find the enabled daemon after you reboot the system.
Moxa:~# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 00:02 ? 00:00:00 init [2]
root 2 0 0 00:02 ? 00:00:00 [kthreadd]
root 3 2 0 00:02 ? 00:00:00 [migration/0]
root 4 2 0 00:02 ? 00:00:00 [ksoftirqd/0]
root 5 2 0 00:02 ? 00:00:00 [watchdog/0]
root 6 2 0 00:02 ? 00:00:00 [migration/1]
root 7 2 0 00:02 ? 00:00:00 [ksoftirqd/1]
root 8 2 0 00:02 ? 00:00:00 [watchdog/1]
root 9 2 0 00:02 ? 00:00:00 [events/0]
root 10 2 0 00:02 ? 00:00:00 [events/1]
root 11 2 0 00:02 ? 00:00:00 [cpuset]
root 12 2 0 00:02 ? 00:00:00 [khelper]
root 13 2 0 00:02 ? 00:00:00 [netns]
root 14 2 0 00:02 ? 00:00:00 [async/mgr]
root 15 2 0 00:02 ? 00:00:00 [pm]
root 17 2 0 00:02 ? 00:00:00 [sync_supers]
root 18 2 0 00:02 ? 00:00:00 [bdi-default]
root 19 2 0 00:02 ? 00:00:00 [kintegrityd/0]
root 20 2 0 00:02 ? 00:00:00 [kintegrityd/1]
root 21 2 0 00:02 ? 00:00:00 [kblockd/0]
root 22 2 0 00:02 ? 00:00:00 [kblockd/1]
root 23 2 0 00:02 ? 00:00:00 [kacpid]
root 24 2 0 00:02 ? 00:00:00 [kacpi_notify]
root 25 2 0 00:02 ? 00:00:00 [kacpi_hotplug]
root 26 2 0 00:02 ? 00:00:00 [tcps2-release]
root 27 2 0 00:02 ? 00:00:00 [ata/0]
root 28 2 0 00:02 ? 00:00:00 [ata/1]
...
www-data 2707 2664 0 00:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 2708 2664 0 00:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 2709 2664 0 00:03 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 2710 2664 0 00:03 ? 00:00:00 /usr/sbin/apache2 -k start
root 2720 2700 0 00:15 tty1 00:00:00 -bash
root 2724 2 0 00:15 ? 00:00:00 [flush-8:0]
root 2745 2536 1 00:21 ? 00:00:00 sshd: root@pts/0
2-9
DA-683-LX Software Configuration
#cd /etc/rc2.d
or
MOXA:~# cd /etc/rc2.d
MOXA:/etc/rc2.d#
MOXA:/etc/rc2.d# ls
S19nfs-common S25nfs-user-server S99showreadyled
S20snmpd S55ssh
S24pcmcia S99rmnologin
MOXA:/etc/rc2.d#
MOXA:/etc/rc2.d# ln –s /root/tcps2-release S60tcps2
MOXA:/etc/rc2.d# ls
S19nfs-common S25nfs-user-server S99rmnologin
S20snmpd S55ssh S99showreadyled
S24pcmcia S60tcps2
To remove the daemon, remove the run file from /etc/rc2.d by using the following command:
MOXA:~# rm –f /etc/rc2.d/S60tcps2
After you finish writing or modifying the code, remember to execute “umount /” to change the root directory
back to Read-only mode.
MOXA:~# umount /
2-10
DA-683-LX Software Configuration
Cron wakes up every minute and checks each command to see if it should be run in that 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/crontab to set up your scheduled applications. Crontab files have the following format:
mm h dom mon dow user command
minute 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 to update the system time and RTC time every day at
8:00.
* 8 * * * root /home/fixtime.sh
MOXA:~# mount
/dev/hda1 on / type ext2 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/hdb2 on /home type ext2 (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda1 on /media/usb0 type vfat
(rw,noexec,nodev,sync,noatime,gid=25,dmask=0007,fmask=0117)
/dev/sdb1 on /media/usb1 type vfat
(rw,noexec,nodev,sync,noatime,gid=25,dmask=0007,fmask=0117)
2-11
DA-683-LX Software Configuration
Note that usbmount is a light-weight solution on text mode and does not fully support gnome desktop
environment. For better supportability, you can install gnome-volume-manager instead of usbmount:
ATTENTION
Remember to type the command # sync before you disconnect the USB storage device. If you do not issue the
command, you may lose data.
ATTENTION
Remember to exit the /media/usb0 or /media/usb1 directory when you disconnect the USB storage device. If
you stay in /media/usb0 or /media/usb1, the automatic un-mount process will fail. If that happens, type #
umount /media/usb0 to un-mount the USB device manually.
After rebooting, the CF card will auto mount at /media/cfn(here n is the number of partition).
This is because a udev rule to support this feature in /etc/udev/rules.d/96-moxa.rules:
…
# CF automount for DA-683
KERNEL=="sd*[1-9]" KERNELS=="1:0:1:0", RUN+="/bin/mount /dev/%k /media/cf%n"
ATTENTION
If you do not want to mount CF card automatically, just comment the rule in
/etc/udev/rules.d/96-moxa.rules.
MOXA:~# uname -a
Linux Moxa 2.6.32 #1 SMP Thu Nov 18 13:13:04 CST 2010 i686 GNU/Linux
MOXA:~#
2-12
DA-683-LX Software Configuration
MOXA:~# vi /etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux 5.0.2a _Lenny_ - Official i386 NETINST Binary-1
20090817-16:43]/ lenny main
Once you indicate which package you want to install (openswan, for example), type:
If the installation is complete, remember to umount the root directory back to read-only mode.
MOXA:~# umount /
MOXA:~#
ATTENTION
The APT cache space /var/cache/apt is located in tmpfs. If you need to install a huge package, link
/var/cache/apt to USB mass storage or mount it to an NFS space to generate more free space. Use df –h to
check how much free space is available on tmpfs.
2-13
DA-683-LX Software Configuration
Moxa:~# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 1.5G 1001M 440M 70% /
udev 10M 748K 9.3M 8% /dev
/dev/sda1 1.5G 1001M 440M 70% /
tmpfs 501M 0 501M 0% /lib/init/rw
tmpfs 501M 0 501M 0% /dev/shm
none 501M 19M 482M 4% /tmp
/dev/sda2 270M 130M 126M 51% /home
ATTENTION
You can free up the cache space with the command # apt-get clean
Device Suspend
The DA-683-LX supports ACPI S3 (suspend to ram), You should enable option S3 in the BIOS, and use
“pm-suspend --qurik-s3-bios --qurik-s3-mode” command.
After suspend, you can press the power button to wake up the computer.
If you login in as administrator (root) in X windows, you can use System -> Shutdown> Suspend to suspend
your device. Note: This does not work for non-root users,.
Some components on Moxa’s embedded computer may need to be reset after resuming. You can write a simple
script in the directory /usr/lib/pm-utils/sleep.d/ to complete this procedure. For example, you could
create a script 99serial for your application.
#!/bin/sh
case "$1" in
hibernate|suspend)
echo "close AP and tty ports which are opened"
echo "operations before serial ports suspend"
;;
thaw|resume)
echo "restart AP"
echo "operations after serial ports resume"
;;
Note: If you want to see how to execute the script, start rsyslogd with command “/etc/init.d/rsyslogd start” and
view the file /var/log/pm-suspend.log.
2-14
DA-683-LX Software Configuration
Wake on LAN
The DA-683-LX supports wake on LAN, a feature to wake up a device for suspend (S3) and shutdown (S5).
To check the WOL support on Ethernet port x, type “ethtool ethx” (x is the port number).
As you can see, the default WOL support is ug (wake on unicast message and Magic packet).
We suggest that you only enable wake up on magic packet. Modify the default setting with the command
“ ethtool -s ethx wol g.”
2. Remote computer
For example:
etherwake -b 00:90:e8:00:d7:07
2. Remote computer
For example:
etherwake -b 00:90:e8:00:d7:07
2-15
3
3. Managing Communications
This file shows system has detected two Ethernet interfaces now.
ATTENTION
When replacing or connecting a network interface, the system may keep the old record in
/etc/udev/rules.d/70-persistent-net.rules and that cause network interfaces are detected abnormally. To solve
this problem, clear the file /etc/udev/rules.d/70-persistent-net.rules and reboot the system.
These network settings can be modified by changing the interfaces configuration file, or they can be adjusted
temporarily with the ifconfig command.
MOXA:~# cd /etc/network
2. Type vi interfaces to edit the network configuration file with vi editor. You can configure the DA-683-LX's
Ethernet ports for static or dynamic (DHCP) IP addresses.
MOXA:/etc/network# vi interfaces
Static IP Address
As shown in the example shown below, the default static IP addresses can be modified.
3-2
DA-683-LX Managing Communications
auto eth1
iface eth1 inet static
address 192.168.4.127
netmask 255.255.255.0
broadcast 192 168 4 255
To configure one or both LAN ports to request an IP address dynamically, replace static with dhcp and then
delete the rest of the lines.
After modifying the boot settings of the LAN interface, issue the following command to activate the LAN settings
immediately.
# /etc/init.d/networking restart
Telnet/FTP Server
In addition to supporting Telnet client/server and FTP client/server, the DA-683-LX also supports SSH and sftp
client/server. To enable or disable the Telnet/ftp server, you need to edit the file /etc/inetd.conf.
3-3
DA-683-LX Managing Communications
MOXA:~# cd /etc
MOXA:/etc# vi inetd.conf
The following example shows the default content of the file /etc/inetd.conf. The default is to “enable the
Telnet/tftp server:”
Disable the daemon by typing “#” in front of the first character of the row to comment out the line. For example,
to disable the TFTP server, use the following commands:
After you finish writing or modifying the code, remember to execute “umount /” to change the root directory
back to Read-only mode.
MOXA:~# umount /
DNS Client
The DA-683-LX supports DNS client (but not DNS server). To set up DNS client, you need to edit three
configuration files: /etc/hostname, /etc/resolv.conf, and /etc/nsswitch.conf.
/etc/hostname
2. Edit /etc/hostname:
MOXA:~# vi /etc/hostname
MOXA
3. After you finish writing or modifying the code, remember to execute “umount /” to change the root directory
back to Read-only mode.
MOXA:~# umount /
3-4
DA-683-LX Managing Communications
MOXA:~# hostname
/etc/resolv.conf
This is the most important file that you need to edit when using DNS. For example, before you using # ntpdate
time.stdtime.gov.tw 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 address is specified
with the nameserver command. For example, add the following line to /etc/resolv.conf (assuming the DNS
server’s IP address is 168.95.1.1):
nameserver 168.95.1.1
/etc/nsswitch.conf
This file defines the sequence of files, /etc/hosts or /etc/resolv.conf, to be read to resolve the IP address.
The hosts line in /etc/nsswitch.conf means use /etc/host first and DNS service to resolve the address.
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
3-5
DA-683-LX Managing Communications
Default Homepage
The Apache web server’s main configuration file is /etc/apache2/sites-enabled/000-default, with the
default homepage located at /var/www/apache2-default/index.html.
/var/www/apache2-default
/var/www/apache2-default/cgi-bin/
Before you modify the homepage, use a browser (such as Microsoft Internet Explorer or Mozilla Firefox) from
your PC to test if the Apache web server is working. Type the LAN1 IP address in the browser’s address box to
open the homepage. For example, if the default IP address 192.168.3.127 is still active, type:
http://192.168.3.127/
http://192.168.3.127/cgi-bin/w3mmail.cgi
MOXA:/etc# vi /etc/apache2/sites-available/default
#ScriptAlias /cgi-bin/ /var/www/apache2-default/cgi-bin/
#<Directory "/var/www/apache2 default/cgi-bin/">
# AllowOverride None
# Options ExecCGI -MultiViews +SymLinksIFOwnerMatch
# #Order allow,deny
# Order deny,allow
# Allow from all
3-6
DA-683-LX Managing Communications
3. After you finish writing or modifying the code, remember to execute “umount /” to change the root
directory back to Read-only mode.
MOXA:~# umount /
ATTENTION
When you develop your own CGI application, make sure your CGI file is executable.
1. Prepare the web pages and then save the pages to the USB storage device. Click on the following link to
download the web page test suite: http://www.w3.org/MarkUp/Test/HTML401.zip.
2. Uncompress the zip file to your desktop PC, and then use FTP to transfer it to the
DA-683-LX's /media/usb0 directory.
3. Mount the root file system with write permission.
3-7
DA-683-LX Managing Communications
...
<VirtualHost *:80>
...
...
DocumentRoot /media/usb0/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
...
...
ScriptAlias /cgi-bin/ /media/usb0/www/cgi-bin/
<Directory "/media/usb0/www/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
...
</VirtualHost>
...
<VirtualHost *:443>
...
...
DocumentRoot /media/usb0/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
...
...
ScriptAlias /cgi-bin/ /media/usb0/www/cgi-bin/
<Directory "/media/usb0/wwwz/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
7. Open your browser and connect to the DA-683-LX by typing the current LAN1 IP address in the browser’s
address box.
8. After finishing modification or writing, remember to execute “umount /” to change the root directory back
to Read-only mode.
MOXA:~# umount /
ATTENTION
Visit the Apache website at http://httpd.apache.org/docs/ for more information about setting up Apache
servers.
3-8
DA-683-LX Managing Communications
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.
The DA-683-LX supports three types of IPTABLES: Filter tables, NAT tables, and Mangle tables.
INPUT chain
OUTPUT chain
FORWARD chain
POSTROUTING chain—works after the routing process and before the Ethernet device process to transfer
Sub-tables
MASQUERADE—a special form for SNAT. If one host can connect to the Internet, then the other computers that
connect to this host can connect to the Internet when 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.
3-9
DA-683-LX Managing Communications
IPTABLES Hierarchy
The following figure shows the IPTABLES hierarchy.
Incoming
Mangle Table
NAT Table
Mangle Table
NAT Table
Filter Table
NAT Table
Outgoing
IPTABLES Modules
DA-683-LX supports the following sub-modules. Be sure to use the module that matches your application.
3-10
DA-683-LX Managing Communications
# lsmod
# modprobe ip_tables
# modprobe iptable_filter
#modprobe iptable_mangle
#modprobe iptable_nat
Use lsmod to check if the ip_tables module has already been loaded in the DA-683-LX. Use modprobe to
insert and enable the module.
ATTENTION
IPTABLES plays the role of packet filtering or NAT. Be careful when setting up the IPTABLES rules. If the rules
are not correct, remote hosts that connect via a LAN or PPP may be denied. We recommend using the VGA
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.
-L [chain]: List List all rules in selected chains. If no chain is selected, all chains are listed.
-F: Flush the selected chain (all the chains in the table if none is listed).
-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
3-11
DA-683-LX Managing Communications
# iptables [-t tables] [-P] [INPUT, OUTPUT, FORWARD, PREROUTING, OUTPUT, POSTROUTING]
[ACCEPT, DROP]
-P: Set the policy for the chain to the given target.
Examples:
In this example, the policy accepts outgoing packets and denies incoming packets.
# 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.
-s: Source address (network name, host name, network IP address, or plain IP address).
-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:
3-12
DA-683-LX Managing Communications
Example 6: Accept TCP packets from 192.168.0.24 to DA-683-LX's port 137, 138, 139
ATTENTION
In Example 8, remember to issue the command # modprobe ipt_mac first to load the module ipt_mac.
ATTENTION
Click on the following links for more information about NAT.
http://www.netfilter.org/documentation/HOWTO//packet-filtering-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):
3-13
DA-683-LX Managing Communications
#!/bin/bash
# If you put this shell script in the /home/nat.sh
# Remember to chmod 744 /home/nat.sh
# Edit the rc.local file to make this shell startup automatically.
# vi /etc/rc.local
# Add a line in the end of rc.local /home/nat.sh
# Here 2> /dev/null means the standard error messages will be dump to null device.
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export PATH
echo “1” > /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
Modem/PPP access is almost identical to connecting directly to a network through the DA-683-LX Ethernet port.
Since PPP is a peer-to-peer system, the DA-683-LX can also use PPP to link two networks (or a local network
to the Internet) to create a Wide Area Network (WAN).
3-14
DA-683-LX Managing Communications
ATTENTION
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
#pppd connect ‘chat -v ““ ATDT5551212 CONNECT ““’ ogin: username word: password’ /dev/ttyS0
115200 debug crtscts modem defaultroute 192.1.1.17
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 ““ ATDT5551212 CONNECT ““’ user username password password
/dev/ttyS0 115200 crtscts modem”
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:
““ Double quotes—don’t wait for a prompt, but instead do ... (Note that you
must include a space after the second quotation mark)
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 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 /etc/hosts), and y.y.y.y is determined by the remote machine.
3-15
DA-683-LX Managing Communications
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/ttyS0 19200 crtscts
#/sbin/ifconfig
Depending on your distribution, the command might be located elsewhere. After executing the command, you
should be able to see all of 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 (point-to-point address, the address of your server). The output is similar to the following:
Now, type:
#ping z.z.z.z
where z.z.z.z is the address of your name server. The output is similar to the following:
Try typing:
#netstat -nr
3-16
DA-683-LX Managing Communications
If your output looks similar but does not 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 point, you can try
using Telnet, ftp, or finger, bearing in mind that you will have to use numeric IP addresses unless you have
configured /etc/resolv.conf correctly.
This first example applies to using a modem, and requiring authorization with a username and password.
You should also add the following line to the file /etc/ppp/pap-secrets:
* * “” *
The first star (*) lets everyone login. The second star (*) lets every host connect. The pair of double quotation
marks (“”) indicates that the file /etc/passwd can be used to check the password. The last star (*) is to let
any IP connect.
The following example does not check the username and password:
# Speed
115200
3-17
DA-683-LX Managing Communications
ATTENTION
If you hope to have auto dial-in service, you can respawn the dial-in service in /etc/inittab.
PPPoE
The following procedure is for setting up PPPoE:
1. Connect the DA-683-LX's LAN port to an ADSL modem with a cross-over cable, HUB, or switch.
2. Log in to the DA-683-LX's as the root user.
3. Edit the file /etc/ppp/chap-secrets and add the following:
“username@hinet.net” * “password” *
# PPPOE example, if you want to use it, you need to unmark it and modify it
"username@hinet.net" * "password" *
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.
3-18
DA-683-LX Managing Communications
# INBOUND connections
# Every regular user can use PPP and has to use passwords from /etc/passwd
* hostname "" *
"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 "*" -
master hostname "*" -
root hostname "*" -
support hostname "*" -
stats hostname "*" -
# OUTBOUND connections
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.
# received. Note: it is not advisable to use this option with the persist
# option without the demand option. If the active-filter option is given,
# data packets which are rejected by the specified activity filter also
# count as the link being idle.
#idle <n>
# Specifies how many seconds to wait before re-initiating the link after
# it terminates. This option only has any effect if the persist or demand
# option is used. The holdoff period is not applied if the link was
# terminated because it was idle.
#holdoff <n>
# 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.
#connect-delay <n>
# ---<End of File>---
3-19
DA-683-LX Managing Communications
6. If you use LAN1 to connect to the ADSL modem, add file /etc/ppp/options.eth0. If you use LAN2 to
connect to the ADSL modem, then add /etc/ppp/options.eth1, etc.
name username@hinet.net
mtu 1492
mru 1492
defaultroute
noipdefault
~
~
Type your username (the one you set in the /etc/ppp/pap-secrets and /etc/ppp/chap-secrets files)
after the name option. You may add other options as desired.
7. 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
9. Type #ifconfig ppp0 to check if the connection is OK. If the connection is OK, you should see the IP
address of ppp0. Use #ping to test the IP address.
10. If you want to disconnect it, use the kill command to kill the pppd process.
3-20
DA-683-LX Managing Communications
ATTENTION
Click on the following links for more information about NFS.
http://www.ietf.org/rfc/rfc1213.txt
http://www.faqs.org/rfcs/rfc1317.html
3-21
DA-683-LX Managing Communications
ATTENTION
Click on the following links for more information about RFC1317 RS-232 like group and RFC 1213 MIB-II.
http://www.faqs.org/rfcs/rfc1317.html
http://www.ietf.org/rfc/rfc1213.txt
OpenVPN
OpenVPN provides two types of tunnels for users to implement VPNS: Routed IP Tunnels and Bridged
Ethernet Tunnels.
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 carry out configurations in the /etc/openvpn directory, where script
files and key files reside. Once established, all operations will be performed in that directory.
Host A represents the machine that belongs to OpenVPN A, and Host B represents the machine that belongs to
OpenVPN B. The two remote subnets are configured for a different range of IP addresses. When this
configuration is moved to a public network, the external interfaces of the OpenVPN machines should be
configured for static IPs, or connected to another device (such as a firewall or DSL box) first.
ATTENTION
A preshared key is located at /etc/openvpn/secrouter.key. You can use it for testing purposes. We suggest
creating a new key for non-testing purpose.
3-22
DA-683-LX Managing Communications
#--------------------------Start---------------------------
#!/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
#----------------------------end---------------------------
#!/bin/bash
# Create global variables
# Define Bridge Interface
br="br0"
# Define list of TAP interfaces to be bridged,
# for example tap="tap0 tap1 tap2".
tap="tap0"
# Define physical ethernet interface to be bridged
# with TAP interface(s) above.
eth="eth1"
eth_ip="192.168.8.173"
eth_netmask="255.255.255.0"
eth_broadcast="192.168.8.255"
#gw="192.168.8.174"
...
# /etc/openvpn/bridge restart
3-23
DA-683-LX Managing Communications
#----------------------------------Start-----------------------------
#!/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
#---------------------------------- end -----------------------------
#!/bin/bash
# Create global variables
# Define Bridge Interface
br="br0"
# Define list of TAP interfaces to be bridged,
# for example tap="tap0 tap1 tap2".
tap="tap0"
# Define physical ethernet interface to be bridged
# with TAP interface(s) above.
eth="eth1"
eth_ip="192.168.8.174"
eth_netmask="255.255.255.0"
eth_broadcast="192.168.8.255"
# "192 168 8 173"
Start the bridge script file to configure the bridge interface.
# /etc/openvpn/bridge restart
ATTENTION
Select cipher and authentication algorithms by specifying cipher and auth. To see which algorithms are
available, type:
# openvpn --show-ciphers
# openvpn --show-auths
ATTENTION
You can create link symbols to start the OpenVPN service at boot time:
# ln -sf /etc/init.d/openvpn /etc/rc2.d/S16openvpn
9. On each OpenVPN machine, check the routing table by typing the command # route
3-24
DA-683-LX Managing Communications
Interface eth1 and device tap0 both connect to the bridging interface, and the virtual device tun sits on top
of tap0. This ensures that all traffic coming to this bridge from internal networks connected to interface eth1
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.
10. 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:
# ping 192.168.4.174
A successful ping indicates that you have created a VPN system that only allows authorized users from one
internal network to access users at the remote site. For this system, all data is transmitted by UDP packets on
port 5000 between OpenVPN peers.
3-25
DA-683-LX Managing Communications
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/tap0-br.conf of OpenVPN A
and /etc/openvpn/tap0-br.conf of OpenVPN B.
Routed IP
1. Set up four machines, as shown in the following diagram.
#---------------------------Start----------------------------
#!/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
# d
3-26
DA-683-LX Managing Communications
#--------------------------Start----------------------------
#!/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
# end
The first argument of parameter ifconfig is the local internal interface and the second argument is the internal
interface at the remote peer.
$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.
5. Check the routing table after you run the OpenVPN programs, by typing the command # route.
3-27
4
4. Programmer Guide
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, RTC_SET_TIME, struct rtc_time *time);
Description: set RTC time. Argument 3 will be passed to RTC.
UART
The normal tty device node is /dev/ttyS0 and /det/ttyS1.
The DA-683-LX supports standard Linux termios control with RS-232 serial ports.
Digital I/O
Digital Output channels can be set to high or low. The channels are controlled by the function
call set_dout_state( ). Use the digital input channels to detect the state change of the digital input signal. The
DI channels can also be used to detect whether or not the state of a digital signal changes during a fixed period
of time. This can be done by the function call, set_din_event( ).
#define DIO_HIGH 1
#define DIO_LOW 0
4-2
DA-683-LX Programmer Guide
Function int set_din_event(int diport, void (*func)(int diport), int mode, long int duration)
Description Set the DIN event when the state is changed from high to low or from low to high
Input <diport> The port that will be used to detect the DIN event.
Port numbering is from 0 to 3. This value depends on your device.
<(*func) (int diport)>
Not NULL: Returns the call back function. When the event occurs, the call back function will
be invoked.
NULL: Clear this event
<mode>
DIN_EVENT_HIGH_TO_LOW (1): From high to low
DIN_EVENT_LOW_TO_HIGH (0): From low to high
DIN_EVENT_CLEAR (-1): Clear this event
<duration>
0: Detect the din event DIN_EVENT_HIGH_TO_LOW or DIN_EVENT_LOW_TO_HIGH
without duration
Not 0: Detect the din event DIN_EVENT_HIGH_TO_LOW or
DIN_EVENT_LOW_TO_HIGH with duration.
Note:
The value of “duration” must be a multiple of 20 milliseconds.
The range of “duration” is 0, or 40 <= duration <= 3600000 milliseconds.
The error of the measurement is 24 ms. For example, if the DIN duration is 200 ms, this
event will be generated when the DIN pin stays in the same state for a time between 176 ms
and 200 ms.
Output None
Return Refer to the error code
4-3
DA-683-LX Programmer Guide
IMPORTANT!
You have to build the moxalib in advance for DI/DO. The moxalib is included in the
folder \example\moxalib in CD.
Make sure to link the library libmoxalib for DI/DO programming, and include the header file moxadevice.h.
Only one program at a time can use the DI/DO library.
Examples
Example files tdio.c and Makefile are located in the folder \example\tdio\ on the CD.
Introduction
The WDT is a watchdog function. You may enable it or disable it. When the WDT function is enabled and does
not receive the acknowledgement for which it is configured, the system will reboot. Acknowledgement times
may be set for any application, and for any timefrom 50 milliseconds to 60 seconds.
You will need to write your own application to enable the WDT function. Refer to the following APIs for help
writing the application.
4-4
DA-683-LX Programmer Guide
ATTENTION
When you SIGKILL or SIGTERM the application (“kill -9” or “kill -15”) or use the keyboard to terminate from the
shell (i.e., SIGINT via ctrl+c) then the kernel will activate an auto-ack mode to signal the software watchdog.
If the software watchdog is activated and your application does not successfully ack then your application likely
has a logical error or has dumped core. In this situation, the kernel can not activate the auto-ack signaling
mode. This can cause a serious problem, causing your system to reboot again and again.
Examples
4-5
DA-683-LX Programmer Guide
Programmable LEDs
The DA-685 provides 8 user-programmable LED indicators on its front panel. The following section explains
how to configure these LEDs.
1. The kernel module that controls the programmable LEDs is named moxa_pled.ko. Use the lsmod
command to verify the module is loaded; do not include the module’s file suffix (*.ko) in the search. The
computer should return the output below:
2. The 8 LEDs each are each mapped in a one-to-one correspondence to an 8 bit argument, with the leftmost
LED corresponding to the leftmost (“first”) bit and the rightmost bit corresponding to the rightmost LED. A
1 indicates that an LED should be activated, while a 0 indicates an LED should go dark.
To activate an LED, simply echo an eight bit argument into /dev/pled, as below:
MOXA: ~# echo 10000001 > /dev/pled
B
i
In the above example, the first and the last LEDs will light up.
4-6
5
5. System Recovery
The DA-683-LX ready-to-run embedded computers are an embedded Linux platform. This chapter describes
the recovery process in the event of system instability.
Recovery Environment
Recovery Procedure
Saving the System to the USB Drive
DA-683-LX Software Components
Recovery Environment
The environment includes a DA-683-LX embedded computer and a bootable USB disk with the recovery
programs and system image file.
Hardware
The hardware used includes a PC, a DA-683-LX computer and a USB disk with the recovery programs. (Note:
The USB disk should be at least 2GB.).
DA-683-LX
USB DISK
USB Ports
(Recovery data included)
Recovery Procedure
Step 1: Prepare your USB drive
1. Execute tuxboot-windows-23.exe from the utility_tools/CloneZilla folder on the Software CD, select
Pre Download, and then click “…”
A-2
DA-683-LX Software Components
3. Select USB Drive type, select a Drive, and then click OK to continue.
A-3
DA-683-LX Software Components
6. Manually copy the os_image directory from the /recovery folder on the Software CD to
\home\partimag\ on the USB drive.
A-4
DA-683-LX Software Components
4. From the setup menu, use “↑” or “↓” to select the Boot Type Order
5. Press “+” to move the selection up to the first priority, and press Esc to exit the setup menu.
6. Make sure the first boot device is USB. If not, press Enter to change it.
7. Select Exit Save & Exit Setup and then press Enter.
8. Choose Y to save to the CMOS and then exit.
A-5
DA-683-LX Software Components
A-6
DA-683-LX Software Components
A-7
DA-683-LX Software Components
A-8
DA-683-LX Software Components
7. Remove the USB drive after the computer has been powered off.
Step 4: Change the BIOS Settings to Boot from the Original Disk
Now you will need to change the boot priority so that it can boot from the original disk. As the system reboots,
press F2 to enter the BIOS setup menu.
1. Select Boot Legacy Boot Type Order and then press Enter. Make sure the hard disk has first boot
priority.
2. Press F10 and then press Enter to save and exit BIOS settings.
A-9
DA-683-LX Software Components
When the system has been launched, take the following steps.
3. Enter y to continue.
A-10
DA-683-LX Software Components
5. Select (0) Poweroff so that the computer will power off when the process is finished.
A-11
DA-683-LX Software Components
A-12
A
A. Software Components
acpi-support-base 0.109-11 scripts for handling base ACPI events such as the
power button
acpid 1.0.8-1lenny2 Utilities for using ACPI power management
adduser 3.110 add and remove users and groups
alacarte 0.11.5-1 easy GNOME menu editing tool
alsa-base 1.0.17.dfsg-4 ALSA driver configuration files
alsa-utils 1.0.16-2 ALSA utilities
apache2 2.2.9-10+lenny6 Apache HTTP Server metapackage
apache2-mpm-prefork 2.2.9-10+lenny6 Apache HTTP Server - traditional non-threaded
model
apache2-utils 2.2.9-10+lenny6 utility programs for webservers
apache2.2-common 2.2.9-10+lenny6 Apache HTTP Server common files
app-install-data 2008.11.27 Application Installer Data Files
apt 0.7.20.2+lenny1 Advanced front-end for dpkg
apt-utils 0.7.20.2+lenny1 APT utility programs
aptitude 0.4.11.11-1~lenny1 terminal-based package manager
aspell 0.60.6-1 GNU Aspell spell-checker
aspell-en 6.0-0-5.1 English dictionary for GNU Aspell
autoconf 2.61-8 automatic configure script builder
autoconf2.13 2.13-59 automatic configure script builder (obsolete version)
automake 1:1.10.1-3 A tool for generating GNU Standards-compliant
Makefiles
automake1.4 1:1.4-p6-13 A tool for generating GNU Standards-compliant
Makefiles
autotools-dev 20080123.1 Update infrastructure for config.{guess,sub} files
base-files 5lenny4 Debian base system miscellaneous files
base-passwd 3.5.20 Debian base system master password and group files
bash 3.2-4 The GNU Bourne Again SHell
bash-completion 20080705 programmable completion for the bash shell
bc 1.06.94-3 The GNU bc arbitrary precision calculator language
bind9-host 1:9.5.1.dfsg.P3-1+len Version of 'host' bundled with BIND 9.X
ny1
binutils 2.18.1~cvs20080103- The GNU assembler, linker and binary utilities
7
bridge-utils 1.4-5 Utilities for configuring the Linux Ethernet bridge
bsdmainutils 6.1.10 collection of more utilities from FreeBSD
bsdutils 1:2.13.1.1-1 Basic utilities from 4.4BSD-Lite
busybox 1:1.10.2-2 Tiny utilities for small and embedded systems
bzip2 1.0.5-1 high-quality block-sorting file compressor - utilities
capplets-data 1:2.22.2.1-2 configuration applets for GNOME 2 - data files
cdrdao 1:1.2.2-16 records CDs in Disk-At-Once (DAO) mode
console-common 0.7.80 basic infrastructure for text console configuration
DA-683-LX Software Components
A-2
DA-683-LX Software Components
A-3
DA-683-LX Software Components
A-4
DA-683-LX Software Components
A-5
DA-683-LX Software Components
A-6
DA-683-LX Software Components
A-7
DA-683-LX Software Components
A-8
DA-683-LX Software Components
A-9
DA-683-LX Software Components
A-10
DA-683-LX Software Components
A-11
DA-683-LX Software Components
A-12
DA-683-LX Software Components
A-13
DA-683-LX Software Components
A-14
DA-683-LX Software Components
A-15
DA-683-LX Software Components
A-16
B
B. IEEE 1588 Configuration
Moxa’s DA-683-LX embedded computers come with pre-installed IEEE 1588v2-compliant software that helps
deliver the Precision Time Protocol (PTP) in the applications requiring accuracy time synchronization. This
GUI-based program helps users easily configure the parameters for the basic and advanced settings for the
IEEE 1588v2 protocol.
Getting Started
Configuration of PTP Settings
Wizard Settings
Basic Settings
Advanced Settings
Monitoring
Enabling the DA-FX04 Fiber LAN Module
DA-683-LX IEEE 1588 Configuration
Getting Started
After your DA-683-LX has been powered on and booted up, type ptpd2-config to run the configuration
program.
B-2
DA-683-LX IEEE 1588 Configuration
Wizard Settings
Select Wizard and then select OK to continue.
Select Next (press the Enter key) from the Wizard welcome screen.
Use the up and down arrow keys to select on which LAN port you would like to deploy the IEEE 1588 protocol.
Press the space key to confirm your selection. Currently, you can only select one LAN port. When finished,
select Next to continue, or use right arrow to select Cancel to quit.
Select if you would like to use P2P (Peer-to-Peer) mode or E2E (End-to-End) mode for the PTP protocol. When
finished, select Next to continue.
B-3
DA-683-LX IEEE 1588 Configuration
Next, select the LNB mode or HAC mode. LNB mode will reduce the network bandwidth, which allows CPU to
handle other tasks more efficiently, while HAC will increase the clock accuracy but consumes more CPU
performance.
When you finish configuring with the Wizard, go back to the main men and select Apply to take effect. It takes
about 10 minutes to complete the configuration.
B-4
DA-683-LX IEEE 1588 Configuration
Basic Settings
Select Basic Settings on the main menu.
Mode
Select P2P (Peer-to-Peer) mode or E2E (End-to-End) mode for the PTP protocol. When finished, select OK to
continue.
B-5
DA-683-LX IEEE 1588 Configuration
Interface
Select on which LAN port you would like to deploy the IEEE 1588 protocol. Press the space key to confirm your
selection. Currently, you can only select one LAN port. When finished, select Next to continu
Synchronization
Select enable if you would like to allow PTP to adjust your system timer, or disable if you would like your
system clock to run as an independent timer. When finished, select OK to complete the process. Remember to
apply your settings by selecting Apply in the main menu.
B-6
DA-683-LX IEEE 1588 Configuration
Advanced Settings
Select Advanced Settings from the main menu; you will be guided to the next step for additional
configurations.
Foreign Master
The Foreign Master setting allows users to configure how many foreign masters can be synchronized with the
DA-683. Enter the number in the field; the maximum is 255. When finished, select OK to continue.
B-7
DA-683-LX IEEE 1588 Configuration
Enter the value for the P2P interval, which is used to determine the delay or latency between the slave and the
master hosts. For example, if you enter 3, it means the interval value is 8=23 seconds. The maximum is 255
seconds.
Enter the value for the E2E interval, which is used to determine the delay or latency between the slave and the
master hosts.
B-8
DA-683-LX IEEE 1588 Configuration
Select the value for the multicast TTL setting; allowed values are 1, 32, 42 and 128.
Enter the number for the domain so that the foreign master records can be sent. When finished, click OK to
continue.
B-9
DA-683-LX IEEE 1588 Configuration
Mode Setting
Next, select the LNB mode or HAC mode. LNB mode will reduce the network bandwidth, which allows the CPU
to handle other tasks more efficiently; HAC will increase the clock accuracy, but consumes more CPU power.
Select enable if you do not want to reset the clock when it has been down for more than 1 second, or disable if
you would like to reset the clock. When finished, click OK to continue.
B-10
DA-683-LX IEEE 1588 Configuration
Enter the value for delaying the filter setting. This value is used to filter a faulty reference for the slave. The
value unit is nanoseconds. When finished, click OK to continue.
Enter the value for PID servo control. Use commas to separate parameters.
B-11
DA-683-LX IEEE 1588 Configuration
This function allows users to set a one-way delay filter parameter. Enter the value in the field below. When
finished, click OK.
Monitoring
Select Monitor on the main menu, and then click OK; you can now monitor the clock information. Click Exit to
leave.
B-12
DA-683-LX IEEE 1588 Configuration
Download DA-683 V1.1 firmware version from MOXA website and update firmware by using the recovery
procedure in the chapter for System Recovery.
Moxa:/home# cd DA-683-V1.1
Moxa:/home/DA-683-V1.1# ./install.sh
If you would like to downgrade the firmware to version 1.0, use the following command:
Moxa:/home/DA-683-V1.1# ./uninstall.sh
Please note that once you downgrade to the firmware version 1.0, you will not be able to use the IEEE
1588v2 function for the DA-FX04-MM-ST-T Fiber LAN module.
ATTENTION
Once the firmware has been downgraded to version 1.0, the file name will be renamed and backed up to V1.0.
When you finish firmware update, we suggest you power off the computer and then restart again so that the
DA-683-LX can initialize the Ethernet ports. Next, power off the computer again, and then install the
DA-FX04 Fiber LAN module onto the DA-683-LX. After the system reboot, you can find the six Ethernet
ports on the DA-683-LX will be regarded from eth0 to eth5, and the four LAN ports on the DA-FX04 Fiber
LAN module will be regarded from eth6 to eth9.
B-13