Manual Idp690
Manual Idp690
User's Guide
T204, Version 01
Legal Notice
This documentation is owned by SkyWave Mobile Communications Inc. (SkyWave) and protected by
applicable copyright laws and international treaty provisions. Other copyrighted names used are the property
of their respective owners. Therefore, you must treat this documentation like any other copyrighted material.
You may not make the documentation, or copies thereof, available in any manner or form, or use, copy or
transfer any part, to anyone outside your company.
If you received this documentation by electronic transmission or download, by installation or use of the
documentation, you acknowledge that you have read and understand this license agreement and agree to be
bound by its terms and conditions.
This documentation is provided on an as-is basis without any warranty of any kind. You assume the entire
risk as to the results or performance of the software. Under no circumstance shall SkyWave be held liable for
any direct, indirect, consequential, or incidental damages arising from the use or inability to use the software
or documentation.
All trademarks or registered trademarks are the property of their respective owners. INMARSAT, the
Inmarsat logo and IsatData Pro are trademarks of Inmarsat used under license by SkyWave. Inmarsat is not
responsible for the operation and regulatory compliance of the products and services referred to in this
document that connect to the Inmarsat system.
SkyWave reserves the right to make changes to products and or specifications without notice.
From www.SkyWave.com login and follow the link to the downloads section. The complete Software and
Documentation License Agreement is distributed as a part of the IDP Developer’s Toolkit.
Contact Information
SkyWave Mobile Communications Inc.
Online:
Website www.SkyWave.com
Online Documentation:
Login at support.skywave.com and follow the link to the downloads section
Customer Support by Email:
[email protected]
Customer Support by Telephone:
+1.613.836.2222
TABLE OF CONTENTS
Legal Notice.................................................................................................................................... ii
Contact Information...................................................................................................................... ii
List of Figures .............................................................................................................................. vii
List of Tables................................................................................................................................ vii
Preface ........................................................................................................................................... ix
Purpose......................................................................................................................................... ix
Audience ...................................................................................................................................... ix
Notation ....................................................................................................................................... ix
Reference ..................................................................................................................................... ix
1 Introduction ......................................................................................................................... 1
1.1 Terminal ............................................................................................................................. 1
1.2 Programming ...................................................................................................................... 2
1.3 Pass-Through Mode............................................................................................................ 2
2 Software Architecture......................................................................................................... 3
2.1 Boot Loader ........................................................................................................................ 3
2.2 Base Firmware .................................................................................................................... 4
2.3 Lua Environment ................................................................................................................ 4
2.3.1 Lua Parser ...................................................................................................................... 5
2.3.2 Lua Services Framework ............................................................................................... 5
2.3.3 Core Services ................................................................................................................. 6
2.3.4 Lua Shell ........................................................................................................................ 6
2.4 Messaging ........................................................................................................................... 6
3 Operational Modes.............................................................................................................. 9
3.1 Normal Mode...................................................................................................................... 9
3.2 Pass-Through Mode............................................................................................................ 9
3.2.1 Exit Pass-through ......................................................................................................... 10
4 Boot Loader ....................................................................................................................... 11
4.1 Startup Sequence .............................................................................................................. 11
4.1.1 No Base Firmware Present........................................................................................... 11
4.1.2 Base Firmware Present ................................................................................................ 11
4.2 Firmware Download ......................................................................................................... 11
4.3 Boot Commands ............................................................................................................... 12
4.4 ? or help ............................................................................................................................ 12
4.5 baud .................................................................................................................................. 13
4.6 erase .................................................................................................................................. 13
4.7 info.................................................................................................................................... 14
4.8 load ................................................................................................................................... 15
4.9 passthru ............................................................................................................................. 16
4.10 reset................................................................................................................................... 17
4.11 start ................................................................................................................................... 18
5 Base Firmware .................................................................................................................. 19
5.1 Flash File System.............................................................................................................. 19
Documentation Version............................................................................................................... 81
Acronyms/Glossary ..................................................................................................................... 82
Index… ......................................................................................................................................... 83
List of Figures
Figure 1 IsatData Pro Communications System ........................................................................... 1
Figure 2 IDP-680 Terminal .......................................................................................................... 2
Figure 3 IDP 600 Series Software Architecture ........................................................................... 3
Figure 4 Command Line Interfaces .............................................................................................. 4
Figure 5 Message Format ............................................................................................................. 7
Figure 6 Pass-Through Mode Configuration.............................................................................. 10
Figure 7 Startup Banner ............................................................................................................. 11
List of Tables
Table 1 Command Line Interpreter ............................................................................................. 5
Table 2 Core Services ................................................................................................................. 6
Table 3 LED Flash Rates .......................................................................................................... 79
Table 4 LED Flash Sequences .................................................................................................. 79
Preface
Note: Refer to any Readme files available on the IDP Developer's Toolkit or
Customer Support website for firmware updates issued after the release of this
document. An Errata Sheet may also be available from the Customer Support
website after the release of this document.
Purpose
This document provides a list of all commands supported by the IDP 600 series terminal.
This document does not describe how to program user services or configure the core
services on the terminal. Users who wish to program user services or configure core
services should consult with documents [T202] and [T204].
Audience
This document is for technical readers.
Notation
This document is associated with terminal firmware version 0.0.1 and modem firmware
version 1.000.
Reference
It is recommended that you be familiar with the content of the following documents
before using this guide. These documents are available from the IDP Developer’s Toolkit
or support.skywave.com.
[N200] IsatData Pro Network Services Overview
[T200] IDP 600 Terminal Series Hardware Guide
[T202] IDP 600 Terminal Series API Reference Guide
[T203] IDP 100 Modem Series Developer's Guide
[T204] IDP 600 Terminal Series Programmer's Guide
1 Introduction
The IDP 600 series of terminals are satellite terminals that use the IsatData Pro service to
provide bidirectional messaging services between the terminal and the IsatData Pro
Gateway via Inmarsat satellite services (Figure 1). IsatData Pro messaging capabilities
make the terminal idea for applications such as vessel and fleet management and security,
remote surveillance, telematics and SCADA. Refer to [N200] for a detailed description of
the IsatData Pro service.
Figure 1 IsatData Pro Communications System
Inmarsat
Satellite
Customer SkyWave
Support Admin
Internet
Messages
Solution Provider
IsatData Pro Land Earth
Application Servers Mobile
Gateway Station (LES) Devices
1.1 Terminal
The IDP 600 series has two terminal models: the IDP-680 and the IDP-690. Both
terminals are designed to be mounted outdoors on platforms such as vehicles or boats,
and are suitable for industrial and fixed applications.
All IDP 600 series terminals are functionally identical except that that the two terminals
have different antenna types. The IDP-680 provides coverage down to 20 degrees to the
satellite and the IDP-690 provides coverage down to -5 degrees to the satellite. Each
IDP 600 series terminal consists of a single environmentally sealed mechanical enclosure
containing an integral antenna, a satellite modem for communicating with the satellite, an
integral GPS, four input/output ports, an RS-232 port, and an RS-485/J1708 port.
Refer to [T200] for additional hardware details about the IDP 600 series terminal.
1.2 Programming
SkyWave provides developer tools to allow the Solution Provider to program the
IDP 600 series terminal to meet specific application requirements. Terminals can be
customized by configuring core services that come with the terminal or by creating new
user services. A complete list of core services and their configurable properties and
network messaging interfaces is documented in [T202].
2 Software Architecture
Figure 3 illustrates the software architecture for the IDP 600 series terminal. The software
architecture is composed of three components:
Boot Loader
Base Firmware
Lua Environment
Both the boot loader and the base firmware run from internal program memory on the
terminal. All Lua applications are stored in a flash file and copied into RAM.
Figure 3 IDP 600 Series Software Architecture
Core User
Services Services
Lua
Firmware
Flash File
Kernel Drivers
Boot Loader System
Terminal Hardware
Base
Firmware Base Firmware
2.4 Messaging
The system adds two bytes to the beginning of all messages sent or received by a service.
The message format is shown in Figure 5.
SIN MIN
Payload
(8 bits) (8 Bits)
3 Operational Modes
The IDP 600 series terminal can operate in pass-through mode or with the Lua
environment.
Terminal
Power Supply
9-32V
I/O 4
EVENT_NOTIFICATION
Connector
~INVALID MODEM_WAKEUP
RS232 Rx
Transceiver SERIAL_RX Modem
RS232 Tx
SERIAL_TX
A break condition on the terminals RS-232 Tx line exits pass-through mode and returns
to the boot loader.
An IDP 600 series terminal always invokes the boot loader on every reset or power-up.
The boot loader puts the terminal in pass-through mode when there is no base firmware
in the terminal.
In pass-through mode the internal IDP modem in the terminal is connected to the
terminal's RS-232 port. Details on the IDP modem interface are described in [T201].
Pass-through mode operates independent of the baud rate programmed on the modem. In
pass-through mode, the terminal's UART is disabled and the terminal bit arbitrates the
modem serial receive/transmit data to its RS-232 port. As a result, there is no need to
program the RS-232 port on the terminal when it is in pass-through mode.
The boot loader also supports entering pass through mode manually via the passthru
command.
4 Boot Loader
The boot loader is a small firmware application which takes control of the system after a
reset occurs. The boot loader does the following:
Perform basic driver initialization
Display a startup banner if base firmware is present (Figure 7)
Perform more hardware tests
CRC Validation of firmware image
Allow for break-in on serial port for serial download (if base firmware present)
Auto-starts base firmware or enters modem pass-through mode.
Figure 7 Startup Banner
IDP-600 series terminal boot loader (Version 3.2.0 (Release))
Copyright (c) 2011 SkyWave Mobile Communications.
The boot loader configures the main RS-232 serial port to 9600 baud, 8 data bits, even
parity, and 1 stop bit.
4.4 ? or help
Syntax
help
Description
Display a list of all the available commands and their descriptions.
Example
boot# help
General syntax: <command> [<args>|help|?]
Available commands:
? - Display this help
baud - Change baud rate
erase - Erase base firmware Image
help - Display this help
info - Display boot loader info
load - Load boot/firmware Image
passthru - Transparent pass-thru
reset - Reset terminal and/or modem
start - Start base firmware
4.5 baud
Syntax
baud [<baudRate>]
Description
Change the baud rate of the serial port.
Parameters
<baudRate>
One of 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, or 115200
Example
Change the baud rate to 115200
boot# baud 115200
Changing baud to 115200
4.6 erase
Syntax
erase force|quiet
Description
Erase the terminal base firmware image from program flash.
CAUTION This will remove the terminal firmware and disable normal
firmware operation
Parameters
force
Skip the yes/no prompt and immediately perform the erase
quiet
Suppress the output of information messages
Example
Erase the terminal firmware without a conformation prompt
boot# erase force
=== Erasing 476 KB of FLASH ===
Prompt for a y confirmation before erasing the terminal firmware image
boot# erase
Erase FLASH? (y/n)
=== Erasing 476 KB of FLASH ===
OK
4.7 info
Syntax:
info
Description
Display the information about the last reset reason, terminal hardware, clock speeds
and loaded software versions, including build date, build time and other info about
the boot loader and the loaded terminal firmware.
Example
boot# info
Terminal info:
Manufacturing ID: ** NOT SET **
H/W Feature mask: 0x0000000000000000
H/W Revision: 3
Reset reason: SOFTWARE
RTC Clock: Ready
SYSCLK: 32 MHz
ADCCLK: 4 MHz
4.8 load
Syntax
load [force|quiet]
Description
Load terminal boot loader or base firmware image using X or Y modem serial
protocol at the current baud rate. Loading is as follows:
The X/Y modem receiver side protocol is initiated with the output of packet
solicitation characters (C or ASCII 0x43) every 2 seconds
The terminal aborts the protocol if no transmitter side protocol is present
after 200 seconds.
Two <CTRL-X> characters in a row cancel the X-Modem transfer.
When the transfer is complete, the boot loader displays details (image type,
version etc.) of the image and prompts for a confirmation to program the flash
If the CRC is bad or invalid, the programming sequence is aborted
Parameters
force
Skips yes/no confirmation and over-rides CRC validation
quiet
Suppress the output of information messages
Example
Start the X/Y modem receive protocol with CRC validation and prompting for write
confirmation
boot# load
Start X-Modem transfer now! (CTRL-X to cancel)
CCCC
4.9 passthru
Syntax
passthru [reset]
Description
Enter transparent pass-thru mode with the modem. Asserting a <BREAK> condition
returns to the terminal boot loader.
Parameters
reset
Resets the modem before entering pass-through mode
Example
boot# passthru reset
Entering pass-thru mode (modem reset)
Notes
Enter pass-through mode to the IDP modem after first resetting it, to allow access to the
boot loader of the modem. In this example, a <BREAK> condition was asserted,
resulting in a return to the boot loader prompt.
4.10 reset
Syntax
reset [modem|all]
Description
Reset the terminal processor and/or the IDP modem.
Parameters
modem
Reset the modem (H/W reset)
all
Reset both the modem and the terminal processor
Example
Perform a reset of the terminal applications processor.
boot# reset
4.11 start
Syntax
start [nolua|force|safemode|factoryreset]
Description
Start execution of the terminal's base firmware. This command fails if a terminal base
firmware image is not present.
Parameters
nolua
Start the terminal base firmware and do NOT automatically start the Lua service
framework
force
Start the terminal base firmware even if the CRC of the image is not valid or
present
safemode
Start the terminal base firmware and start the Lua Services Framework with
default properties and no user services (temporary)
factoryreset
Start the terminal base firmware after resetting the Lua service framework to
factory defaults (persistent)
Example
Start the base firmware, if the CRC is valid
boot# start
Starting application
5 Base Firmware
5.1 Flash File System
The terminal uses serial flash file system to store the Lua Services Framework,
configuration, user services and user data.
The file system is structured as a single volume (called sys:) which is structured as
follows:
act/ Active directory
infra/ Infrastructure (SkyWave Private)
svc/ LSF Core Services (SkyWave Private)
user/ User service directory
MyService/ User service 'MyService' folder for code
svclist.lua User service registration file
config/
svc/
rs232.lua Saved rs232 service property values
user/
MyService.lua Saved user service property values
5.3 ? or help
Description
Display a list of all the available commands and their descriptions.
Syntax
help
Example:
# help
General syntax: <command> [<args>|help|?]
Available commands:
? - Display this help
baud - Change baud rate
cd - Change the current working directory
check - Check file system integrity
copy - Copy a file
del - Delete a file
dir - Display the contents of a directory
dl - Start YMODEM download session
format - Format a file system volume
help - Display this help
info – Display terminal information
init - Initialize the file system volume
listv - List file system volumes
mem - Display current firmware memory usage
mkdir - Create a directory
rename - Rename a file/directory
reset - Reset terminal and/or modem
rmdir - Remove a directory
start - Start Lua services framework
tasks - Display kernel task information
tod - Display/set terminal time-of-day
trace - Control serial tracing
type - Display the contents of a file
ulx - X-Modem upload
uly - Y-Modem upload
5.4 baud
Description
Change the baud rate of the serial port.
Syntax
baud [<baudRate>]
Parameters
<baudRate>
One of 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, or 115200
Example:
Change the baud rate to 115200.
# baud 115200
Changing baud to 115200
5.5 cd
Description
Display the current directory or change to the specified directory.
Syntax
cd [<dirpath>]
Parameters
<dirpath>
Optional relative or absolute directory path to change to.
Example:
Perform a relative directory change to the directory act/svc.
# cd act/svc
Change to a higher directory level.
# cd ..
Change to a higher directory level.
# cd
sys:act/svc
5.6 check
Description
Check file system integrity of the specified volume and display any problems. If no
volume is provided, the default volume (sys:) is used.
Syntax
check [<volume>]
Parameter
<volume>
Volume to check (default: sys:)
Example:
Check the default file system for integrity.
# check
OK
5.7 copy
Description
Copy one file from one location to another.
Syntax
copy <scrfile> <dstdir|dstfile>
Parameter
<scrfile>
Source file to copy
<dstdir>
Destination directory
<dstfile>
New file name
Example:
Copy the file main.lua to the directory act/svc/test.
# copy main.lua act/svc/test
5.8 del
Description
Delete a file.
Syntax
del <file>
Parameter
<file>
File to delete
Example:
Delete the file stuff.lua.
# del stuff.lua
5.9 dir
Description
Display the contents of the current or specified directory. The display includes the
type of file, the file size, creation timestamp of the file, and the file name.
Syntax
dir [<dirpath>]
Parameter
<dirpath>
Relative or absolute directory path to display
Example:
Display the contents of the current directory.
# dir
(Dir) --- 0 31/03/2011 16:50:30 act
(Dir) --- 0 01/01/1980 00:00:00 data
(Dir) --- 0 01/01/1980 00:00:00 logs
5.10 dl
Description
Starts a Y-Modem download session.
Syntax
dl
Example:
# dl
Start Y-Modem transmit now!
CCC
5.11 format
Description
Format a volume for file system operation.
Syntax
format <volume>
Parameter
<volume>
Volume name to format
Example:
Format the main file system.
# format sys:
Formatting volume sys:
5.12 info
Description
Display the information about the last reset reason, terminal hardware, clock speeds
and loaded software versions.
Syntax
info
Example:
# info
Terminal info
Manufacturing ID: ** NOT SET **
H/W Revision: 3
Reset reason: SOFTWARE
SYSCLK: 32 MHz
ADCCLK: 4 MHz
RTC Clock: Ready
Uptime: 0 days, 0 hours, 6 mins, 21 secs
5.13 init
Description
Initialize the file system volume. This command verifies that the volume is formatted
and accessible.
Note: This command is used primarily by the automatic tools.
Syntax
init [<volume>]
Parameter
<volume>
Volume to init (default: sys:)
Example:
Initialize the default file system.
# init
OK
5.14 listv
Description
List the information about the current file system volumes.
Syntax
listv
Example:
# listv
Sizes Clusters Volume (bytes)
Volume Sector Cluster Total / Free Size Free Used
sys: 512 1024 3361 / 3090 3441664 3164160 8%
5.15 mem
Description
Display current firmware memory usage.
Syntax
mem
Example:
# mem
FLASH Usage: 243478 bytes of 476K (49%)
SRAM Usage:
Internal: 34199 bytes of 48K (69%)
External: 19433 bytes of 64K (29%)
External: Lua HEAP: 960K
5.16 mkdir
Description
Creates a directory. The parent directory must exist.
Syntax
mkdir <dirpath>
Parameter
<dirpath>
Path of the directory to create
Example:
Create the director test in the current directory.
# mkdir test
5.17 rename
Description
Rename a file or directory.
Syntax
rename <old><new>
Parameter
<old>
File or directory to rename
<new>
New name
Example:
Change the name of main.lua to main_old.lua.
# rename main.lua main_old.lua
5.18 reset
Description
Reset the terminal processor and/or the IDP modem.
Syntax
reset [modem|all]
Parameter
modem
Reset the IDP modem (H/W reset)
all
Reset both the IDP modem and the terminal processor
Example:
Perform a reset of the IDP modem.
# reset modem
OK
Perform a reset of the terminal applications processor
# reset
OK
5.19 rmdir
Description
Removes (deletes) a directory.
CAUTION Recursive removal of directories could render the terminal
inoperative.
Syntax
rmdir [-recurse] <dirpath>
Parameter
-recurse
Recursively removes all files and directories
<dirpath>
The directory path to remove
Example:
Remove the directory log.
# rmdir log
Recursively remove the act/svc directory.
# rmdir -recurse act/svc
5.20 start
Description
Start the Lua framework which is located on the flash file-system. This allows access
to the shell prompt of the shell service if it is enabled.
Syntax
start [safemode|factoryreset]
Parameter
safemode
Start the terminal base firmware and start the Lua Services Framework with
default properties and no user services (temporary)
factoryreset
Start the terminal base firmware after resetting the Lua Service Framework to
factory defaults (persistent)
Example:
Start the Lua framework.
# start
Starting the Lua services framework
Attaching shell
shell>
Start the Lua framework after resetting the configuration of all services to their
factory defaults.
# start factoryreset
Starting the Lua Services Framework
*** warning: Restoring to factory defaults
Attaching shell
shell>
5.21 tasks
Description
Display kernel task information.
Syntax
tasks [clear]
Parameter
clear
Clear the context switch counters and CPU time counters
Example:
Display the currently running kernel tasks.
# tasks
Kernel Tasks:
Pri Name State SP Size/Used SyncObj Ctx Switches CPU Time
5 Main Rx Q 20002A40 200( 44) 20003B84 24 / 0% 1
6 Modem Rx Q 20002D64 200( 56) 20003BA0 430 / 5% 78
14 CmdLine R 20002528 1800( 632) 00000000 6824 / 93% 71494
15 Idle R 20002744 96( 20) 00000000 --- / --- 238732
Total non-idle context switches: 7278
5.22 tod
Description
Display and set the terminal UTC time-of-day. The time and date can be set
individually using the time and date options, or the time can be set as an offset from
the system EPOCH.
Syntax
tod [date <yyyy> <mm> <dd>|time <hh> <mm> <ss>|set
<offset> [force]]
Parameter
date
Change the current date
<yyyy>
Year value (2010 -)
<mm>
Month (1 – 12)
<dd>
Day (1 – 31)
time
Change the current time (24 hour format)
<hh>
Hour (0 – 23)
<mm>
Minute (0 – 59)
<ss>
Second (0 – 59)
Set: set the date/time using seconds since EPOCH
<offset>
Offset in seconds from Jan 1, 1970
[force]
Optional keyword to set the time, even if it is already set
Example:
Display the current terminal time-of-day.
# tod
16/03/2011 21:28:46.748 UTC
Set the date to January 5th, 2011.
# tod date 2011 1 5
5.23 trace
Description
Controls the serial debug tracing mechanism.
Syntax
trace [baud|channel|disable|enable|mask|msg|reset]
Example:
Display the current tracing configuration.
# trace
Status: enabled
Channel: debug
Default baud: 115200
Current trace mask: init,sys,cmd,fs,luac,luat,dbg
Supported trace masks: init,sys,cmd,fs,luac,luat,dbg
5.24 type
Description
Display the contents of a file. If the file is a compiled Lua file, then the message
"Compiled lua file" is displayed.
Syntax
type <file>
Parameter
<file>
File to display
Example:
Display what happens when attempting to type a compiled Lua file.
# type act/svc/core.lua
Compiled lua file
Display the content of the file act/svc/user.lua.
# type act/svc/core.lua
Service(128,"test")
5.25 ulx
Description
Upload a file using the X-Modem protocol.
Syntax
ulx <file>
Parameter
<file>
File to transmit using the X-Modem
Example:
Start an X-Modem transmit session to send the file data.lua.
# ulx data.lua
Starting X-Modem upload
5.26 uly
Description
Upload one or more files using the Y-Modem protocol.
Syntax
uly <file> [… <file>]
Parameter
<file>
File to transmit using the Y-Modem protocol
Example:
Send the files data/mylog.dat and foo.lua.
# uly data/mylog.dat foo.lua
Starting Y-Modem upload
6.2.1 system
The system service provides management and control of the global aspects of the
terminal including service management, terminal reset functionality and querying of
terminal state. It also provides the interface to query and set properties of all services.
6.2.2 message
The message service is responsible for making sure that any incoming messages are
routed to the appropriate service, and that outgoing messages are sent over the
appropriate transport, and in the appropriate format.
6.2.3 report
The report service sends out report messages, consisting of properties from various
services, either on-demand or following pre-configured schedules.
6.2.4 position
The position service provides an abstract interface into the available GPS interfaces
supported by the terminal. This service provides mechanisms to request GPS fixes and
query GPS location and time.
6.2.5 geofence
The geofence service is used to configure the geofence.
6.2.6 rs232
The rs232 service is used to configure, and provide access to, the terminal's RS-232 port
6.2.7 log
The log service provides the ability to store data in non-volatile storage for history and/or
troubleshooting purposes. The data log can store any outgoing message; the debug log
stores arbitrary strings.
6.2.8 eio
The eio service provides a simple mechanism to configure the terminal's four general-
purpose external I/O ports, and provides the current values of those four ports, as well as
two analog input ports for temperature and voltage. It also allows for alarm messages to
be sent out based on the state of individual inputs.
6.2.9 shell
The shell service provides an optional command line interface on the RS-232 interface
which can be used to issue interactive commands while the framework is running.
6.2.10 filesystem
The filesystem service provides an interface to the flash file system on the terminal. This
includes mechanisms to query directory information and send/receive files.
6.2.11 idp
The idp service provides properties and functionality specific to the IsatData Pro satellite
network interface.
7 Shell Commands
If the shell service is enabled via the attached property of the shell service, then the shell
prompt (shell>) is available on the RS-232 serial port. The RS-232 configuration depends
on the properties of the rs232 service, which default to 9600 baud, 8 data bits, no parity,
1 stop bit.
7.1 ? or help
Syntax
help
Description
Display a list of all the available commands and their descriptions.
Example
shell> help
Available commands:
? - Display this help
cd - Change the current working directory
comp - Compile the specified file
copy - Copy a file
del - Delete a file
dir - Display a directory
geo - Issue a geofence command
help - Display this help
idp - Issue an idp command
info - Display terminal info
listv - List file-system volumes
log - Issue a log command
lua - Execute Lua expression
mem - Display free memory
mkdir - Make a directory
msg - Issue a msg command
prop - Issue a property command
rename - Rename a file/directory
report - Generate a report
rmdir - Remove a directory
service - Issue a service command
stop - Stop the Lua environment
threads - Display spawned threads
tod - Display terminal time-of-day
type - Display the contents of a file
7.2 cd
Syntax
cd [<path>]
Description
Display the current directory or change to the specified directory.
Parameter
<path>
Relative or absolute directory path to change to.
Example
Perform a relative directory change to the directory act/svc.
shell> cd act/svc
Change to a higher directory level.
shell> cd ..
Change to a higher directory level.
shell> cd
sys:act/svc
7.3 comp
Syntax
comp <input file> [<output file>]
Description
Compile a Lua source file. If only an input file is specified, then the source is
replaced with the compiled version.
Parameter
<input file>
Lua source file to compile
<output file>
Optional file name of the compiled result
Example
Compile the file testcode.lua and replaces the file with the complied output.
# comp testcode.lua
Compiled "testcode.lua"
7.4 copy
Syntax
copy <sfile> <dpath|dfile>
Description
Copy one file from one location to another.
Parameter
<sfile>
Source file to copy
<dpath>
Destination path to copy the file to
<dfile>
New file name
Example
Copy the file main.lua to the directory act/svc/test
# copy main.lua act/svc/test
7.5 del
Syntax
del <file>
Description
Delete a file
Parameter
<file>
File to delete
Example
Delete the file stuff.lua
# del stuff.lua
7.6 dir
Syntax
dir [<dirpath>]
Description
Display the contents of the current or specified directory.
Parameter
<dirpath>
Relative or absolute directory path to display
Example
Display the contents of the current directory
shell> dir
D----- 0 01/01/2010 00:00:00 act
D----- 0 01/01/2010 00:00:00 data
D----- 0 01/01/2010 00:00:00 logs
Found 0 files using a total of 0 bytes.
7.7 geo
Syntax
geo ?|help|<command>
Description
Issue a geofence command.
Parameter
? or help
List the available geo commands
<command>
Geo command
Example
shell> geo ?
Available commands:
? - Display this help
help - Display this help
show - Display geofence information
7.8 idp
Syntax
idp ?|help|<command>
Description
Issue an IDP modem command.
Parameter
? or help
List the available IDP commands
<command>
IDP commands
Example
shell> idp ?
Available commands:
? - Display this help
getmetrics - Get a metrics block
getsreg - Get an S-register value
help - Display this help
info - Display idp information
setsreg - Set an S-register value
7.9 info
Syntax
info
Description
Display the information about the terminal including hardware configuration and
framework and firmware version information.
Example
shell> info
Terminal Hardware
H/W Revision: 0
Last Reset Reason: 6 (SOFTWARE)
Memory Size: 960K
Uptime: 0 days, 0 hours, 46 mins, 46 secs
7.10 listv
Syntax
listv
Description
List the information about the current file system volumes.
Example
shell> listv
Sizes Clusters Volume (bytes)
Volume Sector Cluster Total / Free Size Free Used
sys: 512 1024 3361 / 3090 3441664 3164160 8%
7.11 log
Syntax
log ?|help|<command>
Description
Issue a log command of the log service.
Parameter
? or help
List the available log commands
<command>
Log command
Example
shell> log ?
Available commands:
? - Display this help
clear - Clear all log files for a specified log type
count - Show the number of remaining entries that match the filter
filter - Set a new query filter
help - Display this help
next – Show log entries that match the filter
Set the message filter to select all message logs where sin=20 (all min values).
shell> log filter type=msg include=20
Set the debug filter to select all debug logs for timestamps between 1308225600 and
1308229200 (12pm to 1pm on June 15th, 2011), where the level is 0, 1, 2 or 3.
shell> log filter type=dbg timeStart=1308225600 timeEnd=1308229200
levels=15
Reset the debug filter to include all debug logs
shell> log filter type=dbg
7.12 lua
Syntax
lua [<expression>]
Description
Execute a Lua expression or enter a Lua interactive environment. If an expression is
provided, it is compiled and executed immediately. If the expression is not a
complete statement, then the shell drops to the lua+ prompt to ask for more input to
complete the Lua expression.
A special operator (=) can be placed at the start of an expression which causes the
shell to execute the expression and display the returned value using the dumpvar()
utility.
Parameter
<expression>
Optional Lua expression to execute
Example
Call the Lua function dumpvar() with the Lua table svc.shell as an argument
shell> lua dumpvar(svc.shell)
["table: 6407dcc0"] = { -- table: 6407dcc0 (count= 0)
properties = { -- table: 6407d9c8 (count= 0)
};
unregister = function: 64086fd0;
_PACKAGE = "svc.";
attach = function: 640871a0;
detach = function: 640871f0;
_VERSION = "1.3.1";
_SIN = 26;
register = function: 64086fb0;
dumpHelp = function: 64086c98;
_NAME = "svc.shell";
init = function: 64087410;
entry = function: 64086cd8;
_M = ref"table: 6407dcc0";
onTermination = function: 640873d0;
7.13 mem
Syntax
mem [gc]
Description
Displays the current size and usage of the Lua system heap.
Parameter
gc
Optionally perform a full garbage collection before displaying the memory
Example
Display the current memory usage
shell> mem
Used heap memory: 438K of 960K (46%)
Display the current memory usage after forcing a full garbage collection
shell> mem gc
Used heap memory: 433K of 960K (45%)
7.14 mkdir
Syntax
mkdir <path>
Description
Create a directory. The parent directory must exist.
Parameter
<path>
Path of directory to create
Example
Create the directory test in the current directory
shell> mkdir test
7.15 msg
Syntax
msg ?|help|<command>
Description
Issue a messaging command to send messages via the transport service.
Parameter
? or help
List the available msg commands
<command>
msg command
Example
shell> msg ?
Available commands:
? - Display this help
add - Add a custom message for Tx
cancel - Cancel message tranmission
help - Display this help
list - List currently queued Tx messages
Lifetime
Age of the message
Transport being used
Transmit attempt
Message time stamp
Parameter
<reference #> >
Reference number of the message to list
Example
List all the messages in the transmit queue along with the last 5 completed messages
shell> msg list
Ref# SIN MIN Status S L R P Life Age T Att Time
1 16 6 Success N Y N 3 60 0 0 1 01/01/70 00:00:00
2 16 8 Success Y N N 3 60 0 1 1 07/07/11 16:36:34
3 16 7 Success N Y N 3 60 0 0 1 07/07/11 16:36:18
4 18 1 Success Y N N 3 60 0 1 1 07/07/11 16:36:44
5 18 1 Cancelled Y N N 3 60 0 1 1 07/07/11 16:37:33
List the information for message #2 and #4
shell> msg list 2 4
Ref# SIN MIN Status S L R P Life Age T Att Time
2 16 8 Success Y N N 3 60 0 1 1 07/07/11 16:36:34
4 18 1 Success Y N N 3 60 0 1 1 07/07/11 16:36:44
7.16 prop
Syntax
prop ?|help|<command>
Description
Issue a property command
Parameter
? or help
List the available property commands
<command>
Property command
Example
shell> prop ?
Available commands:
? - Display this help
get - Get a property value
help - Display this help
reset - Reset a property to its default value
revert - Revert a property to its last saved value
save - Save modified property values
set - Set a property value
7.17 rename
Description
Rename a file or directory.
Syntax
rename <old> <new>
Parameter
<old>
File or directory to rename
<new>
New name
Example
Change the name of main.lua to main_old.lua
shell> rename main.lua main_old.lua
7.18 report
Syntax
report [<option>=<val>] [<SIN>] [<MIN>]
Description
Generate and query report configuration.
Parameter
<option>
send=<true|false>
Specifies if the report should be queued for transmission (default: true)
log=<true|false>
Specifies if the report should be logged. (default: false)
priority=<n>
Sets the message priority (1 - 4) (default: 1)
retry=< true|false>
Specifies if retries are attempted (default: false)
lifetime=<N>
Specifies the lifetime of the message (1 - 1440 minutes) (default: 60 minutes)
<SIN>
Optional SIM of report to send (default: 19)
<MIN>
The MIN of report to send
Example
Displays the current reporting configuration
shell> report
# SIN MIN Enabled Offset Interval Next Report
1 19 1 Yes 15 60 07/08/11 15:15:26
2 19 2 Yes 0 120 07/08/11 16:00:26
3 128 1 No 45 60 n/a
4 128 5 Yes 0 1440 07/09/11 00:00:26
Queues report 1 (simpleReport) for transmission using default values
shell> report 1
Report will be queued when position data is available. Please use
'msg list' to track the report.
Logs report 2 (fullReport) without transmitting it
shell> report send=false log=true 2
Report will be queued when position data is available. Please use
'msg list' to track the report.
7.19 rmdir
Syntax
rmdir [-recurse] <dirpath>
Description
Removes (deletes) a directory
CAUTION Recursive removal of directories could render the terminal
inoperative.
Parameter
[-recurse]
Recursively removes all files and directories
<dirpath>
The directory path to remove
Example
Remove the directory log
shell> rmdir log
Recursively remove the act/svc directory
shell> rmdir -recurse act/svc
7.20 service
Syntax
service ?|help|<command>
Description
Issue a service command.
Parameter
? or help
Lists the available service commands
<command>
Service command
Example
shell> service ?
Available commands:
? - Display this help
help - Display this help
list - Display a list of services
restart - Restart a service
Detaching shell
Attaching shell
shell>
7.21 stop
Syntax
stop [now|start|reset [now]]
Description
Stop the Lua service environment and optionally restart it or reset the terminal.
CAUTION Using the now option to force an immediate stop skips normal
shutdown procedures and could result in lost data
Parameter
now
Stops the environment immediately without a clean shutdown
start
Re-starts the environment after stopping it
reset
Resets the terminal after stopping the environment
now
Resets the terminal immediately
Example
Stop the Lua services framework
shell> stop
Gracefully restart the Lua services framework
shell> stop start
Force an immediate stop of the Lua services framework
shell> stop now
Force an immediate reset of the terminal
shell> stop reset now
7.22 threads
Syntax
threads
Description
Display the currently active threads being managed by the scheduler.
Example
shell> threads
thread: 6403ee18 shell_entry suspended
thread: 640637c8 log_entry suspended
thread: 6406a7c0 position_entry suspended
thread: 6406b3d0 filesystem_entry suspended
thread: 64064320 rs232_entry suspended
thread: 640a25d8 Shell Cmd Processor suspended
thread: 6406fdf8 report_entry suspended
thread: 640687c0 eio_entry suspended
thread: 6406ff70 geofence_entry suspended
thread: 64063700 message_entry suspended
thread: 6405f958 idp_entry suspended
thread: 6401a058 Shell CLI suspended
thread: 64053620 system_entry suspended
thread: 64043308 CMD:threads running
7.23 tod
Syntax
tod
Description
Display the terminal time-of-day
Example
shell> tod
Wed Mar 16 19:15:59 2011 UTC
7.24 trace
Syntax
trace [baud|channel|disable|enable|mask|msg|reset]
Description
Controls the serial debug tracing mechanism.
Example
Display the current tracing configuration
# trace
Status: enabled
Channel: debug
Default baud: 115200
Current trace mask: init,sys,cmd,fs,luac,luat,dbg
Supported trace masks: init,sys,cmd,fs,luac,luat,dbg
7.25 type
Syntax
type [-hex] <file>
Description
Display the contents of a file. If the file is a compiled Lua file, then the message
"Compiled lua file" is displayed.
Parameter
[-hex]
Display the file in hexadecimal mode
<file>
File to display
Example
Display what happens when attempting to type a compiled Lua file
shell> type act/svc/svclist.lua
Compiled lua file
Display the same file in hex mode
shell> type -hex act/svc/svclist.lua
000000 1B 4C 75 61 51 00 01 04 04 04 04 04 00 00 00 00 .LuaQ...........
000010 00 00 00 00 00 00 00 00 00 00 02 03 2D 00 00 00 ............-...
000020 05 00 00 00 41 40 00 00 81 80 00 00 1C 40 80 01 ....A@..??...@?.
000030 05 00 00 00 41 C0 00 00 81 00 01 00 1C 40 80 01 ....A?..?....@?.
000040 05 00 00 00 41 40 01 00 81 80 01 00 1C 40 80 01 ....A@..??...@?.
000050 05 00 00 00 41 C0 01 00 81 00 02 00 1C 40 80 01 ....A?..?....@?.
000060 05 00 00 00 41 40 02 00 81 80 02 00 1C 40 80 01 ....A@..??...@?.
000070 05 00 00 00 41 C0 02 00 81 00 03 00 1C 40 80 01 ....A?..?....@?.
000080 05 00 00 00 41 40 03 00 81 80 03 00 1C 40 80 01 ....A@..??...@?.
000090 05 00 00 00 41 C0 03 00 81 00 04 00 1C 40 80 01 ....A?..?....@?.
0000A0 05 00 00 00 41 40 04 00 81 80 04 00 1C 40 80 01 ....A@..??...@?.
0000B0 05 00 00 00 41 C0 04 00 81 00 05 00 1C 40 80 01 ....A?..?....@?.
0000C0 05 00 00 00 41 40 05 00 81 80 05 00 1C 40 80 01 ....A@..??...@?.
0000D0 1E 00 80 00 17 00 00 00 04 08 00 00 00 53 65 72 ..?..........Ser
0000E0 76 69 63 65 00 FE 10 00 00 00 04 07 00 00 00 73 vice.?.........s
0000F0 79 73 74 65 6D 00 FE 1B 00 00 00 04 04 00 00 00 ystem.?.........
000100 69 64 70 00 FE 12 00 00 00 04 08 00 00 00 6D 65 idp.?.........me
000110 73 73 61 67 65 00 FE 17 00 00 00 04 04 00 00 00 ssage.?.........
000120 6C 6F 67 00 FE 16 00 00 00 04 06 00 00 00 72 73 log.?.........rs
000130 32 33 32 00 FE 19 00 00 00 04 04 00 00 00 65 69 232.?.........ei
000140 6F 00 FE 14 00 00 00 04 09 00 00 00 70 6F 73 69 o.?.........posi
000150 74 69 6F 6E 00 FE 13 00 00 00 04 07 00 00 00 72 tion.?.........r
000160 65 70 6F 72 74 00 FE 18 00 00 00 04 0B 00 00 00 eport.?.........
000170 66 69 6C 65 73 79 73 74 65 6D 00 FE 1A 00 00 00 filesystem.?....
000180 04 06 00 00 00 73 68 65 6C 6C 00 FE 15 00 00 00 .....shell.?....
000190 04 09 00 00 00 67 65 6F 66 65 6E 63 65 00 00 00 .....geofence...
0001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
8 LED Operation
The LED inside the terminal casing is used as a startup indicator. There are 3 different
rates of LED flashing as shown in Table 3.
Table 3 LED Flash Rates
LED Flash On Time Period Cycles Total Time
Rate
Slow 200 milli-seconds 2 seconds 5 10 seconds
Normal 200 milli-seconds 1 second 10 10 seconds
Fast 50 milli-seconds 250 milli-seconds 40 10 seconds
Different startup conditions determine which flash rate sequence is used as shown in
Table 4.
Table 4 LED Flash Sequences
Startup Condition LED Flash Sequence
Entering pass-through mode Slow flash for 10 seconds
Normal, DTE Connected, no error Normal flash for 10 seconds
Normal, DTE Disconnected, no error Normal flash for 10 seconds
Normal, DTE Connected, Boot ERROR Fast flash for 10 seconds
Normal, DTE Connected, Base ERROR Normal Flash for 5 seconds
Fast flash for 10 seconds
Normal, DTE Disconnected, Boot ERROR Fast flash for 10 seconds
Normal, DTE Disconnected, Base ERROR Fast flash for 10 seconds
Documentation Version
Version Date Details
01 Aug 2011 Official customer release
Acronyms/Glossary
API application programming interface
CRC Cyclic Redundancy Check, a type of checksum
DTE data terminal equipment (e.g., computers and serial printers)
EIO external input/output
enum enumeration/enumerated
EPOCH Jan 1st, 1970
I/O input/output
LES land earth station
LSF Lua Services Framework
Lua A robust, fast, embeddable scripting language.
NVM non-volatile memory
RTC real-time clock
Rx receive
SIN service identification number
Tx transmit
UTC Coordinated Universal Time
Index…