Moxa Technologies UC-8540 Software User Manual

UC-8540 Series Software User’s Manual
Edition 1.0, October 2018
www.moxa.com/product
© 2018 Moxa Inc. All rights reserved.
UC-8540 Series Software User’s Manual
Moxa Americas
Toll
Tel:
Fax:
Moxa China (Shanghai office)
Toll
Tel:
Fax:
Moxa Europe
Tel:
Fax: +49-89-3 70 03 99-99
Moxa Asia
Tel:
Fax: +886-2-8919-1231
Moxa India
Tel:
Fax:
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.
© 2018 Moxa Inc. All rights reserved.
Trademarks
The MOXA logo is a registered trademark of Moxa Inc.
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 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.
Technical Support Contact Information
www.moxa.com/support
-free: 1-888-669-2872
+1-714-528-6777
+1-714-528-6778
+49-89-3 70 03 99-0
-free: 800-820-5036
+86-21-5258-9955
+86-21-5258-5505
+886-2-8919-1230
-Pacific
+91-80-4172-9088
+91-80-4132-1045
Table of Contents
1. Introduction ...................................................................................................................................... 1-1
2. Getting Started.................................................................................................................................. 2-1
Software Architecture .......................................................................................................................... 2-2
Software Packages .............................................................................................................................. 2-2
Connecting to the UC-8540 Computer ................................................................................................... 2-2
Using the Serial Console ............................................................................................................... 2-3
Using the SSH Console ................................................................................................................. 2-5
Sudo Mechanism ................................................................................................................................ 2-7
Booting Up the UC-8540 for the First Time ............................................................................................. 2-8
User Account Management ................................................................................................................... 2-8
Switching to the Root Account ...................................................................................................... 2-8
Creating and Deleting User Accounts ..................................................................................................... 2-9
Disabling the Default User Account ....................................................................................................... 2-9
Network Settings ................................................................................................................................ 2-9
Configuring Ethernet Interfaces ..................................................................................................... 2-9
System Administration ...................................................................................................................... 2-11
Querying the Firmware Version ................................................................................................... 2-11
Adjusting the Time .................................................................................................................... 2-11
Setting the Time Zone ............................................................................................................... 2-11
Determining Available Drive Space ...................................................................................................... 2-13
Enabling and Disabling Daemons ........................................................................................................ 2-13
Package Management........................................................................................................................ 2-14
Rebooting/Shutting Down the Computer .............................................................................................. 2-14
Updating the Firmware Using a USB Disk ............................................................................................. 2-15
3. Advanced Configuration of Peripherals ............................................................................................. 3-1
Serial Ports ........................................................................................................................................ 3-2
stty ........................................................................................................................................... 3-2
USB Port ............................................................................................................................................ 3-3
USB Automount .......................................................................................................................... 3-3
Restoring the Firmware to Factory Default Settings ................................................................................. 3-3
Using Cellular Modules ........................................................................................................................ 3-4
Cellular Signal Strength ............................................................................................................... 3-4
Cellular Management Utility .......................................................................................................... 3-4
Dial-Up Connections .................................................................................................................... 3-5
Disconnecting from a Dial-Up Network ........................................................................................... 3-6
Powering On/Off the Cellular Module .............................................................................................. 3-6
Configuring the Wireless LAN ............................................................................................................... 3-6
Wi-Fi Management Utility ............................................................................................................. 3-6
4. Programmer’s Guide ......................................................................................................................... 4-1
Introduction to the Linux Tool Chain...................................................................................................... 4-2
Native Compilation ...................................................................................................................... 4-2
Cross Compilation ....................................................................................................................... 4-2
Obtaining Help ............................................................................................................................ 4-4
Developing a Test Program—hello.c ...................................................................................................... 4-4
Compiling hello.c with Native Compilation ...................................................................................... 4-5
Compiling hello.c using Cross Compilation ...................................................................................... 4-5
Makefile Example ................................................................................................................................ 4-6
RTC (Real Time Clock) ......................................................................................................................... 4-6
WDT (Watch Dog Timer) ...................................................................................................................... 4-8
Cryptographic Hardware Accelerator ..................................................................................................... 4-8
LED Indicators .................................................................................................................................... 4-9
Power Ignition Function ..................................................................................................................... 4-10
5. Mobile Intelligent Routing Framework (MIRF) 2.0 ............................................................................ 5-1
Basic Configuration ............................................................................................................................. 5-3
Editing User Profiles ............................................................................................................................ 5-4
Using the Control Panel ....................................................................................................................... 5-5
Device Information ...................................................................................................................... 5-7
Editing the Hostname .................................................................................................................. 5-7
Editing the Device Name .............................................................................................................. 5-7
Checking the Software Version ...................................................................................................... 5-8
Checking the System Uptime ........................................................................................................ 5-8
Checking the System Memory Size ................................................................................................ 5-8
Maintenance ...................................................................................................................................... 5-9
Upgrading the Firmware ............................................................................................................... 5-9
Exporting the System Configuration File ....................................................................................... 5-10
Importing a System Configuration File ......................................................................................... 5-10
Rebooting the System ................................................................................................................ 5-10
Exporting the System Log Files ................................................................................................... 5-11
Configuration Menu ........................................................................................................................... 5-11
Configuring MIRF 2.0 ................................................................................................................. 5-11
Configuring a Gateway ............................................................................................................... 5-12
Configuring Network Settings ...................................................................................................... 5-12
Configuring Ethernet Settings ..................................................................................................... 5-12
Configuring Wi-Fi Settings .......................................................................................................... 5-13
Configuring Cellular Settings ....................................................................................................... 5-19
Configuring Routing Client Settings.............................................................................................. 5-23
Configuring OpenVPN Client Settings ........................................................................................... 5-24
Configuring SSH Settings ........................................................................................................... 5-26
Configuring QoS Settings ........................................................................................................... 5-27
Configuring Load Balance Settings ............................................................................................... 5-28
Configuring SNMP Settings ......................................................................................................... 5-29
Configuring VRRP Settings .......................................................................................................... 5-30
Configuring Firewall Settings....................................................................................................... 5-33
Configuring System Settings ....................................................................................................... 5-36
Configuring Serial Settings ......................................................................................................... 5-37
Configuring the System Time ...................................................................................................... 5-38
Configuring Admin Settings ........................................................................................................ 5-39
Configuring GPS Settings ........................................................................................................... 5-40
Configuring Remote Control Settings ........................................................................................... 5-42
System Maintenance ......................................................................................................................... 5-43
Configuring Signal Tracker Settings ............................................................................................. 5-44
Managing User Accounts ............................................................................................................ 5-45
Creating a New Account ............................................................................................................. 5-45
Editing the Administrator Information .......................................................................................... 5-46
Updating User Account Information ............................................................................................. 5-47
Deleting a User Account ............................................................................................................. 5-48
Managing User Programs ............................................................................................................ 5-48
A. Using the General Debian Package .................................................................................................... A-1
NTP Client .......................................................................................................................................... A-2
Executing Scheduled Commands with cron............................................................................................. A-2
Updating System Time and RTC .................................................................................................... A-2
Log Processing using rsyslog ................................................................................................................ A-3
Rsyslog’s Configuration File .......................................................................................................... A-3
Using Selectors ........................................................................................................................... A-4
OpenSSL ........................................................................................................................................... A-4
Ciphers ...................................................................................................................................... A-5
Cryptographic Hash Functions ....................................................................................................... A-5
Public-Key Cryptography .............................................................................................................. A-5
SFTP ................................................................................................................................................. A-5
DNS .................................................................................................................................................. A-6
/etc/hosts .................................................................................................................................. A-6
/etc/resolv.conf ........................................................................................................................... A-7
/etc/nsswitch.conf ....................................................................................................................... A-7
iptables ............................................................................................................................................. A-7
Observing and Erasing Chain Rules ................................................................................................ A-9
Defining a Policy for Chain Rules ................................................................................................... A-9
Appending or Deleting Rules ....................................................................................................... A-10
NAT ................................................................................................................................................ A-10
NAT Example ............................................................................................................................ A-11
Enabling NAT at Bootup ............................................................................................................. A-11
rsync............................................................................................................................................... A-12
Using rsync for External Backups ................................................................................................. A-12
Automating rsync Backups ......................................................................................................... A-12
NFS (Network File System) ................................................................................................................ A-13
Setting Up the UC-8540 Computer as an NFS Client ...................................................................... A-13
SNMP .............................................................................................................................................. A-13
OpenVPN ......................................................................................................................................... A-15
Static-Key VPN .......................................................................................................................... A-15
Package Management........................................................................................................................ A-16
apt-get .................................................................................................................................... A-16
apt-cache ................................................................................................................................. A-16
Listing All Available Packages ...................................................................................................... A-16
Finding the Package Name and Software Description ..................................................................... A-16
Checking Package Information .................................................................................................... A-17
Checking Dependencies for Specific Packages ............................................................................... A-17
Checking the Cache Statistics ..................................................................................................... A-17
Updating System Packages ......................................................................................................... A-17
Installing or Upgrading Specific Packages ..................................................................................... A-17
Upgrading All Software Packages ................................................................................................. A-17
Installing Multiple Packages ........................................................................................................ A-17
Installing Packages Without Upgrading ......................................................................................... A-17
Upgrading Specific Packages ....................................................................................................... A-18
Installing Specific Package Version .............................................................................................. A-18
Removing Packages ................................................................................................................... A-18
Completely Removing Packages .................................................................................................. A-18
Cleaning Up Disk Space.............................................................................................................. A-18
Downloading Only the Source Code of a Package ........................................................................... A-18
Downloading and Unpacking a Package ........................................................................................ A-18
Downloading, Unpacking, and Compiling a Package ....................................................................... A-18
Download a Package Without Installing the Package ...................................................................... A-19
Checking the Change Log of a Package ........................................................................................ A-19
Checking Broken Dependencies ................................................................................................... A-19
Searching and Building Dependencies .......................................................................................... A-19
Cleaning Apt-Get Cache ............................................................................................................. A-19
Removing Installed Packages ...................................................................................................... A-19
B. Firmware Upgrade ............................................................................................................................ B-1
Overview ........................................................................................................................................... B-2
A. Connecting to the UC-8540 Computer ........................................................................................ B-2
B. Download and Launch the TFTP Program .................................................................................... B-2
C. Downloading and Upgrading the Firmware Through the Serial Port ................................................ B-3
1

1. Introduction

Thank you for purchasing Moxa’s UC-8540 Series Arm-based computer. This is the software operation and
programming manual for the Linux model of the UC-8540 computer and covers the use of Linux functions with
examples on how to program the UC-8540. In addition, detailed description of the various basic and advanced
functions of the Mobile Intelligent Routing Framework (MIRF) 2.0 tool are provided for use in rail applications.
Linux is an open source, scalable operating system that helps you build a wide range of innovative, small
footprint devices. Software written for desktop PCs can be easily ported to the embedded computer with a GNU
cross compiler and minimum source code modifications. A typical Linux-based device is designed for a specific
use, and is often not connected to other computers. In some cases, a number of such devices could be
connected to a centralized, front-end host. Examples include enterprise tools such as industrial controllers and
communications hubs.
Moxa's MIRF is an open-platform, multiple-WAN management tool that helps provide unbeatable wireless
service for train passengers as the train travels through different regions.
The wireless-enablement of the UC-8540 computer also makes it the most suitable choice for Industrial IoT
applications.
2
2. Getting Started
In this chapter, we describe how to configure the basic settings in your UC-8540 computer.
The following topics are covered in this chapter:
Software Architecture
Software Packages
Connecting to the UC-8540 Computer
Using the Serial Console
Using the SSH Console

Sudo Mechanism

Booting Up the UC-8540 for the First Time

User Account Management
Switching to the Root Account
Creating and Deleting User Accounts
Disabling the Default User Account
Network Settings
Configuring Ethernet Interfaces
System Administration
Querying the Firmware Version
Adjusting the Time
Setting the Time Zone
Determining Available Drive Space
Enabling and Disabling Daemons

Package Management

Rebooting/Shutting Down the Computer
Updating the Firmware Using a USB Disk
UC-8540 Series Software UM Getting Started
2-2
1
Linux kernel
W95 FAT32
32 MB
NOTE
Click on the following lin
https://wiki.debian.org/Ext4
https://ext4.wiki.kernel.org/index.php/Ext4_Howto
Software Architecture
The Linux operating system that is preinstalled on the UC-8540 computer follows standard Linux architecture,
making it easy to run any program that follows the POSIX standard. This computer uses the Debian ARM 8 so
that users can enjoy the full range of Debian software, and benefit from its strong community of developers and
shared documentation. With Debian ARM, the UC-8540 computer supports both native and cross compilation,
making programming on the computer easier and more straightforward.
The UC-8540 computer image is partitioned into Linux kernel, backup root file system, and root file system.
Refer to the following image partition table for details:
Partition System Content Partition Format Partition Size
2 Backup root file system EXT4 128 MB
3 Root file system EXT4 Rest of the capacity
The default file system format of the UC-8540 computer is EXT4, which is a journaling file system for Linux,
developed as the successor to EXT3. A journaling file system keeps track of the changes before committing
them to the main file system. In the event of a system crash or power failure, journaling file systems are
quicker at bringing back the computer online and less likely to get corrupted.
ks for more information on EXT4:
Software Packages
Most of the software packages come from the Debian community, whereas the unique features of the UC-8540
computer, such as the cellular and wireless connections, are supported by Moxa. Refer to Appendix A for
software packages installed by default and the Package Management section for information on managing the
software packages installed on your UC-8540 computer.
Connecting to the UC-8540 Computer
You will need access to a notebook computer or a PC to connect to the UC-8540 computer and log on to the
command line interface. There are two ways to connect to the UC-8540 computer: through a serial console
cable or through an Ethernet cable. Refer to the UC-8540 Series Hardware User’s Manual for instructions to set
up the physical connections for your computer.
The default login username and password are:
Username: moxa
Password: moxa
The username and password are the same for all serial console and SSH remote log in actions. The
account login is disabled until you manually create a password for the account. The user
group, which means that this user can use the
details on using the
sudo command are available in the Sudo Mechanism section.
root
moxa is in the sudo
sudo command to run system-level commands. Additional
UC-8540 Series Software UM Getting Started
2-3
ATTENTION
For security reasons, we recommend that you disable the default user account
complete
If you want to change the settings manually via the SSH console or serial console, turn off MIRF 2.0. If not, the
settings may be restored to MIRF 2.0 settings.
Th
turn on:
turn off: mx-tp-ctl -e 0
Flow Control
None
WARNING
DO NOT apply these steps to the
to
connect to the
and create new user accounts as per your requirement.
e commands to change MIRF 2.0 state are as follows:
mx-tp-ctl -e 1
Using the Serial Console
This method is particularly useful when you are using the UC-8540 computer for the first time. The signal is
transmitted over a direct serial connection without using an IP address.
To connect to the UC-8540 computer using a serial console port, do the following:
1. Open the console port cover on the front panel and connect one end of the cable to it
after the initial set up is
2. Connect the other end of the serial console cable to your PC.
3. Configure your PC’s terminal software with the following settings:
The procedure to use the terminal software to connect to the UC-8540 computer in a Linux environment and in
a Windows environment is described in the following two sections:
Linux Users
Serial Console Port Settings
Baudrate 115200 bps
Parity None
Data bits 8
Stop bits 1
Terminal VT100
UC-8540 computer. These steps apply only to the Linux PC that you use
UC-8540 computer.
UC-8540 Series Software UM Getting Started
2-4
user@PC1:~# yum -y install minicom
user@PC2:~# apt-get install minicom
user@PC1:~# minicom –s
NOTE
You need to know which device node is connected to the
user@PC1:~# minicom
+---------------------------------------------------------------+
+---------------------------------------+
Take the following steps to connect to the UC-8540 computer from your Linux PC.
1. Install minicom from the package repository of your operating system.
For Centos and Fedora, run the following command:
For Ubuntu and Debian, run the following command:
2. Use the minicom –s command to enter the configuration menu and set up the serial port settings.
3. Select Serial port setup.
4. Select A to change the serial device setting.
| A – Serial Device : /dev/ttyM0
| B – Lockfile Location : /var/lock
| C – Callin Program :
| D – Callout Program :
| E – Bps/Par/Bits : 115200 8N1
| F – Hardware Flow Control : Yes
| G – Software Flow Control : No
|
| Change which setting?
+---------------------------------------------------------------+
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
5. Select E to configure the port settings according to the Serial Console Port Settings table provided
above.
6. Select Save setup as dfl (from the main configuration menu) to use default values.
7. Select Exit from minicom (from the configuration menu) to leave the configuration menu.
8. Run the minicom tool after completing the abovementioned configuration settings.
UC-8540 computer to configure this setting.
UC-8540 Series Software UM Getting Started
2-5
WARNING
DO NOT apply these steps to the
connect to the
Windows Users
Take the following steps to connect to the UC-8540 computer from your Windows PC:
1. Download PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
and telnet client for Windows.
2. Run the PuTTY application (putty.exe) on the Windows PC.
3. Enter the details of the serial connection in the configuration window.
The figure below shows an example of the configuration that is required:
UC-8540 computer.
UC-8540 computer. These steps are for the Windows PC that you use to
), the free SSH
4. Click Open.
5. Type in the UC-8540 computer.
Using the SSH Console
The UC-8540 computer supports SSH connections over an Ethernet network. Use the following default IP
addresses to connect to the UC-8540 computer:
Port Default IP
LAN 1 192.168.3.127
LAN 2 192.168.4.127
username and password in the console that opens up to establish a serial connection with the
UC-8540 Series Software UM Getting Started
2-6
NOTE
Do NOT apply these steps to the
that
you us
user@PC1:~ ssh moxa@192.168.3.127
The authenticity of host ‘192.168.3.127 (192.168.4.127)’ can’t be established.
Are you sure you want to continue connection (yes/no)?
ATTENTION
Rekey SSHD regularl
In order to secure your system, we suggest doing a regular SSH
cd /etc/ssh
sudo ssh-keygen -t ecdsa –f /etc/ssh/ssh_host_ecdsa_key
When prompted for a passphrase, leave
Restart SSH as follows:
moxa@Moxa:~$ sudo /etc/init.d/ssh restart
For more information about S
https://wiki.debian.org/SSH
NOTE
Do NOT apply these steps to the
connect to the
Linux Users
e to connect to the UC-8540 computer.
Use the ssh command to access the UC-8540 computer’s LAN1 port from a Linux computer.
Type yes to complete the connection.
UC-8540 Computer. The instructions in this section are for the Linux PC
RSA key fingerprint is 8b:ee:ff:84:41:25:fc:cd:2a:f2:92:8f:cb:1f:6b:2f.
yes_
sudo rm –rf
ssh_host_dsa_key ssh_host_ecdsa_key ssh_host_rsa_key
ssh_host_dsa_key.pub ssh_host_ecdsa_key.pub ssh_host_rsa_key.pub
sudo ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
sudo ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
y
-rekey as shown in the following steps.
SH, refer to the following link:
Windows Users
UC-8540 computer.
UC-8540 computer. These steps are for the Windows PC that you use to
the passphrase empty and press Enter.
UC-8540 Series Software UM Getting Started
2-7
Take the following steps from your Windows PC.
Click on the link, http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
(free software) to set up an SSH console for the UC-8540 computer in a Windows environment. The following
figure shows an example of the configuration that is required:
to download PuTTY
In the console that opens up, type in the UC-8540 computer.
Sudo Mechanism
In the UC-8540-LX, the root account login is disabled to ensure a higher level of security. Sudo is a program
designed to let system administrators allow some users to execute some commands as root (or another user).
The basic philosophy is to give as few root privileges as possible to users to enable them to get their work done.
Using sudo is better (safer) than opening a session as root for a number of reasons, including:
• Nobody needs to know the root password (
can be granted to individual users temporarily, and then taken away without the need for a password
change.
• It is easy to run only the commands that require special privileges via
as an unprivileged user, which reduces the damage that mistakes can cause.
username and password to establish an SSH connection with the
sudo prompts for the current user's password). Extra privileges
sudo; the rest of the time, you work
UC-8540 Series Software UM Getting Started
2-8
NOTE
Click the following link for more information on
sudo
https://wiki.debian.org/sudo
ATTENTION
You m
root account.
You must use
Note
The code below demonstrates that some system-level commands are not available to the user moxa.
Booting Up the UC-8540 for the First Time
We suggest using the serial console when you log in for the first time. Once you have connected the UC-8540
computer to a PC, power on the UC-8540. The computer will start the boot-up process immediately. The power
LED will light up first, followed by the ready LED. The serial console will display messages that indicate the
status of the boot-up process. When the computer boots-up for the first time, the root file system is resized and
initialized.
User Account Management
Switching to the Root Account
You can switch to the root user account using the sudo -i (or sudo su) command. For security reasons, do
not operate the “a
ll” command from the root account.
the
command:
ight get a permission denied message when you use pipe or redirect behavior with a non-
‘sudo su –c’ to run the command instead of using >, <, >>, <<, etc.
: The single quotes around the full command are required.
UC-8540 Series Software UM Getting Started
2-9
moxa@Moxa:~# sudo useradd -m -G sudo -s /bin/bash test1
moxa@Moxa:~# sudo passwd test1
passwd: password updated successfully
moxa@Moxa:# sudo userdel test1
ATTENTION
You should first create a user account before you disable the default account.
root@Moxa:# passwd –l moxa
root@Moxa:# passwd –u moxa
moxa@Moxa:~$ cd /etc/network/
moxa@Moxa:/etc/network/~$
Creating and Deleting User Accounts
You can use the commands useradd and userdel to create and delete user accounts. Refer to the main page
of these commands to set relevant access privileges for the account. The following example shows how you can
create a user,
/home/test1.
To change the password of test1, use the passwd command and enter the new password twice to confirm the
change as shown below:
Enter new UNIX password:
Retype new UNIX password:
To delete the test1 user, use the userdel command as follows:
test1 in the sudo group. The default login shell for the user is bash and the home directory is
Disabling the Default User Account
Use the passwd command to lock the default user account so the user, moxa cannot log in.
To unlock the user account moxa, use the following command:
Network Settings
Configuring Ethernet Interfaces
After the first login, you can configure the UC-8540 computer’s network settings to better fit your application.
A serial console makes it more convenient for you to manipulate the network interface settings, which can help
you to avoid reconnections, when compared to an SSH login.
Modifying Network Settings via the Serial Console
In this section, we use the serial console to configure the UC-8540 computer’s network settings. Follow the
instructions given in the Connecting to the UC-8540 Computer section to access the console utility of the target
UC-8540 computer via the serial console port, and then type
directory path.
Moxa:~# cd /etc/network to change the
Type Moxa:~# sudo vi interfaces to edit the network configuration file with the vi editor. You can
configure the UC-8540 computer’s Ethernet ports to use either
static or dynamic (DHCP) IP addresses.
UC-8540 Series Software UM Getting Started
2-10
ATTENTION
After changing
Example:
ifdown eth0 (turn off eth0)
ifup eth0 (turn on eth0).
iface eth0 inet static
broadcast 192.168.3.255
iface eth0 inet dhcp
# embedded ethernet LAN1
iface eth0 inet dhcp
# interfaces(5) file used by ifup(8) and ifdown(8)
Setting a Static IP Address
To set a static IP address for the UC-8540 computer, use the iface command to modify the address,
network, netmask, and broadcast parameters of the Ethernet interface.
auto eth0 eth1 lo
iface lo inet loopback
# embedded ethernet LAN1
iface eth0 inet static
address 192.168.3.127
network 192.168.3.0
netmask 255.255.255.0
broadcast 192.168.3.255
# embedded ethernet LAN2
iface eth1 inet static
address 192.168.4.127
network 192.168.4.0
netmask 255.255.255.0
broadcast 192.168.4.255~
the IP configuration, restart the Ethernet interface.
Setting a Dynamic IP Address
To configure one or both LAN ports to request an IP address dynamically, use the dhcp option in place of the
static option in the iface command as follows:
Default Setting for LAN1 Dynamic Setting using DHCP
address 192.168.3.127
network: 192.168.3.0
netmask 255.255.255.0
UC-8540 Series Software UM Getting Started
2-11
moxa@Moxa:~$ kversion
UC-8540-LX version 1.1
moxa@Moxa:~$ kversion -a
UC-8540-LX version 1.1 Build 18090615
moxa@Moxa:~$ sudo date 071123192014
Mon Jul 11 23:19:00 UTC 2014
moxa@Moxa:~$ sudo hwclock –w
Fri 11 Jul 2014 11:19:38 PM UTC -1.006862 seconds
NOTE
Click the following links for more information on date and time:
https://www.debian.org/doc/manuals/system
https://wiki.debian.org/DateTime
System Administration
Querying the Firmware Version
To check the UC-8540 computer’s firmware version, type:
Add the –a option to the command to view the build number:
Adjusting the Time
The UC-8540 computer has two time settings. One is the system time, and the other is the RTC (Real-Time
Clock) time maintained by the UC-8540 Series hardware. Use the
system time or set a new system time. Use the
RTC time.
#hwclock command to query the current RTC time or set a new
#date command to query the current
Use the date MMDDhhmmYYYY command to set the system time:
MM = Month DD = Date
hhmm = hour and minute
Use the following command to set the RTC time using the system time:
moxa@Moxa:~$ sudo hwclock
Setting the Time Zone
There are two ways to configure the Moxa embedded computer’s time zone. One is using the TZ variable. The
other is using /etc/localtime file.
-administrator/ch-sysadmin-time.html
Using the TZ Variable
The format of the TZ environment variable format looks like this:
TZ=<Value>HH[:MM[:SS]][daylight[HH[:MM[:SS]]][,start date[/starttime], enddate[/endtime]]]
Here are some possible TZ settings for the North American Eastern time zone:
1. TZ=EST5EDT
2. TZ=EST0EDT
3. TZ=EST0
In the first case, the reference time is GMT and the stored time values are correct worldwide. A simple change
of the TZ variable can print the local time correctly in any time zone.
UC-8540 Series Software UM Getting Started
2-12
moxa@Moxa:~$ TZ= EST5EDT
moxa@Moxa:~$ export TZ
+9
JST
Japan
-7
MST
Mountain Standard Time
In the second case, the reference time is Eastern Standard Time and the only conversion performed is for
Daylight Saving Time. Therefore, there is no need to adjust the hardware clock for Daylight Saving Time twice
per year.
In the third case, the reference time is always the time reported. You can use this option if the hardware clock
on your machine automatically adjusts the Daylight Saving Time or you would like to manually adjust the
hardware time twice a year.
You must include the TZ setting in the
restart the computer.
The following table lists other possible values for the TZ environment variable:
Hours From Greenwich Mean Time (GMT) Value Description
0 GMT Greenwich Mean Time
+1 ECT European Central Time
+2 EET European Eastern Time
+2 ART
+3 EAT Saudi Arabia
+3.5 MET Iran
+4 NET
+5 PLT West Asia
+5.5 IST India
+6 BST Central Asia
+7 VST Bangkok
+8 CTT China
/etc/rc.local file. The timezone setting will be activated when you
+9.5 ACT Central Australia
+10 AET Eastern Australia
+11 SST Central Pacific
+12 NST New Zealand
-11 MIT Samoa
-10 HST Hawaii
-9 AST Alaska
-8 PST Pacific Standard Time
-7 PNT Arizona
-6 CST Central Standard Time
-5 EST Eastern Standard Time
-5 IET Indiana East
-4 PRT Atlantic Standard Time
-3.5 CNT Newfoundland
-3 AGT Eastern South America
-3 BET Eastern South America
-1 CAT Azores
Using the /etc/localtime File
The local timezone information is stored in the /etc/localtime file and is used by the GNU Library for C
(glibc) if no value has been set for the TZ environment variable. This file is either a copy of the
/usr/share/zoneinfo/ file or a symbolic link to it. You should find a suitable timezone information file and
write over the original local time file in the UC-8540 computer.
UC-8540 Series Software UM Getting Started
2-13
moxa@Moxa:~$ sudo systemctl enable snmpd
moxa@Moxa:~$ sudo systemctl disable snmpd
### BEGIN INIT INFO
YOUR SCRIPT
moxa@Moxa:~$ sudo /etc/init.d/snmpd start
moxa@Moxa:~$ sudo /etc/init.d/snmpd stop
Determining Available Drive Space
To determine the amount of available drive space, use the df command with the –h tag. The system will return
the amount of drive space broken down by file system. Here is an example:
moxa@Moxa:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.3G 600M 2.6G 19% /
devtmpfs 505M 0 505M 0% /dev
tmpfs 505M 0 505M 0% /dev/shm
tmpfs 505M 6.8M 499M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 505M 0 505M 0% /sys/fs/cgroup
Enabling and Disabling Daemons
By default, only the following daemons are enabled in the UC-8540 computer:
sshd Secure shell server daemon
You can use the
example shows how to add the SNMP daemon to the current run level.
The SNMP daemon will not get activated in the current boot session, but will be running in the background from
the next boot session.
To disable the SNMP daemon, use the following command:
You can also write your own script to start and stop a daemon during the system “init” stage:
systemctl command to manage which services will run in the background. The following
# Provides: scriptname
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
Linux daemons can be started or stopped in a current boot session by using the scripts in the /etc/init.d file.
To start the SNMP daemon, use:
To stop the SNMP daemon, use:
In comparison to systemctl, scripts in /etc/init.d/ will only start or stop the services in the current boot
session. Once you reboot the UC-8540 computer, it will go back to the default settings managed by
systemctl.
UC-8540 Series Software UM Getting Started
2-14
moxa@Moxa:~$ cat /etc/apt/sources.list
deb-src http://ftp.debian.org/debian jessie-backports main contrib non-free
IMPORTANT
Do NOT use the reset switch on the front
down a running Debian
GNU/Linux system. Do NOT turn off the UC-8540 when Debian GNU/Linux OS is running on the computer.
moxa@Moxa:~$ sudo reboot
Package Management
Most of the software Debian packages are maintained by the Debian community in the official Debian apt
repository. The features that are exclusively supported by the UC-8540 Series are maintained by Moxa. You
must add the Moxa repository to the /etc/apt/sources.list file to keep your system up-to-date with the
newest UC-8540 Series packages.
deb http://debian.moxa.com/debian jessie main
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.debian.org/debian jessie-backports main contrib non-free
The following packages are maintained in Moxa’s official repository.
Package Name Version Architecture Description
libssl1.0.0:armhf 1.0.1k-3+deb8u1+moxa armhf Secure Sockets Layer toolkit shared
libraries
openssl 1.0.1k-3+deb8u1+moxa armhf Secure Socket Layer (SSL) binary
moxa-cellular-utils 1.0.0 armhf Cellular-related utility on the Moxa
computer. (libqmi: v1.12.6)
UC-8540-diag 1.0.0 armhf Self-diagnostic utility on a UC-8540
Series embedded computer
UC-8540-push-btn 1.0.0 armhf Push-button utility on a UC-8540
Series embedded computer
UC-8540-setinterface 1.0.0 armhf Adjust UART mode utility on a UC-8540
Series embedded computer
moxa-snmpd 1.0.0 armhf SNMP (Simple Network Management
Protocol)
UC-8540-system 1.0.0 armhf System files on a UC-8540 Series
embedded computer
moxa-wifi-utils 1.0.0 armhf Wi-Fi related utility on the Moxa
computer.
Rebooting/Shutting Down the Computer
Debian GNU/Linux should be shut down in a controlled manner; otherwise, files might get lost and/or disk
damage might occur. If you run a desktop environment, a log out option is usually available from the
application menu. The log out option provides the proper means of shutting down (or rebooting) the system.
To reboot the UC-8540 computer, use the following command:
panel of the UC-8540 computer to shut
UC-8540 Series Software UM Getting Started
2-15
moxa@Moxa:~$ sudo shutdown -h "now"
To shut down the UC-8540 computer, use the following command:

Updating the Firmware Using a USB Disk

The firmware of the UC-8540 computer can be updated through an external USB disk. Prepare a USB disk with
the firmware image and plug it into USB port of the UC-8540 computer. Power on the computer and take the
following steps:
Windows Users:
1. Download PComm Lite from the following site to set up a telnet client for windows.
http://www.moxa.com/product/download_pcommlite_info.htm
2. Run the PComm Terminal Emulator on your windows computer.
3. Click the Open icon located on the upper-left corner of the window.
4. Configure the following properties and connect the UC-8540 computer to the same COM port.
UC-8540 Series Software UM Getting Started
2-16
----------------------------------------------------------------------------
Command>>
Command>>
----------------------------------------------------------------------------
Command>>
----------------------------------------------------------------------------
Command>>
----------------------------------------------------------------------------
Firmware File Name (firmware.img): FWR_UC-8540-LX_V1.0_Build_17021003_bata.img
----------------------------------------------------------------------------
LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e
Linux Users:
1. After powering on the UC-8540 computer, press DEL to enter the Bootloader configuration settings.
Model: UC-8540
Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004
LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e
----------------------------------------------------------------------------
(0) Fastboot mode (1) Firmware Update by USB Disk
(2) Firmware Update by Tftp
---------------------------------------------------------------------------
----------------------------------------------------------------------------
Model: UC-8540
Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004
LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e
----------------------------------------------------------------------------
(0) Fastboot mode (1) Firmware Update by USB Disk
(2) Firmware Update by Tftp
---------------------------------------------------------------------------
Model: UC-8540
Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004
LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e
----------------------------------------------------------------------------
(0) Fastboot mode (1) Firmware Update by USB Disk
(2) Firmware Update by Tftp
---------------------------------------------------------------------------
Model: UC-8540
Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004
LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e
----------------------------------------------------------------------------
(0) Fastboot mode (1) Firmware Update by USB Disk
(2) Firmware Update by Tftp
---------------------------------------------------------------------------
2. Enter 1 and type in the firmware filename.
The system will start the firmware upgrade process.
Model: UC-8540
Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004
LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e
----------------------------------------------------------------------------
(0) Fastboot mode (1) Firmware Update by USB Disk
(2) Firmware Update by Tftp
---------------------------------------------------------------------------
Command>>1
Model: UC-8540
Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004
UC-8540 Series Software UM Getting Started
2-17
----------------------------------------------------------------------------
Firmware File Name (firmware.img): FWR_UC-8540-LX_V1.0_Build_17021003_bata.img
----------------------------------------------------------------------------
Firmware File Name (firmware.img): FWR_UC-8540-LX_V1.0_Build_17021003_bata.img
----------------------------------------------------------------------------
Firmware File Name (firmware.img): FWR_UC-8540-LX_V1.0_Build_17021003_bata.img
switch to partitions #0, OK
MMC write: dev # 0, block # 1179648, count 49152 ... 49152 blocks written: OK
reading fwr_UC-8540-lx_v1.0_build_17021003_bata.img
(0) Fastboot mode (1) Firmware Update by USB Disk
(2) Firmware Update by Tftp
---------------------------------------------------------------------------
Command>>1
Model: UC-8540
Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004
LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e
----------------------------------------------------------------------------
(0) Fastboot mode (1) Firmware Update by USB Disk
(2) Firmware Update by Tftp
---------------------------------------------------------------------------
Command>>1
Model: UC-8540
Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004
LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e
----------------------------------------------------------------------------
(0) Fastboot mode (1) Firmware Update by USB Disk
(2) Firmware Update by Tftp
---------------------------------------------------------------------------
Command>>1
mmc0(part 0) is current device
reading fwr_UC-8540-lx_v1.0_build_17021003_bata.img
201326592 bytes read in 104939 ms (1.8 MiB/s)
MMC write: dev # 0, block # 0, count 393216 ... 393216 blocks written: OK
switch to partitions #0, OK
mmc0(part 0) is current device
reading fwr_UC-8540-lx_v1.0_build_17021003_bata.img
201326592 bytes read in 105312 ms (1.8 MiB/s)
MMC write: dev # 0, block # 393216, count 393216 ... 393216 blocks written: OK
switch to partitions #0, OK
mmc0(part 0) is current device
reading fwr_UC-8540-lx_v1.0_build_17021003_bata.img
201326592 bytes read in 105762 ms (1.8 MiB/s)
MMC write: dev # 0, block # 786432, count 393216 ... 393216 blocks written: OK
switch to partitions #0, OK
mmc0(part 0) is current device
reading fwr_UC-8540-lx_v1.0_build_17021003_bata.img
25165824 bytes read in 14392 ms (1.7 MiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device
UC-8540 Series Software UM Getting Started
2-18
201326592 bytes read in 104939 ms (1.8 MiB/s)
MMC write: dev # 0, block # 1179648, count 49152 ... 49152 blocks written: OK
Command>>
moxa@Moxa:~$ kversion -a
UC-8540-LX version 1.0 Build 17021003
MMC write: dev # 0, block # 0, count 393216 ... 393216 blocks written: OK
switch to partitions #0, OK
mmc0(part 0) is current device
reading fwr_UC-8540-lx_v1.0_build_17021003_bata.img
201326592 bytes read in 105312 ms (1.8 MiB/s)
MMC write: dev # 0, block # 393216, count 393216 ... 393216 blocks written: OK
switch to partitions #0, OK
mmc0(part 0) is current device
reading fwr_UC-8540-lx_v1.0_build_17021003_bata.img
201326592 bytes read in 105762 ms (1.8 MiB/s)
MMC write: dev # 0, block # 786432, count 393216 ... 393216 blocks written: OK
switch to partitions #0, OK
mmc0(part 0) is current device
reading fwr_UC-8540-lx_v1.0_build_17021003_bata.img
25165824 bytes read in 14392 ms (1.7 MiB/s)
3. After the firmware upgrade process is complete, unplug the power and reboot the system.
----------------------------------------------------------------------------
Model: UC-8540
Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004
LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e
----------------------------------------------------------------------------
(0) Fastboot mode (1) Firmware Update by USB Disk
(2) Firmware Update by Tftp
---------------------------------------------------------------------------
4. After rebooting the machine, you can use the following command to check if the firmware is up-to-date.
3

3. Advanced Configuration of Peripherals

In this chapter, we include more information on the UC-8540 computer’s peripherals, such as the serial
interface, storage, and cellular module.
The following topics are covered in this chapter:
Serial Ports
stty
USB Port
USB Automount
Restoring the Firmware to Factory Default Settings
Using Cellular Modules
Cellular Signal Strength
Cellular Management Utility
Dial-Up Connections
Disconnecting from a Dial-Up Network
Powering On/Off the Cellular Module
Configuring the Wireless LAN
Wi-Fi Management Utility
UC-8540 Series Software UM Advanced Configuration of Peripherals
3-2
moxa@Moxa:~# sudo setinterface /dev/ttyM0 1
UART Port#0 is in RS-485 2-wire interface
moxa@Moxa:~$ sudo stty -a -F /dev/ttyS0
echoctl echoke
Serial Ports
The serial ports support RS-232, RS-422, and RS-485 2-wire operation modes with flexible baudrate settings.
stty
The default operation mode is set to RS-232. Use the
mode as follows:
Usage: setinterface device-node [interface-no]
Device-node: /dev/ttyMn; n = 0,1,2,...
Interface-no: Refer to the following table
Interface
Number
None Display current setting
0 RS-232
1 RS-485 2-wire
2 RS-422
3 RS-485 4-wire
For example, to set /dev/ttyM0 to RS-485 2-wire (RS485-2W) mode and view the current setting, use the
following commands:
Operation Mode
setinterface command to change the operation
Now setting is RS-485 2-wire interface
moxa@Moxa:~# sudo setinterface /dev/ttyM0
The stty command is used to manipulate the serial terminal settings. You can view and modify the serial
terminal settings with this command as described below:
Displaying All Serial Terminal Settings
The following text shows how to display all settings:
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
UC-8540 Series Software UM Advanced Configuration of Peripherals
3-3
moxa@Moxa:~$ sudo stty 115200 -F /dev/ttyS0
moxa@Moxa:~$ sudo stty -a -F /dev/ttyS0
echoctl echoke
NOTE
Refer to the following link for additional details on the stty
http://www.gnu.org/software/coreutils/manual/coreutils.html#stty
ATTENTION
Remember to type the
to prevent loss of
data.
E
auto un
un
Configuring the Serial Terminal Settings
The following example changes the baudrate to 115200.
After you run this command, the baudrate will be changed to 115200.
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
USB Port
The UC-8540 computer has a USB port that you can use to expand the storage capacity of the computer.
USB Automount
The UC-8540 computer supports the hot plug function for connecting USB mass storage devices. However, by
default, the automount utility (udev) only supports automounting of one partition. Use the
view details about all partitions.
xit the /media/usb* directory before you disconnect the storage device. If you stay in this directory, the
-mount process for the device will fail. If that happens, you can type #umount /media/usb* to
mount the device manually.
command:
-invocation
mount command to
#sync command before you disconnect the USB mass storage device
Restoring the Firmware to Factory Default Settings
To load the system‘s factory default settings, press the reset button for at least 5 seconds. While holding the
button for the first 5 seconds, the ready LED will blink once each second. After holding the button continuously
for more than 5 seconds, the ready LED will switch off, indicating that the factory defaults have been loaded.
You can also use the OS’s setdef command to restore the computer to factory defaults:
moxa@Moxa:~$ sudo setdef
UC-8540 Series Software UM Advanced Configuration of Peripherals
3-4
ATTENTION
Reset
Please back up your files before resetting the system to factory defaults. All the data stored in the
computer
when the Reset
modules
Shows module numbers supported
slot
interface [interface id]
start [OPTIONS]
-to-default will erase all the data stored on the boot storage
‘s boot storage will be erased after resetting to factory defaults. Do not turn off the power supply
-to-default process is in progress.
Using Cellular Modules
The UC-8540 computer has a mini PCIe socket for installing a cellular module. Contact your sales
representative for more information about available modules.
Cellular Signal Strength
The following table shows how cellular signal strength is indicated by the signal indicators.
Signal Indicator RSSI (dbm) Condition
3 LEDs on (green) >=-70 Excellent
2 LEDs on (green) -100 to -71 Fair
1 LED on (green) -110 to -101 Poor
No LED on Else No signal
UC-8540

Cellular Management Utility

Moxa provides a cellular management utility to access UC-8540's cellular modules. It's a script program with a
series of command sets to identify, query, configure, dial up or power on/off cellular modules.
Cellular Management Utility (cell_mgmt) Command List
Using cell_mgmt:
cell_mgmt [-i <module id>] [-s <slot id>] <OPTIONS>
OPTIONS
-i <module id>
Module identifier, start from 0 and default to 0
example: wwan0
-s <slot id>
Slot identifier, start from 1 and default value depends
on module interface
example: module 0 may in slot 2
A complete list of the commands with their descriptions is given below:
Command Description
Shows module slot id
Switching and checking module interface(s)
Start network
OPTIONS:
APN - Access point name
PIN - PIN code
Phone - Phone number (especially for AT based modules)
Username
UC-8540 Series Software UM Advanced Configuration of Peripherals
3-5
stop
restart
power_on
power_off
power_cycle
switch_sim <1|2>
gps_on
gps_off
attach_status
status
signal
at <'AT_COMMAND'>
sim_status
unlock_pin <PIN>
pin_retries
pin_protection <enable|disable>
<current PIN>
set_flight_mode <0|1>
get_profiles
set_profile <id> [APN [PDP Type]]
set_apn <APN>
Set APN to configuration file
check_carrier
switch_carrier
<Verizon|ATT|Sprint|Generic>
m_info
module_info
module_ids
iccid
imsi
location_info
operator
vzwauto
version
moxa@Moxa:~$ sudo cell_mgmt start APN=internet PIN=0000
Command Description
Password
Stop network
Restart network
Power ON.
Power OFF
Power cycle the module slot
Switch SIM slot
GPS ON
GPS OFF
Query network registration status.
Query network connection status
Get signal strength
Input AT Command.
Must use SINGLE QUOTATION to enclose AT Command
Query sim card status
Unlock PIN code and save to configuration file
Get PIN code retry remain times
Set PIN protection in the UIM

Dial-Up Connections

You can manually set the APN in the /etc/moxa-cellular-utils/moxa-cellular-utils.conf file. Consult your
service provider for the correct APN name and insert it into the configuration file. To dial up with the default
configuration, use the following command in the following example:
Set module into flight mode (1) or online mode (0)
Get profile list
format:
<id>,<APN>,<PDP Type>
Update PDP profile
Check current carrier
Switching between US carrier frequency bands
Module/SIM information
Module information
Get device IDs (ex: IMEI and/or ESN)
Get SIM card ID
Get IMSI (International Mobile Subscriber Identity)
Get cell location information
Telecommunication operator
Verizon Private Network auto dialup
Cellular management version
UC-8540 Series Software UM Advanced Configuration of Peripherals
3-6
$ sudo cell_mgmt -s 1 switch_sim 2
$ sudo cell_mgmt -s 1 start APN=internet PIN=0000
$ sudo cell_mgmt -i 0 module_info
moxa@Moxa:~$ sudo cell_mgmt stop
moxa@Moxa:~# sudo cell_mgmt power_off
moxa@Moxa:~# sudo cell_mgmt power_on
NOTE
Additional information about qmi utilities can be found at the following link:
http://www.freedesktop.org/wiki/Software/libqmi/
wifi_mgmt [-i <interface id>] [-s <slot id>] [OPTIONS]
Switch SIM Card for Dial-Up Connections
The cell_mgmt tool can be used to choose specific cellular module and switch specific SIM card to Dial-up
connections.
Example 1, switch slot 1 cellular module from SIM slot 1 to SIM slot 2 for Dial-up connection
Example 2, read module info of wwan0

Disconnecting from a Dial-Up Network

Be sure to disconnect the connection if you no longer need the service using the following command:

Powering On/Off the Cellular Module

The cell_mgmt tool can be used to re-initialize the module without rebooting the UC-8540. Issue the following
command to power off the module:
Issue the following command to re-initialize and power on the cellular module:

Configuring the Wireless LAN

Wi-Fi Management Utility

Moxa provides Wi-Fi management utility to access UC-8540's Wi-Fi modules. It's a script program with a series
of command sets to identify, query, configure, connect or power on/off Wi-Fi modules.
Wi-Fi Management Utility (wifi_mgmt) Command List
Using wifi_mgmt:
OPTIONS
-i <interface id> Interface identifier. example: wlan0
-s <slot id> Slot identifier, start from 1 and default value depends on module interface. example: wlan0 may in slot 3
Loading...
+ 86 hidden pages