Table of Contents
1. Introduction ...................................................................................................................................... 1-1
Overview ........................................................................................................................................... 1-2
Software Specifications........................................................................................................................ 1-2
Software Components .................................................................................................................. 1-2
2. System Configuration ........................................................................................................................ 2-1
Getting Started .................................................................................................................................. 2-2
Connecting From an SSH Console ......................................................................................................... 2-4
Windows Users ........................................................................................................................... 2-5
Linux Users ................................................................................................................................ 2-5
Adjusting the System Time .................................................................................................................. 2-6
Setting the Time Manually ............................................................................................................ 2-6
systemd-timesyncd Service .......................................................................................................... 2-7
NTP Client .................................................................................................................................. 2-8
Manage the Service by systemd script ........................................................................................... 2-9
Setting the Time Zone ............................................................................................................... 2-10
Cron—Daemon for Executing Scheduled Commands .............................................................................. 2-13
The Partition in the System ................................................................................................................ 2-14
Adding Swap Space in the System ...................................................................................................... 2-14
Resizing and Adding a Partition .......................................................................................................... 2-15
Inserting a USB Storage into the Computer .......................................................................................... 2-20
Inserting a SD Storage into the Computer ........................................................................................... 2-21
Checking the Linux Version ................................................................................................................ 2-22
Checking Moxa’s Control Version ........................................................................................................ 2-23
APT—Installing and Removing Packages .............................................................................................. 2-23
Audio Player ..................................................................................................................................... 2-24
Video Player ..................................................................................................................................... 2-27
Web Browser .................................................................................................................................... 2-27
Brightness control ............................................................................................................................. 2-27
Introduction.............................................................................................................................. 2-27
Auto-brightness control mode ..................................................................................................... 2-29
Manual brightness control mode .................................................................................................. 2-31
3. Managing Communications ............................................................................................................... 3-1
Changing the Network Settings ............................................................................................................ 3-2
Changing the “interfaces” Configuration File ................................................................................... 3-2
Configure the VLAN tag in “interfaces” ........................................................................................... 3-3
Adjusting IP Addresses with “ifconfig” ............................................................................................ 3-3
DNS Client ......................................................................................................................................... 3-4
/etc/hostname ............................................................................................................................ 3-4
/etc/resolv.conf ........................................................................................................................... 3-4
/etc/nsswitch.conf ....................................................................................................................... 3-5
Apache Web Server ............................................................................................................................. 3-5
Install the apache web server ....................................................................................................... 3-5
Default Homepage ....................................................................................................................... 3-5
Disabling the CGI Function ........................................................................................................... 3-6
Saving Web Pages to a USB Storage Device.................................................................................... 3-6
IPTABLES .......................................................................................................................................... 3-8
IPTABLES Hierarchy ..................................................................................................................... 3-9
IPTABLES Modules ....................................................................................................................... 3-9
Observe and Erase Chain Rules ................................................................................................... 3-10
Define Policy for Chain Rules....................................................................................................... 3-11
Append or Delete Rules .............................................................................................................. 3-11
NAT (Network Address Translation) ..................................................................................................... 3-12
NAT Example ............................................................................................................................ 3-13
Enabling NAT at Bootup ............................................................................................................. 3-13
NFS (Network File System) Client ....................................................................................................... 3-14
Wireless Management ....................................................................................................................... 3-14
Device Driver for WPEA-172GN – rt5572sta.ko ............................................................................. 3-14
Device Driver for WPEA-172GN - rt2800usb.ko ............................................................................. 3-16
iw ............................................................................................................................................ 3-17
wpasupplicant ........................................................................................................................... 3-17
Celluar Management – cell_mgnt ........................................................................................................ 3-18
4. Programming Guide .......................................................................................................................... 4-1
The Device Driver Source .................................................................................................................... 4-2
Getting Product Serial Number ............................................................................................................. 4-2
Multi-arch Development Tools .............................................................................................................. 4-2
Year 2038 Problem – Recompile the Program with 64-bits glibc ................................................................ 4-3
Device IOCTL ..................................................................................................................................... 4-3