Bryce,.. Please help me decode the PDU !

Bryce,.. Please help me decode the PDU ! SearchSearch
Author Message
Ravikanth Bollapragada
New member
Username: Ravikanth_b99

Post Number: 19
Registered: 03-2004
Posted on Wednesday, August 04, 2004 - 10:43 am:   

Hello Bryce,

I have been trying to send an MMS to an email address using the operator in Germany, "O2 Viag". It returns "Status Code: 400" as failure. But other operators works pretty well with the same code.

Can you please check the response from the gateway for my Send MMS PDU?

Send MMS Packet Reply
---------------------

12 80 03 04 20 06 94 8D 01 81 88 80 01 04 6A 00 ---->.... .........j.
7F E7 55 03 63 61 72 64 31 00 36 03 46 45 48 4C ---->.çU.card1.6.FEHL
45 52 00 01 60 03 44 69 65 20 76 6F 6E 20 49 68 ---->ER..`.Die von Ih
6E 65 6E 20 61 6E 67 65 66 6F 72 64 65 72 74 65 ---->nen angeforderte
20 53 65 69 74 65 20 6B 61 6E 6E 20 6E 69 63 68 ---->Seite kann nich
74 20 64 61 72 67 65 73 74 65 6C 6C 74 20 77 65 ---->t dargestellt we
72 64 65 6E 21 00 26 03 28 53 74 61 74 75 73 20 ---->rden!.&.(Status
43 6F 64 65 3A 20 34 30 30 29 00 E8 46 18 03 7A ---->Code: 400).èF..z
75 72 C3 BC 63 6B 00 01 32 01 01 01 01 ---->urück..2....

I can recognise the following..
12 80 03 ----> 00010010 -> 2 -> WTP Result PDU
04 ----> WSP Reply PDU
20 ----> Status - OK
06 ----> Header Length
94 8D 01 81 88 80 ----> Headers

The problem comes now..
Expecting MMS layer now

01 04 6A 00... ----> Dont know what is 01 in MMS layer.

Can you please help me out of this problem?

Regards,
Ravikanth Bollapragada
http://www.bollapragada.com/ravikanth.htm
Murali Mohan.K
Unregistered guest
Posted on Wednesday, August 04, 2004 - 02:07 pm:   

Hi ravikanth,

I feel you are not receiving a M-Send-Cnf PDU. I think the response what u have got is an encoded WML response indicating http 400 error, which means Bad Request.
The wml file starts from second line (7F E7 55). so surely its not M-Send-Cnf.

This problem may be because you are violating some MMS PDU rules. First, make sure that you are adding all mandatory fields of M-Send-Req PDU. Most common mistake will be excluding From field (Which is mandatory for this PDU). But some MMSCs may allow your request to pass through even if you have'nt included From field (because its not very difficult to add up the sender's address, if it is missing).
But the MMSC you are trying now may always expect the mandatory fields. So its sending this error.

Another reason may be, the MMSC does not support sending MMS to email (which is not the case with Most of the MMSCs). So try sending MMS to another phone number.

Its ridiculous to send error 400, for problems related to MMS PDU, but it happens with many MMSCs, which is not a good way of handling.

I am responding to this thread because I had a similar problem recently where I had missed From field.

For more information, I have a thread related to the problem I encountered somewhere in this site (Its a very recent post, so not difficult to find).

Hope this helps. If not, let us wait till Bryce responds.

Cheers
Murali
Ravikanth Bollapragada
New member
Username: Ravikanth_b99

Post Number: 20
Registered: 03-2004
Posted on Wednesday, August 11, 2004 - 06:33 am:   

Hi Murali,

Thank you for your post.

Actually I fill in the from field, in such a way that the MMSC should fill in appropriate from address.

Also, I believe that I do not violate any of the rules of MMS - because I could able to send the same MMS to a mobile. This happens only when I send to an email address and in particular with this operator - O2 Viag, Germany.

Strange thing is.. If I try to send to an email address from a mobile phone client, it is successful. It seems to me that it fails only with my program and particularly only with the network operator stated.

Actually I was waiting for Bryce.. But he might be busy. Otherwise I would have given a reply early before. Hoping him to see this posting and reply !

One doubt from your reply. How can I recognise via program, that it is a WML reply? Also.. If WML reply starts from second line (7F E7 55), what can it be the bytes before that? (01 04 6A 00). Is there any specification available in this regard to refer?

Thank you once again,
Ravikanth Bollapragada
http://www.bollapragada.com/ravikanth.htm
Murali Mohan.K
Unregistered guest
Posted on Wednesday, August 11, 2004 - 09:08 am:   

Hi Ravikanth,

If you feel that the problem is with your program, better you try opening your M-Send-Req PDU using Nokia toolkit, so as to make sure that your program is not doing anything funny when you give an email address. This toolkit must be able to open and parse your PDU if the PDU is not malformed.

As for as the response is concerned, its a WML page.

12 80 03 ----> 00010010 -> 2 -> WTP Result PDU
04 ----> WSP Reply PDU
20 ----> Status - OK
06 ----> Header Length
94 8D 01 81 88 80 ----> Headers

0x94 in the headers indicate the content-type received which is for "application/vnd.wap.wmlc". You can get more information about this in WSP specification.

Cheers
Murali