OTAP

From JavaCint
Jump to: navigation, search

Contents

1 OTAP with SMS

1.1 Update any device

Cinterion gives specifications on how to send SMS messages to launch a remote Over The Air Provisionning (OTAP) operation.

In order to take advantage of the OTAP abilities of your Cinterion device and run the program that you installed remotely, you must take care of:

  • Enabling autostart
AT^SCFG="Userware/Autostart","","1"
  • Not blocking the OTAP with some security settings.
 AT^SJOTAP=

Not defining anything in your AT^SJOTAP setting is a big security risk.

Then you publish your program on your HTTP server, send an OTAP SMS to a TC65/TC65i chip with the address of your HTTP server, and your device will update itself.

For the OTAP SMS to work you will need to:

  • Respect the OTAP SMS format (it's not that easy, a standard SMS won't do)
  • Provide the correct device password
  • Provide the correct network settings (probably GPRS APN settings)
  • Provide an URL of a JAD that points to a correct JAR (describing the right size of this JAR)

1.2 OTAP override

You should remember that whatever parameter is sent by SMS, it is overridden by the “AT^SJOTAP” setting. The only way to have a complete remote control over the chip is to issue the "AT^SJOTAP=" command on the chip.

This is a security feature that you can take advantage of. If you need more security, you should sign your midlets.

2 OTAP with ATCommand

The OTAP at command has the following syntax:

AT^SJOTAP=[<SMS_pwd>][,<Jad_URL>][,<Appl_Dir>][,<HTTP_User>][,<HTTP_Pwd>][,<BS>][,<Dest>][,<Net_user>][,<Net_pwd>][,<DNS>][,<NotifyURL>][,<Ignore_Sms_PID>][,<Hide_HTTP_auth_params>]

It can be applied locally (for example during first install) or in your java program code.

3 Diagnose OTAP problems

You can diagnose OTAP problems whether you doing the OTAP by AT Command or SMS.

The only thing you need to test your Over The Air Provisioning (OTAP) is the command :

AT^SCFG="Trace/Syslog/OTAP","1"

But you have to make sure you type it right after you typed the "AT^SJOTAP" command. So, if you do it in a terminal. You should copy the syslog enable command, write the "AT^SJOTAP" command and immediatly past the syslog enable command.

What you should have is something like that :

--> AT^SJOTAP
<-- OK
--> AT^SCFG="Trace/Syslog/OTAP","1"
<-- SYSLOG ENABLED
<--
<-- [OTAP] GPRS connection established.
<-- [OTAP] Try to get http://www.yourwebsite.com/software.jad ...
<-- [OTAP] Connected.
<-- [OTAP] Transfer finished.
<-- [OTAP] Try to get http://www.yourwebsite.com/software.jar ...
<-- [OTAP] Connected.
<-- [OTAP] Transfer finished.
<-- [OTAP] JAM status: 900 Success.
<-- [OTAP] Reboot now.
<-- ^SYSSTART

For those who still want the answer to the "AT^SJOTAP error codes", you can find it in "Java_UserGuide.pdf" file provided by Cinterion TC65 SDK, page 61 :

  • 900 Success
  • 901 Insufficient memory in filesystem
  • 902 - not supported-
  • 903 - not supported-
  • 904 JAR size mismatch, given size in JAD file does not match real size of jar file
  • 905 Attribute mismatch, one of the mandatory attributes MIDlet-name, MIDlet-version, MIDlet-Vendor in the JAD file does not match those given in the JAR manifest
  • 906 Invalid descriptor, something is wrong with the format of the .jad file
  • 907 invalid JAR, the JAR file was not available under MIDlet-Jar-URL, files could not be extracted from JAR archive, or something else is wrong with the format of the file.
  • 908 incompatible configuration or profile
  • 909 application authentication failure, signature did not match certificate
  • 910 application authorization failure, tried to replace signed with unsigned version
  • 911 -not supported-
  • 912 Delete Notification

The most common error you can make is to have a wrong JAD file, this what it should look like :

The most common error you could make is to do not specify the complete path of your jar file in your jad file. You jad file should look like that :

MIDlet-1: Midlet, ,MySoft.Midlet
MIDlet-Jar-Size: 29180
MIDlet-Jar-URL: http://87.106.206.30/TC65/mysoft/mysoft.jar
MIDlet-Name: MySoft
MIDlet-Vendor: Cinterion
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: IMP-NG
Personal tools
Namespaces

Variants
Actions
Navigation
Tools