Archive for June, 2008

Some time ago I posted about how to do an OTAP with a Siemens modem (a TC65, XT65, TC65T, MTX65 or MTX65+G GPRS modem). In that post I wrote in detail about how to perform the OTAP from the HyperTerminal but I didn’t write a clear example of how to perform the OTAP with an SMS, some of you have already mentioned this to me.

So today I am going to write a small, very practical post about how to start an OTAP process with an SMS. There are various ways of approaching the process. I am going to outline the simplest way so that everyone that does the following steps will be able to do them without any problems.


Let’s propose that we have OTAP data saved on the modem before sending an SMS. You could send the data with SMSs but for convenience let’s imagine that they were saved in the modem’s configuration beforehand.

To do this let’s write (notice the quotation marks):


If we turn the modem off and turn it back on can we see that this information isn’t volatile with the command AT^SJOTAP?

Well after having done this t he modem is ready. Now we can send an SMS message to the modem to start the OTAP process. As I am poor and at home I only have a modem (that’s borrowed) so I will send the SMS from the modem itself.

To do this, I configure SMS text messages (yes text not PDU) ;)


Let’s configure the SMS parameters:


And with all this we only have to send an SMS message with the text:



Obviously we aren’t going to send this message as such. We will convert it to hexadecimal, just as we would on an 8-bit PDU code. We will substitute each character by its corresponding hexadecimal value (O=4F, T=54, A=41, P=50 etc. Remember that the end of each line has to end in 0A including the last line).

For the slackers I’ve put a little program here that I just made to encode the SMS text to hexadecimal properly. I have also included the project with the source code, made in Visual Basic 6.0 for those who want to use, copy or browse it.

Conversor texto hexadecimal

As you can see this small program’s source code is very simple-minded:

sting = “”
hexValue = “”
For i = 1 To Len(Text1.Text)
hexValue = Hex(Asc(Mid(Text1.Text, i, 1)))
If Len(hexValue) = 1 Then hexValue = “0″ & hexValue
string = string & hexValue
Next i
If hexValue <> “0A” Then string = string & “0A”
string = Replace(string, “0D”, “”)
Text2.Text = string

So once you have done this you can send an SMS to the modem. To do this send the command at+cmgs (you already know that first you send at+cmgs = telephone number and we press ENTER, then past the long hexadecimal string that we got from using the small program that I made and press CTRL+ z and the SMS will be sent instantly.



After a few seconds have passed you will see the modem’s LED start to blink differently, indicating the OTAP is working. When the process is finished the modem resets itself and you can see how to load HelloWorld.jar and .jad files onto the modem with MES.

I hope that this has been interesting, see you next time. ;)

Comments 13 Comments »