You will need the following:
SMS 1:
SMS 2:
This messages are BASE64
encoded. The S25 treats SMS's starting with // special. If you send a standard
SMS starting with //UPC the S25 will not show it to you. So the //UPC is the
marker (UPC = Unwired Planet?) which must be stripped and after that the
BASE64 encoded message starts. A lot of binary data is used by WAP which is
normaly not possible with the limited SMS character set, so the SMS's are
encoded to overcome this. After decoding the two SMS's you will get 2
WAP WDP's:
WDP 1:
WDP 2:
Now that you have the WDP's you can start decoding it. This is not very
difficult (everything you need is described in the WAP 1.0 technical
manual on
www.wapforum.org). So here we go:
decoded WDP 1:
decoded WDP 2:
Packed inside the WDP's are HDTP PDU's. The
decoded HDTP PDU looks like:
decoded HDTP:
Prerequisites
Schematic overview
This phone acts as the peer in your private WAP gateway. It is connected
to a PC running LINUX and the WAP gateway software. This phone needs a
REAL modem built in (not one like the SH888 which talks IRDA over the
wire!!!) and must not be WAP enabled. If it is WAP enabled your WAP
SMS's are blocked by the phone and will never reach the gateway PC. (So
it's not possible to use another S25 as the peer! Some newer Motorolas
seems to work. If you just want so see the WAP SMS's and play around a
bit then any non WAP enabled phone can be used.
Some Basics
The browser in your S25 is WAP 1.0 compliant. It uses SMS as bearer. This
means when you access the internet via your MicroBrowser in your S25 a lot
of SMS's travel from your S25 to your GSM provider and vice versa. Normaly
if your provider supports WAP 1.0/SMS Bearer a so called WAP Gateway is
installed at your provider which is connected to the internet. So the data
travels vie SMS to the providers gateway and from there to the desired
destination in the internet. In real life you never see this SMS's and don't
have to worry about it. But if you want to set up your own private gateway
you have to know what's going on. So first here are some infos to make this
SMS's visible and explain their format.
To see whats happening when you select 5 Internet Browser in the
menu configure your phone as follows:
if you enter the first time you get a prompt to configure your browser.
If you already configured it you have to press
.
enter your SMS service center number here
enter the phone number of your gateway GSM peer phone
enter the number of your S25
Technical
Now when you select 5 Internet Browser your phone starts talking with
the net. When everything is configured right you will see 2 SMS's on the
peer phone which looks like:
NOTE: sometimes this may take very, very long!!!
//UPC
DAUEB3EhNgYEAAQCAQAAAAAAAQAAECFTSTI1CwBYAwEIAQEEAwYJCQGRADMuMSwyLjAAjABpbWFn
ZS94LXVwLWJtcACgADZBAIkAZW4AIAA3AJUAMTUsMwCWADkwLDMzAJcANSw4AJgAMQCZADIAmgAx
//UPC
DAUEB3EhNgYEAAMCAgCbADE0OTIAhQA0AJwAMQAAhel=
0C 05 04 07 71 21 36 06 04 00 04 02 01 00 00 00 ....q!6.........
00 00 01 00 00 10 21 53 49 32 35 0B 00 58 03 01 ......!SI25..X..
08 01 01 04 03 06 09 09 01 91 00 33 2E 31 2C 32 ...........3.1,2
2E 30 00 8C 00 69 6D 61 67 65 2F 78 2D 75 70 2D .0...image/x-up-
62 6D 70 00 A0 00 36 41 00 89 00 65 6E 00 20 00 bmp...6A...en. .
37 00 95 00 31 35 2C 33 00 96 00 39 30 2C 33 33 7...15,3...90,33
00 97 00 35 2C 38 00 98 00 31 00 99 00 32 00 9A ...5,8...1...2..
00 31 .1
0C 05 04 07 71 21 36 06 04 00 05 02 02 00 9B 00 ....q!6.........
31 34 39 32 00 85 00 34 00 9C 00 31 00 00 85 E9 1492...4...1....
0C - WDP header lenght
05 - Informal Element Identifier (IE) PORTS
04 - IE length
07 71 - destination port (1905)
21 36 - source port (8502)
06 - IE ?
04 - IE length
00 04 - sequence number ?
02 - total sequences ?
01 - this sequence ?
0C - WDP header lenght
05 - Informal Element Identifier (IE) PORTS
04 - IE length
07 71 - destination port (1905)
21 36 - source port (8502)
06 - IE ?
04 - IE length
00 05 - sequence number ?
02 - total sequences ?
02 - this sequence ?
00 00 00 00 - Session ID
00 - Request ID
01 - Type (SessionRequest)
00 00 - Cipher (00 no encryption, second byte undefined)
10 - HDTP Version 1.0
21 - ClientSessionID
53 49 32 35 - DeviceID=SI25
08 - Length of number
01 - ?
01 - ?
04 03 06 09 09 1 - The number (in this example +436991)
91 00 - Authorization
33 2E 31 2C 32 2E 30 00 - 3.1,2.0
8C 00 - Accept
69 6D 61 67 65 2F 78 2D 75 70 2D 62 6D 70 00 - image/x-up-bmp
A0 00 - If-Modified-Since
36 41 00 - 6A
89 00 - Accept-Language
65 6E 00 - en (this is the language you have selected
in your phone. de - german etc..)
20 00 -
37 00
95 00 - Content-Encoding
31 35 2C 33 00 - 15,3
96 00 - Content-Language
39 30 2C 33 33 00 - 90,33
97 00 - Content-Location
35 2C 38 00 - 5,8
98 00 - Content-MD5
31 00 - 1
99 00 - Content-Range
32 00 - 2
9A 00 - Content-Type
31|00 - 1
(data after the | are in the second SMS)
9B 00 - Date
31 34 39 32 00 - 1492 ??
85 00 - x-up-maxpdu
34 00 - 4
9C 00 - ETag
31 00 - 1
00 85 E9 -
What to come?
I am working on the SMS module for the wap gateway. So far it's about 33%
completed. It talks to the peer phone, takes SMS's the peer phone receives,
decodes it from the SMS PDU format to a text string (which in fact is a
BASE64 string), stripps of the //UPC marker, decodes BASE64 into binary,
decodes the WDP and now I am working on handling the HDTP. When I am
ready with the SMS module it should be possible that you can use your
Siemens S25 WAP.
NOTE: You should know that SMS (depending on your provider)
Because of this, nearly no GSM provider supports SMS as a bearer for WAP. This
page was just to show what's going on in your S25 and how you can use it -
if you want.
So if someone can make any sugestions, has any infos or would like to
help with this project please mail me
Richard.Prinz@MIN.at
Additional infos