19
2012-01-27
wm_java_usersguide_v19
Confidential / Released
TC65i, TC65i-X, EGS5, EGS5-X
GENERAL NOTE
THE USE OF THE PRODUCT INCLUDING THE SOFTWARE AND DOCUMENTATION (THE "PRODUCT") IS SUBJECT TO THE RELEASE NOTE PROVIDED TOGETHER WITH PRODUCT. IN ANY
EVENT THE PROVISIONS OF THE RELEASE NOTE SHALL PREVAIL. THIS DOCUMENT CONTAINS INFORMATION ON CINTERION PRODUCTS. THE SPECIFICATIONS IN THIS DOCUMENT
ARE SUBJECT TO CHANGE AT CINTERION'S DISCRETION. CINTERION WIRELESS MODULES
GMBH GRANTS A NON-EXCLUSIVE RIGHT TO USE THE PRODUCT. THE RECIPIENT SHALL NOT
TRANSFER, COPY, MODIFY, TRANSLATE, REVERSE ENGINEER, CREATE DERIVATIVE WORKS;
DISASSEMBLE OR DECOMPILE THE PRODUCT OR OTHERWISE USE THE PRODUCT EXCEPT
AS SPECIFICALLY AUTHORIZED. THE PRODUCT AND THIS DOCUMENT ARE PROVIDED ON AN
"AS IS" BASIS ONLY AND MAY CONTAIN DEFICIENCIES OR INADEQUACIES. TO THE MAXIMUM
EXTENT PERMITTED BY APPLICABLE LAW, CINTERION WIRELESS MODULES GMBH DISCLAIMS ALL WARRANTIES AND LIABILITIES. THE RECIPIENT UNDERTAKES FOR AN UNLIMITED
PERIOD OF TIME TO OBSERVE SECRECY REGARDING ANY INFORMATION AND DATA PROVIDED TO HIM IN THE CONTEXT OF THE DELIVERY OF THE PRODUCT. THIS GENERAL NOTE
SHALL BE GOVERNED AND CONSTRUED ACCORDING TO GERMAN LAW.
Copyright
Transmittal, reproduction, dissemination and/or editing of this document as well as utilization of its contents and communication thereof to others without express authorization are prohibited. Offenders will
be held liable for payment of damages. All rights created by patent grant or registration of a utility model
or design patent are reserved.
Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the
United States and/or other coun tries. All other registered trademarks or trademarks mentioned in this
document are property of their respective owners.
wm_java_usersguide_v19Page 2 of 1092012-01-27
Confidential / Released
wm_java_usersguide_v19Page 9 of 1092012-01-27
Confidential / Released
Java User’s Guide
1 Preface
10
1Preface
This document covers the full range of IMP-NG Java products from Cinterion Wireless Modules, currently including:
1. TC65i Module
2. TC65i-X Module
3. EGS5 Module
4. EGS5-X Module
Differences between the products are noted in the particular chapters. Throughout the docu-
ment, all supported products are referred to as ME (Mobile Equipment). For use in file, directory
or path names, the string “<productname>” represents the actual name of a product, for example TC65i. Screenshots are provided as examples and, unless otherwise stated, apply to all
supported products.
wm_java_usersguide_v19Page 10 of 1092012-01-27
Confidential / Released
Java User’s Guide
2 Overview
12
2Overview
The ME features an ultra-low profile and low-power consumption for data (CSD and GPRS),
voice, SMS and fax. Java technology and several peripheral interfaces on the module allow you
to easily integrate your application.
This document explains how to work with the ME, the installation CD an d the tools provided on
the installation CD.
Figure 1: Overview
2.1Related Documents
List of documents referenced throughout this manual:
[1]AT Command Set of your Cinterion Wireless Modules product
[2]Hardware Interface Description of your Cinterion Wireless Modules product
[3]Java doc \wtk\doc\html\index.html
[4]IMP-NG, JSR228, Standard
wm_java_usersguide_v19Page 11 of 1092012-01-27
Confidential / Released
Java User’s Guide
2.2 Terms and Abbreviations
12
2.2Terms and Abbreviations
AbbreviationDescription
APIApplication Program Interface
ASCAsynchronous Serial Controller
CLDCConnected Limited Device Configuration
CMTKCinterion Mobility Toolkit
CSDCircuit-Switched Data
DAIDigital Audio Interface
DCDData Carrier Detect
DSRData Set Ready
GPIOGeneral Purpose I/O
GPRSGeneral Packet Radio Service
HTTPHypertext Transfer Protocol
I/OInput/Output
IDEIntegrated Development Environment
IPInternet Protocol
Java ME
Java SE
JADJava Application Description
JARJava Archive
JDKJava Development Kit
JVMJava Virtual Machine
LEDLight Emitting Diode
MEMobile Equipment
MESModule Exchange Suite
MIDPMobile Information Device Protocol
OTAOver The Air
OTAPOver The Air Provisioning of Java Applications
PDPPacket Data Protocol
PDUProtocol Data Unit
™
™
Java Micro Edition (also known as J2ME)
Java Standard Edition
SDKStandard Development Kit
SMSShort Message Service
TCPTransfer Control Protocol
URCUnsolicited Result Code
URLUniversal Resource Locator
VBSVisual Basic Script
WTKWireless Toolkit
wm_java_usersguide_v19Page 12 of 1092012-01-27
Confidential / Released
Java User’s Guide
3 Installation
19
3Installation
3.1System Requirements
The Cinterion Mobility Toolkit (CMTK) requires that you have:
•Windows XP, Windows Vista or Windows 7 installed
•110 Mbytes free disk space for the CMTK (without JDK and IDE)
•Administration privileges
•Java SE Development Kit 6 Update 25. To install the JDK version 1.6.0_25 provided on CD,
follow the instructions in Section 3.3.1.
If a Java IDE such as NetBeans (as of 6.5 - 6.9.1) or Eclipse (as of 3.6.0 - Helios SR2) is installed, the CMTK environment can be integrated into it during installation of the CMTK. To install one of the IDEs, follow the installation instructions in Section 3.3.1.
If you wish to access the module via USB ensure that the USB cable is plugged between the
module’s USB interface and the PC.
3.2Insta llation CD Content
The Cinterion Mobility Toolkit Installation CD includes:
•Wireless Toolkit. The WTK is the directory where all the necessary components for product
specific Java application creation and debugging are stored. The WTK version is stored in
a text file under "Program Files\Cinterion\CMTK\<product name>\WTK\VersionWTK.txt".
The WTK is distributed on the CD under "program files\Cinterion\CMTK\ABC2\WTK" with
-bin
various tools
- doc
html
- lib
classes.zip
•WTK samples are distributed on the CD under "All Users\Cinterion ABC2 WTK Examples"
•Module Exchange Suite. The MES setup is distributed on CD under "Installer\MESSetup.exe". The MES provides tools to access the Flash file system on the module from the
development environment over a serial interface. The MES may be installed separately, but
can also be installed as part of CMTK - see Section 3.3.
•IMP Debug Connection. The setup is found under "Installer\IMPDbgConnectionSetup.exe".
The setup installs an IDE debug modem for on device debugging (see Chapter 10). The
IMP Debug Connection may be installed separately, but can also be installed as part of
CMTK - see Section 3.3.
•Java SDK
- jdk-6u25-windows-i586.exe
•NetBeans IDE 6.9.1
- netbeans-6.9.1-ml-javase-windows.exe
•Eclipse Helios SR2 (v3.6.1)
- eclipse-pulsar-helios-SR2-win32.zip
•Eclipse Helios SR2 (64-bit) (v3.6.1)
- eclipse-pulsar-helios-SR2-win32-x86_64.zip
•Documentation is distributed on the CD under "program files\Cinterion\CMTK\ABC2\<product name> Documentation" and includes AT Command Set, Hardware Interface Description as well as this Java Users Guide.
wm_java_usersguide_v19Page 13 of 1092012-01-27
Confidential / Released
Java User’s Guide
3.3 Cinterion Mobility Toolkit Installation
19
3.3Cinterion Mobility Toolkit Installation
The CMTK is distributed on CD. The installation program automatically installs the necessary
components and IDE integrations. The software can be uninstalled and updated with the install
program.
This section covers the installation and removal of the CMTK including the installation of the
prerequisite JDK and supported IDEs.
3.3.1Installation Prerequisites
Before the CMTK is installed from CD a standard Java Development Kit (JDK) should be installed
•The Java SE Development Kit 6 Update 25 is distributed as part of the installation CD under
"Contribution\jdk-6u25-windows-i586.exe". To install the JDK please call the contribution
file and follow the instructions on the screen. If there is no appropriate JDK installed, the
installation of the provided JDK will be offered automatically during the CMTK installation
process. Once the JDK has been installed, the environment variable “path” can be altered
to comfortably use the JDK tools without IDE (this is not necessary for using the Cinterion
CMTK):
- Open the Control Panel:
Open System.
Click on Advanced.
Click on the Environment Variables button.
Choose path from the list of system variables.
Append the path for the bin directory of the newly installed SDK to the list of directories
for the path variable.
Apart from the JDK installation it is recommended to install a Java Development Environment
(IDE):
•The Eclipse IDE as well as the NetBeans IDE are distributed as part of the installation CD
under "Contribution\eclipse-pulsar-helios-SR2-win32.zip" resp. "Contribution\eclipse-pulsar-helios-SR2-win32-x86_64.zip" (for 64-bit systems) or "Contibution\netbeans-6.9.1-mljavase-windows.exe". To install any of these IDEs please call the contribution setup file
(resp. unzip the contribution archive and call the setup file). An Eclipse IDE may also be
installed as part of the CMTK installation described in Section 3.3.2.
Note that the Eclipse IDE provided on the installation CD is a special Eclipse Mobile T ools
Platform called Pulsar. Pulsar already includes "Mobile Tools for Java" required for developing Java applications for Cinterion Java modules. If employing any other Eclipse IDE variant or the NetBeans IDE also provided on the installation CD, it is necessary to install
additional plugins containing mobile resp. mobility tools. Please refer to Chapter 10 for more
information on how to install these plugins for Eclipse and NetBeans.
wm_java_usersguide_v19Page 14 of 1092012-01-27
Confidential / Released
Java User’s Guide
3.3 Cinterion Mobility Toolkit Installation
19
3.3.2Installing CMTK
Before you start the installation please make sure all applications - especially possible IDEs are closed:
1. Insert the installation CD and start Setup.exe. When the dialog box appears press the Next
button to start the CMTK installation.
Figure 2: CMTK - InstallShield Wizard
2. Read the CMTK license agreement. If you accept the agreement, press Yes to continue
with the installation.
3. Read the information about the installation and the use of the CMTK. Press Next to continue.
wm_java_usersguide_v19Page 15 of 1092012-01-27
Confidential / Released
Java User’s Guide
3.3 Cinterion Mobility Toolkit Installation
19
4. Install the Module Exchange Suite (MES) as part of the CMTK installation. The MES provides tools to access the Flash file system on the module from the development environment over a serial interface. File transfers between PC and module are greatly facilitated
by this suite. The MES is installed to "Program Files\Cinterion\Module Exchange Suite".
Figure 3: Module Exchange Suite - InstallShield Wizard
5. Read the MES license agreement. If you accept the agreement, press Yes to continue with
the installation.
6. Click Finish to complete the MES installation.
wm_java_usersguide_v19Page 16 of 1092012-01-27
Confidential / Released
Java User’s Guide
3.3 Cinterion Mobility Toolkit Installation
19
7. Install the IMP debug connection as part of the CMTK installation.
8. Continue with installation even if software did not pass the Windows logo test.
9. Scan COM ports for available Java module. The scan may be skipped and can be repeated
later as part of a repair installation. This is done by selecting the Cinterion IMP Debug Connection from Control Panel --> Add or Remove Programs and clicking Change.
Figure 5: Scan COM ports for available JAVA module
10.Click Finish to complete the IMP Debug Connection installation.
wm_java_usersguide_v19Page 17 of 1092012-01-27
Confidential / Released
Java User’s Guide
3.3 Cinterion Mobility Toolkit Installation
19
11. Scan system for supported Java IDEs to automatically integrate the WTK into. Please
ensure that none of the possibly installed Java IDEs is running before the scan is started.
The scan may be skipped and can be repeated later as part of a repair installation. This is
done by selecting the Cinterion ABC2 Software Development Kit from Control Panel -->
Add or Remove Programs and clicking Change.
Figure 6: Scan for supported JAVA IDEs
12.If the above scan did not deliver any supported Java IDE, it is possible to install the Eclipse
IDE ("Pulsar") provided on the installation CD.
Figure 7: Query to install Eclipse IDE as part of CMTK installation
13.Click Finish to complete the CMTK installation.
wm_java_usersguide_v19Page 18 of 1092012-01-27
Confidential / Released
Java User’s Guide
3.4 CMTK Uninstall
19
3.4CMTK Uninstall
The CMTK install package comes with an uninstall facility. The entire CMTK or parts of the
package can be removed. To start the uninstall facility, open the Control Panel, select Add /Remove Programs, select the desired CMTK, e.g. Cinterion ABC2 Software Development Kit and
follow the instructions. The standard modem and Dial-Up Network connection (DUN) are uninstalled automatically.
The Module Exchange Suite (MES) is not uninstalled automatically with the CMTK. To uninstall
the MES as well, please run the MES uninstall facility. To run the uninstall program, open the
Control Panel, select Add/Remove Programs, select Cinterion Module Exchange Suite (MES)
and follow the instructions. The MES might still be used by other CMTK versions and should in
this case not be uninstalled.
Please keep in mind, that standard modem (or USB modem) and Dial-Up Network connection
are required for a proper working of the CMTK on-device debugging.
3.5Upgrades
The CMTK can be modified, repaired or removed by running the setup program on the Installation CD.
wm_java_usersguide_v19Page 19 of 1092012-01-27
Confidential / Released
Java User’s Guide
4 Software Platform
26
4Software Platform
In this chapter, we discuss the software architecture of the CMTK and the interfaces to it.
4.1Software Architecture
The CMTK enables a customer to develop a Java application on a PC and have it be executable on the Java enabled module. The application is then loaded onto the module. The platform
comprises:
•Java
•Additional Java virtual machine interfaces:
•Memory space for Java programs:
•Additional accessible periphery for Java applications
TM
Micro Edition (Java METM), which forms the base of the architecture.
The Java ME
ically designed for embedded systems and has a small memory footprint. The ME uses:
CLDC 1.1 HI, the connected limited device configuration hot spot implementation.
IMP-NG, the information module profile 2
MIDP 2.0 but without the lcdui package.
AT Command API
File I/O API
The data flow through these interfaces is shown in Figure 9 and Figure 24.
Flash File System: around 1.7 MB (8 MB for TC65i-X and EGS5-X partitioned into 4 MB on
A:\ drive and 4 MB on C:\ drive. The C:\ drive is intended as a temporary storage when
updating the EGS5-X firmware over the air (FOTA)).
RAM: around 400kB (1.7 MB for TC65i-X and EGS5-X)
Application code and data share the space in the flash file system and in RAM.
- A maximum of ten digital I/O pins usable, for example, as:
Output: status LEDs
- Input: Emergency Button
- One I2C/SPI Interface.
- One Digital Analog Converter and two Analog Digital Converters.
- Serial interface (RS-232 API): This standard serial interface could be used, for example,
with an external current meter.
For detailed information see Section 4.2.
TM
is provided by SUN Microsystems, http://java.sun.com/javame/. It is specif-
nd
generation, this is for the most part identical to
wm_java_usersguide_v19Page 20 of 1092012-01-27
Confidential / Released
Java User’s Guide
4.2 Interfaces
26
4.2Interfaces
4.2.1ASC0 - Serial Device
ASC0, an Asynchronous Serial Controller, is a 9-wire serial interface. It is described in [2]. Without a running Java application the module can be controlled by sending AT commands over
ASC0. Furthermore, ASC0 is designed for transferring files from the development PC to the
module. When a Java application is started, ASC0 can be used as an RS-232 port or/and System.out. Refer to [3] for details.
4.2.2General Purpose I/O
There are ten I/O pins that can be configured for general purpose I/O. One pin can be configured as a pulse counter. All lines can be accessed under Java by AT commands or a Java API.
See [1] and [2] for information about usage and startup behavior.
4.2.3DAC/ADC
There are two analogue input lines and one analogue output line. They are accessed by AT
commands or via a Java API. See [1] and [2] for details.
4.2.4ASC1
ASC1 is the second serial interface on the module. This is a 4-pin interface (RX, TX, RTS,
CTS). It can be used as a second AT interface when a Java application is not running or by a
running Java application as RS-232 port or/and System.out.
4.2.5Digital Audio Interface (DAI)
The ME has a seven-line serial interface with one input data clock line and input/output data
and frame lines to support the DAI. Refer to [1] and [2] for more information.
4.2.6I2C/SPI
There is a 4 line serial interface which can be used as I2C or SPI interface. It is described in
[2]. The AT^SSPI AT command configures and drives this interface. For details see [1]. I2C
and SPI are also accessible from a Java API.
wm_java_usersguide_v19Page 21 of 1092012-01-27
Confidential / Released
Java User’s Guide
4.2 Interfaces
26
4.2.7JVM Interfaces
Figure 8: Interface Configuration
Java ME, CLDC and MIDP were implemented by SUN. IMP-NG is a stripped down version of
MIDP 2.0 and does not include the graphical interface LCDUI. There are also additional APIs
like the File I/O and the AT command API. Documentation for Java ME a nd CLDC can be found
at http://java.sun.com/javame/. Documentation for the other APIs is found in [3].
4.2.7.1IP Networking
IMP-NG provides access to TCP/IP similarly to MIDP 2.0.
Because the used network connection, CSD or GPRS, is fully transparent to the Java interface,
the CSD and GPRS parameters must be defined separately either by the AT command
AT^SJNET [1] or by parameters given to the connector open method, see [3].
4.2.7.2Media
The playTone method and the tone sequence player are supported. For optimum performance
use notes in the range of 48 to 105. Tones outside this range are affected by audio hardware
filtering (see [2]).
4.2.7.3Other Interfaces
Neither the PushRegistry interfaces and mechanisms nor any URL schemes for the PlatformRequest method are supported. See [3].
wm_java_usersguide_v19Page 22 of 1092012-01-27
Confidential / Released
Java User’s Guide
4.3 Data Flow of a Java Application Running on the Module
26
4.3Data Flow of a Java Application Running on the Module
Figure 9: Data flow of a Java application runn i n g on th e module.
The diagram shows the data flow of a Java application running on the module. The data flow
of a Java application running in the debug environment can be found in Figure 24.
The compiled Java applications are stored as JAR files in the Flash File System of module.
When the application is started, the JVM interprets the JAR file and calls the interfaces to the
module environment.
The module environment consists of the:
•Flash File System: available memory for Java applications
•TCP/IP: module internal TCP/IP stack
•GPIO: general purpose I/O
•ASC0: Asynchronous serial interface 0
•ASC1: Asynchronous serial interface 1
•I2C: I2C Bus interface
•SPI: Serial Peripheral Interface
•DAC: digital analog converter
•ADC: analog digital converter
•AT parser: accessible AT parser
The Java environment on the module consists of the:
•JVM: Java Virtual Machine
•AT command API: Java API to AT parser
•File API: Java API to Flash File System
•IMP-NG: Java API to TCP/IP and ASC0/1
•GPIO API: Java API to GPIO pins and pulse counter
•I2C/SPI API: Java API to access I2C/SPI Bus
•ADC/DAC API: Java API to access ADC and DAC
•Watchdog API: Java API to HW watchdog
•Bearer Control API: Java API for bearer state information and hang-up.
wm_java_usersguide_v19Page 23 of 1092012-01-27
Confidential / Released
Java User’s Guide
4.4 Handling Interfaces and Data Service Resources
26
4.4Handling Interfaces and Data Service Resources
To develop Java applications the developer must know which resources, data services and
hardware access are available.
•There are multiple AT parsers available
•There is hardware access over
- two serial interfaces: ASC1 and ASC0 (both fully accessible).
- general purpose I/O. To configure the hardware access, please refer to [1] and [2].
- I2C/SPI
- All restrictions of combinations are described in Section 4.4.1
•A Java application has:
- instances of the AT command class, one with CSD and the others without, each of which
would, in turn, be attached to one of the AT parsers.
- two instances of access to a serial interface, ASC0 and ASC1, through the CommCon-
nection API. Access to the control lines of these interfaces through CommConnectionControlLines.
- System.out over any serial interface or into the file system
4.4.1Module States
The module can exist in the following six states in relation to a Java application, the serial interfaces, GPIO and I2C/SPI. See [1] for information about the AT commands referenced. A
state transition diagram is shown in Figure 13.
This section shows how Java applications must share AT parsers, GPIO pins and I2C/SPI resources. DAC, ADC and DAI are not discussed here.
Color legend for the following figures:
4.4.1.1Sta te 1: Default – No Java Running
This is the default state. The Java application is inactive and there is an AT interface with CSD
on ASC0 as well as ASC1. The initial state of the pins is according to [4].
Figure 10: Module State 1
wm_java_usersguide_v19Page 24 of 1092012-01-27
Confidential / Released
Java User’s Guide
4.4 Handling Interfaces and Data Service Resources
26
4.4.1.2Sta te 2: No Java Running, General Purpose I/O and I2C/
SPI
The Java application is inactive. There is an AT parser with CSD on ASC0 as well as ASC1.
Up to ten I/O pins are used as general purpose I/O plus a I2C/SPI interface. The pins are configured by AT^SCPIN and AT^SSPI (refer [1]).
Figure 11: Module State 2
4.4.1.3State 4: Default – Java Application Active
The Java application is active and ASC0 and ASC1 are used as System.out and/or CommConnection. Java instances of AT commands are connected to the availa ble AT parsers. The Java
application is activated with AT^SJRA (refer to [1]) or autostart.
Figure 12: Module State 4
4.4.1.4State 5: Java Application Active, General Purpose I/O and
I2C/SPI
The Java application is active and ASC0 and ASC1 are used as System.out and/or CommConnection. The Java application is activated with AT^SJRA. The I/O pins are configured with
AT^SCPIN, the I2C/SPI interface with AT^SSPI. Refer to [1] for AT command details.
Figure 13: Module State 5
wm_java_usersguide_v19Page 25 of 1092012-01-27
Confidential / Released
Java User’s Guide
4.4 Handling Interfaces and Data Service Resources
26
4.4.2Module State Transitions
Figure 14: Module State Transition Diagram
Note: No AT parser is available over serial interface ASC0 or ASC1 while a Java application is
running on the module.
wm_java_usersguide_v19Page 26 of 1092012-01-27
Confidential / Released
Java User’s Guide
5 Maintenance
39
5Maintenance
The basic maintenance features of the ME are described below. Explicit details of these functions and modes can be found in [1] and [2].
5.1IP Service
Apart from the standard Java IP networking interfaces (UDPDatagramConnection, SocketConnection, ...) the ME also supports a set of Internet Services controlled b y AT co mmand. There
are some correlations between the Java and the AT IP Services.
•The connection profile 0 is also used by Java: when Java starts up a networking connection
it tries to set and activate connection profile 0 with the parameters configured by AT^SJNET
or in the connector.open method.
•Java tries to (re-)use an active Internet Service profile: if using connection profile 0 fails,
because e.g. this (or another) connection profile is already used by the Internet Services,
Java networking also uses this, already active, profile.
•Deactivation of the connection profile happens when all applications are finished: Java has
its networking idle time. For the Internet Services an inactivity timeout referred to as parameter <inactTO> is available (configurable by AT^SICS and AT^SCFG).
So that means that Java networking and AT Internet Services can be used in parallel but care
has to be taken about configuring and activation of the connection profile. It is recommended
to use connection profile 0 for the Internet Services and set the parameters to the same values
as the Java networking parameters. This way it makes no difference whether the connection is
activated by the Internet Services or Java.
There are some aspects which have to be kept in mind for all IP Services (Java and AT command):
•When an open TCP connection is cut (e.g. the other side dies/is switched off) it takes
around 10 minutes during which retransmissions are send, until the situation is detected as
an error (in Java an exception is thrown).
•The number of IP services used in parallel should be kept small. An active IP service uses
up resources and may deteriorate the overall performance.
•If a user rapidly closes and opens TCP/IP connections (e.g. SocketConnection, HTTPCon-
nection), a ConnectionNotFoundException reading "No buffer space available" may be
thrown, explaining that all TCP/IP socket resources are exhausted. In the worst case, opening further TCP/IP connections is locked for up to 60 seconds.
•If a service is re-opened on the same port shortly after having closed the ServerSocketCon-
nection, the ServerSocketConnection may not work properly. To ensure that the service
works correctly the host is required to wait at least two minutes before reopening a server.
•For information about the bearer state, use the specific IP service command AT^SICI and,
in addition, the general network commands AT+COPS and/or AT+CREG.
•When trying to start the bearer when it is still in the process of shutting down, e.g. right after
a "network idle timeout" an IOException is thrown. Either use a delay or wait for bearer state
to actually say "down".
Some Java products feature the BearerControl class. This class provides bearer state information and a method to hang-up.
wm_java_usersguide_v19Page 27 of 1092012-01-27
Confidential / Released
Java User’s Guide
5.2 Remote SIM Access
39
5.2Remote SIM Access
While Remote SIM Access (RSA) is normally closely coupled with the GSM 07.10 multiplexer
there are some things to keep in mind when using it with Java.
•Java must not be started when RSA and/or the GSM 07.10 multiplexer is activated.
•When activating the RSA mode (AT^SRSA) via a Java AT Command channel while Java
is running the parameter <muxChan> of the AT^SRSA command is ignored and RSA is
activated on the channel where the command was issued. The Input- and Outputstream
can then be used to transfer RSA protocol data.
5.3Power Saving
The module supports several power saving modes which can be configured by the AT command AT+CFUN [1]. Power saving affects the Java application in two ways. First, it limits ac-
cess to the serial interface (RS-232-API) and the GPIO pins. Second, power saving efficiency
is directly influenced by the way a Java application is programmed.
Java hardware access limitations:
•In NON-CYCLIC SLEEP mode (cfun=0) the serial interface cannot be accessed. Toggling
RTS does end NON-CYCLIC SLEEP mode. In CYCLIC SLEEP mode (CFUN=7 or 9) the
serial interface can be used with hardware flow control (CTS/RTS).
•In all SLEEP modes the GPIO polling frequency is reduced so that only signal changes
which are less than 0.2Hz can be detected properly. Furthermore, the signal must be constant for at least 2.7s to detect any changes. For further details see AT^SCPOL in [1] or
refer to [2].
Java power saving efficiency:
•As long as any Java thread is active, power consumption cannot be reduced, regardless
whether any SLEEP mode has been activated or not. A Java application designed to be
power efficient should not have any unnecessarily active threads (e.g. no busy loops).
Threads waiting in a blocking method (e.g. read) do not hinder power saving.
•When using networking functionality close all connectors and hang-up the bearer manually
(using ATH for circuit switched connections) every time you intend to reduce power consumption. Disable the network idle timeout (=0).
When going to low power mode there always might be a transition time of around 10s till low
power consumption state is reached.
5.3.1Power Saving While GPRS is Active
It is also possible that the module saves power while the GPRS PDP context is activated but
without ongoing data traffic. To save power in GPRS mode it is required to enable a power saving mode (e.g. AT+CFUN=9) and put all threads into a sleep state. Also, data connections shall
be in a blocking read (serial interface and/or GPRS connections).
wm_java_usersguide_v19Page 28 of 1092012-01-27
Confidential / Released
Java User’s Guide
5.4 Charging
39
5.4Charging
Please refer to [1] and [2] for general information about charging. Charging can be monitored
by the running Java application. The JVM is active in Charge mode and in Charge-Only mode
if autostart is activated. Only a limited number of AT commands are available when the module
is in Charge-Only mode. A Java application must be able to handle the Charge-Only mode and
reset the module to reinstate the normal mode. See [2] for information about the Ch arge-Only
mode. The Charge-Only mode is indicated by URC “^SYSSTART CHARGE-ONLY MODE”.
Note: When a Java application is started in Charge-Only mode only AT Command APIs without
CSD are available. The mode-indicating URC is created after issuing the very first AT command on any opened channel. To read the URC it is necessary to register a listener (see [3])
on this AT command API instance before passing the first AT command.
5.5Airplane Mode
The main characteristic of this mode is that the RF is switched off and therefore only a limited
set of AT commands is available. The mode can be entered or left using the appropriate
AT^SCFG command. This AT command can also be used to configure the airplane mode as
the standard startup mode, see [2]. The JVM is started when autostart is enabled. A Java ap-
plication must be able to handle this mode. The airplane mode is indicated by URC “SYSSTART AIRPLANE MODE”. Since the radio is off all classes related to networking connections,
e.g. SocketConnection, UDPDatagramConnection, SocketServerConnection, HTTPConnection, will throw an exception when accessed.
5.6Alarm
The ALARM can be set with the AT+CALA command. Please refer to the AT Command Set [1]
and Hardware Interface Description [2] for more information. One can set an alarm, switch off
the module with AT^SMSO, and have the module restart at the time set with AT+CALA. When
the alarm triggers the module restarts in a limited functionality mode, the “airplan e mode”. Only
a limited number of AT commands are available in this mode, although the JVM is started when
autostart is enabled. A Java application must be able to handle this mode and reset the module
to reinstate the normal mode. The mode of a module started by an alarm is indicated by the
URC “^SYSSTART AIRPLANE MODE”.
Note: For detailed information which functionality is available in this mode see [1] and [2]. The
mode indicating URC is created after issuing the very first AT command on any opened channel.
wm_java_usersguide_v19Page 29 of 1092012-01-27
Confidential / Released
Java User’s Guide
5.7 Shutdown
39
5.7Shutdown
If an unexpected shutdown occurs, data scheduled to be written will get lost due to a buffered
write access to the flash file system. The best and safest approach to powering down the module is to issue the AT^SMSO command. This procedure lets the module log off from the network
and allows the software to enter a secure state and save all data. Fu rther details can be found
in [2].
5.7.1Automatic Shutdown
The ME is switched off automatically in different situations:
•under- or overtemperature
•under- or overvoltage
Appropriate warning messages transmitted by the ME to the host application are implemented
as URCs. To activate the URCs for temperature conditions use the AT^SCTM command. Undervoltage and overvoltage URCs are generated automatically when fault conditions occur.
For further detail refer to the commands AT^SCTM and AT^SBC described in the AT Command Set [1]. In addition, a description of the shutdown procedures can be found in [2].
5.7.2Manual Shutdown
The module can be switched off manually with the AT command, AT^SMSO. In this case the
midlets destroyApp method is called and the application has 5s time to clean up and call the
notifydestroy method. After the 5s the VM is shut down.
5.7.3Restart after Switch Off
When the module is switched off without setting an alarm time (see the AT Command Set [1]),
e.g. after a power failure, external hardware must restart the module with th e Ignition line (IGT).
The Hardware Interface Description [2] explains how to handle a switched off situation.
5.7.4Watchdog
The Watchdog class allows to access the HW watchdog of the system from application level.
Depending on the setting (at^scfg) the userware watchdog can do nothing, swit ch-off or reboot
the system.
wm_java_usersguide_v19Page 30 of 1092012-01-27
Confidential / Released
Loading...
+ 79 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.