Download  Print this page

Advertisement

s
TC65 JAVA User's Guide
Siemens Cellular Engine
Version:
01
DocID:
TC65 JAVA User's Guide_V01

Advertisement

   Also See for Siemens TC65 JAVA

   Related Manuals for Siemens TC65 JAVA

   Summary of Contents for Siemens TC65 JAVA

  • Page 1

    TC65 JAVA User's Guide Siemens Cellular Engine Version: DocID: TC65 JAVA User's Guide_V01...

  • Page 2

    GSM products, which also apply to cellular phones must be followed. Siemens or its suppliers shall, regardless of any legal theory upon which the claim is based, not be liable for any consequential, incidental, direct, indirect, punitive or other damages whatsoever...

  • Page 3: Table Of Contents

    TC65 JAVA User's Guide Strictly confidential / Draft Table of Contents Preamble ........................8 Overview ........................9 Related Documents ....................9 Terms and Abbreviations..................10 Installation ........................11 System Requirements ..................11 Installation CD .....................11 3.2.1 Components...................12 3.2.1.1 Module Exchange Suite ..............12 3.2.1.2 WTK ....................12 3.2.1.3 AT Java Open Framework (AJOF)............12...

  • Page 4

    TC65 JAVA User's Guide Strictly confidential / Draft 4.4.1.6 State 6: Java Application Active, General Purpose I/O and SPI ..22 4.4.2 Module State Transitions ..............23 Maintenance ........................24 Power Saving.......................24 Charging ......................24 Airplane Mode......................25 Alarm .......................25 Shut Down ......................26 5.5.1 Automatic Shutdown ................26 5.5.2...

  • Page 5

    TC65 JAVA User's Guide Strictly confidential / Draft Over the Air Provisioning ..................38 Security Issues ....................38 8.3.1 Module Exchange Suite .................39 8.3.2 OTAP .....................39 Over The Air Provisioning (OTAP) ................40 Introduction to OTAP ...................40 OTAP Overview ....................40 OTAP Parameters ....................41 Short Message Format ..................42...

  • Page 6

    TC65 JAVA User's Guide Strictly confidential / Draft Java Tutorial ........................55 13.1 Using the AT Command API................55 13.1.1 Class ATCommand................55 13.1.1.1 Instantiation with or without CSD Support.........55 13.1.1.2 Sending an AT Command to the Device, the send() Method....56 13.1.1.3 Data Connections................56 13.1.1.4...

  • Page 7

    TC65 JAVA User's Guide Strictly confidential / Draft Figures Figure 1: Overview ........................9 Figure 2: Interface Configuration.................... 18 Figure 3: Data flow of a Java application running on the module........... 19 Figure 4: Module State 1 ......................21 Figure 5: Module State 2 ......................21 Figure 6: Module State 3 ......................

  • Page 8: Preamble

    Preamble As an interim solution, since the final documentation has not yet been completed, this TC65 JAVA User's Guide is supplied as a “Draft” version. Therefore modifications are likely to apply to all chapters of the document. Paragraphs, written in “italics” are still under development.

  • Page 9: Overview

    In addition to the Java Docs for the development API (see Chapter 4), the following documents are included with the SMTK: Multiplexer Installation Guide Application Note 23: Installing TC65 Module on DSB75 DSB75 Support Box - Evaluation Kit for Siemens Cellular Engines TC65 AT Command Set TC65 Hardware Interface Description Java doc \wtk\doc\html\index.html...

  • Page 10: Terms And Abbreviations

    TC65 JAVA User's Guide Strictly confidential / Draft Terms and Abbreviations Abbreviation Description Application Program Interface Asynchronous Serial Controller CLDC Connected Limited Device Configuration Circuit-Switched Data Digital Audio Interface Data Carrier Detect Data Set Ready GPIO General Purpose I/O GPRS...

  • Page 11: Installation

    TC65 JAVA User's Guide Strictly confidential / Draft Installation System Requirements The Siemens Mobility Toolkit (SMTK) TC65 requires that you have: 1. Windows 2000 or Windows XP installed 2. 40Mbytes free disk space for SMTK 3. Administration privileges 4. Java 2 SDK, Standard Edition 1.4. To install the JDK version 1.4.2_07 provided, follow the instructions in Section 3.3.1.

  • Page 12: Components

    File transfers from PC to module are greatly facilitated by this suite. 3.2.1.2 wtk is the directory where all the necessary components for TC65 Java application creation and debugging are stored. 3.2.1.3...

  • Page 13: Smtk Installation

    SMTK installation process. 2. Once the toolkit has been installed, the environment variable “path” can be altered to comfortably use the JDK tools. This is not necessary for using the Siemens SMTK. 3. Open the Control Panel. a) Open System.

  • Page 14: Installing Sun Java Studio Mobility 6

    TC65 JAVA User's Guide Strictly confidential / Draft 9. Choose the path that TC65 will appear under in the Start Menu. 10. A brief summary of all entries made shows up. 11. After step 9, all necessary files will be copied from the CD into the target folder.

  • Page 15: Smtk Uninstall

    TC65 JAVA User's Guide Strictly confidential / Draft SMTK Uninstall The TC65 SMTK install package comes with an uninstall facility. The entire SMTK or parts of the package can be removed. To start the uninstall facility, open the Control Panel, select Add/Remove Programs, select TC65 and follow the instructions.

  • Page 16: Software Platform

    TC65 JAVA User's Guide Strictly confidential / Draft Software Platform In this chapter, we discuss the software architecture of the SMTK and the interfaces to it. Software Architecture The SMTK enables a customer to develop a Java application on a PC and have it be executable on the TC65 module.

  • Page 17: Interfaces

    TC65 JAVA User's Guide Strictly confidential / Draft Interfaces 4.2.1 ASC0 - Serial Device ASC0, an Asynchronous Serial Controller, is a 9-wire serial interface. It is described in the Hardware Interface Description [5]. Without a running Java application the module can be controlled by sending AT commands via ASC0.

  • Page 18: Jvm Interfaces

    MIDP 2.0 prepared by Siemens and does not include the graphical interface LCDUI. Siemens developed the File I/O API and the AT command API. Documentation for J2ME and CLDC can be found at http://java.sun.com/j2me/. Documentation for the other APIs is found in …/ Java doc [6].

  • Page 19: Data Flow Of A Java Application Running On The Module

    TC65 JAVA User's Guide Strictly confidential / Draft Data Flow of a Java Application Running on the Module AT Parser system.out ASC1 Flash File System AT Command File I/O API IMP-NG TCP/IP GPIO I2C/SPI DAC/ADC ASC0 Figure 3: Data flow of a Java application running on the module.

  • Page 20: Handling Interfaces And Data Service Resources

    TC65 JAVA User's Guide Strictly confidential / Draft Handling Interfaces and Data Service Resources To develop Java applications the developer must know which resources, data services and hardware access are available. • There are three AT parsers available • There is hardware access over two serial interfaces: ASC1 (System.out only) and ASC0 (fully accessible).

  • Page 21: State 1: Default - No Java Running

    TC65 JAVA User's Guide Strictly confidential / Draft 4.4.1.1 State 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. All HW interface pins are configured as inputs.

  • Page 22: State 5: Java Application Active, General Purpose I/o And I2c

    TC65 JAVA User's Guide Strictly confidential / Draft 4.4.1.5 State 5: Java Application Active, General Purpose I/O and I2C The Java application is active, ASC0 is used as System.out and the Java instance of the RS-232 serial interface is connected to ASC1. The Java application is activated with at^sjra.

  • Page 23: Module State Transitions

    TC65 JAVA User's Guide Strictly confidential / Draft 4.4.2 Module State Transitions switch on no Java autostart Java autostart start java: at^sjra State 1: Default, no Java State 4: Default, destroy java application appl. running Java active close I2C close I2C...

  • Page 24: Maintenance

    TC65 JAVA User's Guide Strictly confidential / Draft Maintenance Basic maintenance features of the TC65 are described below. Explicit details of these functions and modes can be found in the AT Command Set [4] and the Hardware Interface Description [5].

  • Page 25: Airplane Mode

    TC65 JAVA User's Guide Strictly confidential / Draft Airplane 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.

  • Page 26: Shut Down

    TC65 JAVA User's Guide Strictly confidential / Draft Shut Down In the case of an unexpected shut down, data that should be written will get lost due to a buffered write access to the flash file system. However, the best and safest approach to powering down the module is to issue the AT^SMSO command.

  • Page 27: Special At Command Set For Java Applications

    TC65 JAVA User's Guide Strictly confidential / Draft Special AT Command Set for Java Applications For the full AT command set refer to [4]. There are differences in the behaviour of issuing AT commands from a Java application compared to using AT commands over a serial interface.

  • Page 28: Restrictions

    TC65 JAVA User's Guide Strictly confidential / Draft • at^sjra, start of Java application • at^sjnet, the configuration for Java networking connection • at^sjotap, start and configuration of the over the air provisioning • at^sjsec, security configuration Refer to AT command set [4].

  • Page 29: Performance Statements

    TC65 JAVA User's Guide Strictly confidential / Draft Performance Statements Scope of the performance study was getting comparable values that indicate the performance under certain circumstances. 5.8.1 Java This section gives information about the Java command execution throughput (“jPS”= Java statements per second).

  • Page 30: Pin-io

    For details about software platform and interfaces refer to Chapter 4, "Software Platform". This section summarises limitations and preconditions for performance when using the interface CommConnection from package com.siemens.mp.io (refer to [6]). The data rate on RS232 depends on the size of the buffer used for reading from and writing to the serial interface.

  • Page 31: Voice Call In Parallel

    TC65 JAVA User's Guide Strictly confidential / Draft TC65 Java application (looping data) Figure 13: Scenario for testing data rates on ASC1 5.8.3.2 Voice Call in Parallel Same scenario as in section 5.8.3.1, but a voice call added. The application is reflecting incoming data directly to output and, additionally, handles an incoming voice call.

  • Page 32: Scenarios With Gprs Connection

    TC65 JAVA User's Guide Strictly confidential / Draft 5.8.3.3 Scenarios with GPRS Connection The biggest challenge for the module performance is setting up a GPRS connection, receiving data on interfaces of javax.microedition.io and sending or receiving the data on the RS232 API with the help of a Java application.

  • Page 33: Table 3: Download Data Rate With Different Number Of Timeslots, Cs2

    TC65 JAVA User's Guide Strictly confidential / Draft The tables below show the download data rates that can be achieved if hardware control is enabled on the CommConnection interface. Table 3: Download data rate with different number of timeslots, CS2...

  • Page 34: Midlets

    TC65 JAVA User's Guide Strictly confidential / Draft MIDlets The J2ME™ Mobile Information Device Profile (MIDP) provides a targeted Java API for writing wireless applications. The MIDP runs on top of the Connected Limited Device Configuration (CLDC), which in turn, runs on top of the J2ME™. MIDP applications are referred to as MIDlets.

  • Page 35: Table 5: A Typical Sequence Of Midlet Execution

    TC65 JAVA User's Guide Strictly confidential / Draft Table 5: A typical sequence of MIDlet execution Application Management Software MIDlet The application management software creates a new instance of a default argument) MIDlet MIDlet constructor for the called; it is in the Paused state.

  • Page 36: Hello World Midlet

    TC65 JAVA User's Guide Strictly confidential / Draft Hello World MIDlet Here is a sample HelloWorld program. * HelloWorld.java package example.helloworld; import javax.microedition.midlet.*; import java.io.*; public class HelloWorld extends MIDlet { * HelloWorld - default constructor public HelloWorld() { System.out.println("HelloWorld: Constructor");...

  • Page 37: At Java Open Framework (ajof)

    The AT commands have been divided into six functional areas. Each area is represented as a package. Documentation for the methods of each area and the AT commands covered by these methods can be found in …\Siemens\SMTK\TC65\AJOF\doc\index.html, [10]. Extensions are possible to this framework. The Java tutorial in Chapter 13 gives examples on how to use this framework.

  • Page 38: File Transfer To Module

    TC65 JAVA User's Guide Strictly confidential / Draft File Transfer to Module Module Exchange Suite The Module Exchange Suite allows you to view the Flash file system on the module as a directory from Windows Explorer. Make sure that the module is turned on and that ASC0 of the module is connected to the configured COM port of Module Exchange Suite.

  • Page 39: Module Exchange Suite

    TC65 JAVA User's Guide Strictly confidential / Draft 8.3.1 Module Exchange Suite The serial interface should be mechanically protected. The copy protection rules for Java applications prevent opening, reading, copying, moving or renaming of JAR files. It is not recommended to use names of Java applications (for example <name>.jar) for directories, since the copy protection will deny access to open, copy or...

  • Page 40: Over The Air Provisioning (otap)

    TC65 JAVA User's Guide Strictly confidential / Draft Over The Air Provisioning (OTAP) Introduction to OTAP OTA (Over The Air) Provisioning of Java Applications is a common practice in the Java world. OTAP describes mechanisms to install, update and delete Java applications over the air.

  • Page 41: Otap Parameters

    TC65 JAVA User's Guide Strictly confidential / Draft OTAP Parameters There is a set of parameters that control the OTAP procedures. These parameters can either be set by AT command (at^sjotap, refer to AT Command Set [7]) presumably during the production of the device, or by SM (see Section 9.4) during operation of the device in the...

  • Page 42: Short Message Format

    TC65 JAVA User's Guide Strictly confidential / Draft Short Message Format An OTAP control SM must be a Submit PDU with Class1, PID $7d and 8 bit encoding. As a fallback for unusual network infrastructures the SM can also be of Class0 and/or PID $00.

  • Page 43: Java File Format

    TC65 JAVA User's Guide Strictly confidential / Draft OTAP operation their order on the receiving side might be different from the order in which they were sent. This could lead to trouble because the OTAP operation probably starts before all parameters are received. If you discover such problems, try to wait a few seconds between sending the SMs.

  • Page 44: Procedures

    TC65 JAVA User's Guide Strictly confidential / Draft Procedures 9.6.1 Install/Update OTAP Java Application TC65 Controller Server Parameter SMS -SMS password check -Parameters collection Parameter SMS with "START:install" - Combination of SMS parameter set and AT parameter set - If parameter set complete:...

  • Page 45: Delete

    TC65 JAVA User's Guide Strictly confidential / Draft 9.6.2 Delete OTAP Java Application TC65 Controller Server Parameter SMS -SMS password check -Parameters collection Parameter SMS with "START:delete" - Combination of SMS parameter set and AT parameter set - If parameter set complete:...

  • Page 46: Time Out Values And Result Codes

    TC65 JAVA User's Guide Strictly confidential / Draft Time Out Values and Result Codes Timeouts: • Closedown Timeout: 10 seconds • Safety Timeout: 5 minutes Result Codes: Supported status codes in body of the http POST request: • 900 Success •...

  • Page 47: Otap Tracer

    TC65 JAVA User's Guide Strictly confidential / Draft OTAP Tracer For easy debugging of the OTAP scenario the OTAP procedure can be traced over the serial interface. TC65 JAVA User's Guide_V01 Page 47 of 69 11.03.2005...

  • Page 48: How To

    TC65 JAVA User's Guide Strictly confidential / Draft 9.10 How to This chapter is supposed to be a step-by-step guideline for using OTAP. 1. Do you need OTAP? Is there any chance that it might be necessary to update the Java application, install a new one or delete it? The reason might be that your device is in the field and you cannot or do not want to do it over the serial line.

  • Page 49: Compiling And Running A Program Without Java Ide

    TC65 JAVA User's Guide Strictly confidential / Draft Compiling and Running a Program without Java IDE This chapter explains how to compile and run a Java application without a Java IDE. 10.1 Build Results A JAR file has to be created by compiling an SMTK project. A JAR file will contain the class files and auxiliary resources associated with an application.

  • Page 50: Compile

    …\Siemens\SMTK\TC65\wtk\bin directory and are using the system environment variables IMPNG_JDK_DIR that points to the root directory of the installed JDK and IMPNG_DIR which points to the root directory of the Siemens-SMTK-TC65-IMPNG installation. The installation process sets these environment variables. A modification is usually not necessary.

  • Page 51: Switch On Autostart

    TC65 JAVA User's Guide Strictly confidential / Draft 10.4.1 Switch on Autostart • There is an AT command, at^scfg, to configure the autostart functionality. Please refer to the AT Command Set [4]. • Restart the module. 10.4.2 Switch off Autostart To switch off autostart functionality there are two possibilities: •...

  • Page 52: Debug Eenvironment

    TC65 JAVA User's Guide Strictly confidential / Draft Debug Eenvironment Please note that this section is not intended as a tutorial in debugging or how to use Sun Java Studio, Borland JBuilder or Eclipse. Documents for these IDEs can be found on their re- spective homepages.

  • Page 53: Emulator

    PC emulator. JAR files used in the module must be configured according to the batch file examples given. If the SMTK install succeeded, one should be able to easily switch between the Siemens environment and Standard-JDK environment. This means that the special libraries/APIs are available, the emulators are available, AT commands can be sent to module.

  • Page 54: Java Security

    TC65 JAVA User's Guide Strictly confidential / Draft Java Security 12.1 Secure Data Transfer 12.2 Execution Control 12.3 Application and Data Protection TC65 JAVA User's Guide_V01 Page 54 of 69 11.03.2005...

  • Page 55: Java Tutorial

    TC65 JAVA User's Guide Strictly confidential / Draft Java Tutorial This small tutorial includes explanations on how to use the AT Command API, suggestions for programming MIDlets and an example of using AJOF. The developer should read about MIDlets, Threads and AT commands as a complement to this tutorial.

  • Page 56: Sending An At Command To The Device, The Send() Method

    TC65 JAVA User's Guide Strictly confidential / Draft 13.1.1.2 Sending an AT Command to the Device, the send() Method An AT command is sent to the device by using the send() method. The AT command is sent as a string which must include the finalizing line feed "\r" or the corresponding line end character.

  • Page 57: Synchronization

    (rcv >= 0) { System.out.print((char)rcv); /* The example continues after the next block of text */ In …/Siemens/SMTK/TC65/wtk/src/example a complete data connection example, DataConnectionDemo.java, can be found. These streams behave slightly differently than regular data streams. The streams are not closed by using the close() method.

  • Page 58: Atcommandresponselistener Interface

    TC65 JAVA User's Guide Strictly confidential / Draft 13.1.2 ATCommandResponseListener Interface The ATCommandResponseListener interface defines the capabilities for receiving the response to an AT command sent to one of the module's AT parsers. When the user wants to use the non blocking version of the ATCommand.send function an implementation class for the ATCommandResponseListener interface must be created first.

  • Page 59: Atevents

    TC65 JAVA User's Guide Strictly confidential / Draft 13.1.3.1 ATEvents An ATEvent or a URC is a report message sent from the module to the application. An unsolicited result code can either be delivered automatically when an event occurs or as a result of a query the module received before.

  • Page 60: Registering A Listener With An Atcommand Instance

    TC65 JAVA User's Guide Strictly confidential / Draft 13.1.3.3 Registering a Listener with an ATCommand Instance After creating an instance of the ATCommandListener class, this class instance has to be passed as a parameter to the ATCommand.addListener() method. After that, the callback methods will be called by the runtime system each time the corresponding events (URCs or signal state changes) occur on the corresponding device AT parser.

  • Page 61: Programming The Midlet

    TC65 JAVA User's Guide Strictly confidential / Draft 13.2 Programming the MIDlet The life cycle and structure of MIDlets are described in Chapter 6. Since the MIDlets will run on J2ME™, all of J2ME™’s features, including threads, are available. Small applications, such as those without any timer functions or those used only for tests and simple examples, can be written without using threads.

  • Page 62

    TC65 JAVA User's Guide Strictly confidential / Draft try { Thread.sleep(1000); } catch(InterruptedException e) { System.out.println(e); System.out.println("Thread(" + loops + "): Finished naturally"); * ThreadDemo - constructor public ThreadDemo() { System.out.println("ThreadDemo: Constructor, creating threads"); thread1 = new DemoThread(2); thread2 = new DemoThread(6);...

  • Page 63: Ajof

    13.3.1 Example /* WmTutorial.java * Copyright (C) Siemens AG 2003. All Rights reserved. * Transmittal, reproduction and/or dissemination of this document * as well as utilization of its contents and communication thereof * to others without express authorization are prohibited.

  • Page 64

    TC65 JAVA User's Guide Strictly confidential / Draft * <li>enter the <code>SIM PIN</code>, so we can access the phonebook and send an SMS message, * <li>create a phonebook control and look up the recipient's phone number, * <li>create an SMS control, * <li>set the service centre address (SCA),...

  • Page 65

    TC65 JAVA User's Guide Strictly confidential / Draft System.out.println("Sending Short Message, please wait..."); sms.send(destinationAddr, MESSAGE_TXT); System.out.println("Short Message was sent."); catch (SmsSendException e) System.out.println(e); finally // release the used resources sms.release(); sms = null; finally // release the used resources pbk.release();...

  • Page 66

    TC65 JAVA User's Guide Strictly confidential / Draft * Your application does not necessarily need to override <code>destroyApp()</code>, but if it does, make sure that * <code>super.destroyApp()</code> is called, to release the AT channels. public void destroyApp(boolean unconditional) // your finalization code goes here...

  • Page 67: Network Applications

    TC65 JAVA User's Guide Strictly confidential / Draft Network Applications 14.1 FTP Client The package com.siemens.icm.ftp provides an FTP client and offers a simple interface for transferring files between a module and a server using the File Transfer Protocol (FTP, RFC 959).

  • Page 68

    TC65 JAVA User's Guide Strictly confidential / Draft Before running the MIDlet please configure mail.jad to reflect your environment. The following properties should be set: Property Description Example example.mail.from Sender from@mail_provider.com example.mail.to Recipient to@mail_provider.com example.mail.hostname Hostname of module localhost example.mail.smtp.server SMTP server smtp.mail_provider.com...

  • Page 69: Changes To Tc45

    TC65 JAVA User's Guide Strictly confidential / Draft Changes to TC45 For those who are familiar with the Siemens WM TC45 product this is an overview of the main changes between TC45 and TC65. • “real” TCP and UDP access interfaces: SocketConnection, ServerSocketConnection, UDPDatagramConnection.

Comments to this Manuals

Symbols: 0
Latest comments: