GSM modules - Nokia 12 module - Nokia 12i module
GSM homeNokia 12 GSM module informationGSM controls - Teltonika T-BoxN12RGSM module - modem support and contact


Tutorial :: Step by Step J2ME IMlet development primer for T-Box (N12i)

To fully utilize the functionality of our T-BoxN12R or T-BoxGPS, it is recommended to develop applications using Java 2 Micro Edition (J2ME). IMlet are small Java programs that runs inside T-Box controllers, allowing autonomous control of I/Os, serial port and also to communicate via SMS, GPRS or CSD via HTTP or TCP/IP socket connections.

J2ME allows the development of powerful and secure applications and this short primer is a beginner's guide for those familiar with Java/C/VB programming to start developing and running J2ME IMlets on Teltonika's T-Box controller products.

1. Install J2ME SDK
2. Install the Nokia 12 Configurator
3. Install Sun J2ME Wireless Toolkit
4. Installing Nokia 12 SDK and IMP 1.0 Concept Simulator 1.0
5. Build, package and test your first J2ME IMlet
6. Download and run your J2ME IMlet

1. Install J2SE SDK ( Java 2 Standard Edition Software Development Kit )

Java J2SE SDK is needed to run the Wireless Toolkit application, so if its not installed, please install the the SDK from Sun J2SE SDK Download webpage.

2. Install the Nokia 12 Configurator 

Our current T-Box controllers are integrated with Nokia 12i GSM module and the Nokia 12 Configurator is required to setup the module and also to download IMlets. Please locate the setup software ( Nokia 12 Configurator .. setup.exe ) and install the program into your computer.

3. Install Sun J2ME Wireless Toolkit

The Sun Wireless Toolkit (WTK1.04) is an efficient and simple tool for building and packaging J2ME imlets. It is good for working on short to medium complexity IMlets.

Download and install the WTK1.04 ( something like j2me_wireless_toolkit-1_0_4_02-windows.exe ) from Sun Java Wireless tookit Download webpage.

4. Installing Nokia 12 SDK and IMP 1.0 Concept Simulator 1.0

From the CDROM incuded with your Teltonika T-Box controller product, search and run the following installation programs ..

1. Nokia12SDK.zip ( you need to extract all the files into eg. C:\nokia )
2. Setup_Nokia_12_IMP_1_0_Concept_Simulator_Beta_1_0.exe *

* Extract the simualtor files into the ..WTK104\wtklib\devices folder. The file names may differ slighty and don't worry about the Concept Simulator being in beta. You can also refer to this Nokia 12 - IMP Concept Simulator installation guide (280kB PDF) manual.

This will install the necessary J2ME classes, supporting files and simulator software to allow you to start developing and testing your own J2ME imlets for your T-BoxN12R or T-BoxGPS controllers.

5. Build, package and test your first J2ME IMlet

Now you are ready! Run the Wireless Toolkit ( the application is called KToolbar ). Click "New Project" and name both Project Name and MIDlet Class Name to "Blinker" for our first exercise.

Create new project in Sun J2ME Wireless Toolkit  

Now download sample file, Blinker.java. Open it using notepad or any simple text editor. Have a look at the code and hopefully you are a Java programmer and understand what all its all about. Save the file as Blinker.java into ..\WTK104\apps\Blinker\src folder.

Select Nokia 12 GSM module as terget device

Choose "Nokia_12_IMP_1_0_Concept_Simulator_1_0" as the Device. Now click "Build". You can now run the Nokia 12 Simulator - click on the "Run" to simulate the IMlet.

Run the IMlet in the Nokia 12 simulator


The Blinker imlet will 'blink' output/LED 8 on your T-Box and also send some simple text message out through your T-Box's Port 3 ( you can configure hyperterminal later to capture the text using settings 9600,8,1,N ).

Now, we have to 'package' our java program so it can run on our T-Box. Select Project > Package > Create Package. This will generate the machine runnable codes. The .jar files will usually be created into the \bin folder for that project.

6. Download and run your J2ME IMlet

Connect your T-Box via Port 2 using the right cable to your computer's COM port. Start up your Nokia 12 Configurator program and wait until you have a connection to your T-Box, this is indicated by the appearance of a green shade on the 'connector' icon at the bottom right of the application's menu ( see below ). Else check the cabling, power etc.

Nokia 12 Configurator - connected to device

Next, choose "IMlet Loading" and locate your recently built and packaged imlet, eg. ..\WTK104\apps\Blinker\bin\blinker.jar file. This will bring the IMlet up and you can download the IMlet into your device.

Nokia 12 Configurator - downloading J2ME IMlet to T-Box

Next, just click onto the IMlet in the "Imlet list" and click "Start". If your T-Box's output 8 LED is blinking ~ Congratulations! You have succesfully built, test, package, download and run a J2ME IMlet on a Teltonika T-Box controller.


Sample J2ME Projects

We will be adding some sample J2ME source codes on how to programmatically access I/Os and also send SMS or data via GPRS or CSD.

Samples coming soon ..

- IMlet to monitor and report digital I/O changes and report via GPRS to web server
- IMlet to monitor and report analog input every 1 hour via GPRS to web server
- IMlet to read GPS position and report every 30 mins via GPRS to web server
- IMlet to read GPS positon and report every 30 mins via SMS to cellphone

Further Reading

Now that you have completed our primer succesfully, you should go on to develop more complex applications with the help of the following Nokia 12 developer manuals.

Nokia12_GSM_Module_feature_1 Nokia 12 - Software developers guide (1.42MB PDF)
Nokia12_GSM_Module_feature_1 Nokia 12 - API definition reference guide (1.27MB PDF)
Nokia12_GSM_Module_feature_1 Nokia 12 - Properties reference guide (1.02MB PDF)
Nokia12_GSM_Module_feature_1 Nokia 12 - IMlet programming guide (1.76MB PDF)


Back to :: Home :: USB GSM Modem Information :: Contact Us