Otap for Cinterion modems. TC65, TC65i, XT65, TC65T, MTX65
Posted by blogElectronica in 3.GENERAL
I have had the OTAP platform active for a very long time. Since then it has been used for thousands of OTAPs. As you know an OTAP is the process that allows you to remotely update Java applications that we embed in out Siemens/Cinterion modems. Today I’m going to present version 2.0 of this software which is similar to version 1.0 but has some important differences.
The first thing is that it no longer depends on my server www.otap.es. Now the software has a little TCP/IP server to manage OTAP responses. As you know, this means that when an OTAP process ends (good or bad), if the GPRS connectivity is correct it sends a notification (POST request) to a web server indicating the result of the operation. In version 1.0 this notification was always sent to www.otap.es by the modem whereas in version 2.0 you can specify your OTAP confirmation server or use this same application (v2.0) as a confirmation server. I have also prepared for this.
If you look at the following screenshot…
…you will see the URL notify parameter. That is the URL that the modem will call when the OTAP process has finished. As I said before, you can specify your own OTAP confirmation server (via IP or DNS) or use this same application as a confirmation server. For the latter, the simplest thing to do is click on the “My IP” button. By pressing this button a URL is automatically created with you router’s public IP address (if you didn’t know). This means that for example, when clicking on the “My IP” button, the URL notify parameter will display something like this (in my case):
http://83.56.194.122:20010/?ID=
This indicates that for the server confirmation, the modem must use the IP: 83.56.192.122, the 20010 port and it works like an ID phone number parameter. The software automatically changes the text <phone> for the number corresponding to the SIM which will carry out the OTAP. This is so that when the OTAP confirmation server receives the confirmation, it knows which phone number it’s about.
Two very important things. One is that obviously you have to do a NAT in our company’s ADSL router to redirect the 20010 port (or the port that you are using) to the PC where the OTAP confirmation software is running. The other is that you mustn’t forget the “/” between the port number (20010 in the example) and the question mark (?).
Once all of the necessary data is completed, we are ready to do the OTAP. For this we have to have a GSM modem connected to our PC’s serial port (configured to 115200,8,N1 and with HW flow control) which will be responsible for send OTAP SMSs. Once everything is connected we can press on the button “Initiate OTAP Process”.
Here is another difference with version 2.0 with regards to version 1.0. In the figure above and below, if you look, you will see that we have finally decided to use this same application as an OTAP confirmation server you have to enable the “OTAP Server Active” box and specify the TCP port indicated on the previous screen in “URL Notify”. I repeat that you mustn’t forget the NAT in the router and don’t forget to disable the windows firewall and/or antivirus so that they don’t block the chose TCP port.
As soon as this is done we are ready to press “Start OTAP Process” and the process will begin. In this version 2.0, the control OTAP error control has improved considerably. If you look, you will see that the superior table has 3 columns. The first two are the same as version 1.0, but the third one shows a LOG with what has happened. All you have to do is double click with the mouse on a certain LOG to open a screen with the complete LOG. This was it’s much easier to figure out the reason for an OTAP error if there is one. For example, if the OTAP process finished with OK and we open the LOG we will see something like this:
If on the other hand we didn’t specify the correct path (URL) inside the JAD file, we would have an error like the following in the <MIDlet-Jar-UR> parameter of the JAR file:
If we had been mistaken and didn’t specify the correct JAR file size in the <MIDlet-Jar-Size> parameter inside the JAD file, we would get an error like this:
If you wanted to test out the program you could certainly do it with the HelloWorld example that I have on blogElectronica. You can see the correct JAD in:
http://www.blogelectronica.com/TEMP/HelloWorld.jad
I hope that whoever uses OTAP finds it interesting. Here you have the LINK to download OTAP v2.0 software that I put in a zip file with all of the necessary DLLs so you don’t need an installation. If anyone has any problems with DLLs, please let me know. This version is completely free and never expires, but as there’s an important job for me to do, there’s always a “but”, it is limited. You can enter up to 5 modems into the system and therefore you can do OTAP simultaneously with a maximum of 5 modems (with a constant in the source code). But this version will be sufficient for most users.
But for those who don’t want to be limited to 5 modems, want to be able to use all necessary modems and especially want a COMPLETE SOURCE CODE from the OTAP v2.0 application, you are able to get it through PayPal (as it’s personal to me and I email it at 24h) Let’s see… if I was allowed a faster server for blogElectronica and for other future projects what would I have in mind…
Having the source code could be very useful to anyone who has planned their own OTAP application in order to not have to start from scratch and to save time. By having the application’s source code it’s possibly to modify it, made it bigger, add parameters, logos or whatever you want. I haven’t done it in Java, I’ve done it in Visual Basic 6 and I’ve included many comments so that everyone can understand without having to take any classes.
I hope it’s been interesting for you. See you another day, happy Sunday!
Tags: cinterion, mtx65, OTAP, tc65, xt65