Send binary message

Send binary message SearchSearch
Author Message
Ronny Voss
New member
Username: Ronnyniroitdk

Post Number: 1
Registered: 10-2006
Posted on Tuesday, October 03, 2006 - 08:37 am:   

Hi there

Issue is one of to:

1: reverse binary WBXML "Send OMA OTA Settings" to original XML.

2: be able to reproduce Send OMA OTA Settings using binary grapped from NOWSMS log.

If i using form do "Send OMA OTA Settings" i can grap the binary message from log. It would look like below. I can then copy/paste the binary into form "send binary message" and it works as expected. Phone receives the setting, but problem occurs when phone request for a password. The grapped binary from log do not contain any info about the request for using pincode. This is part of the mime header. So how should i support that with the binary form ?

BINARY:
------------------------------------


Binary=1;DCS=F5;UDH=0B05040B8423F000038F0301;Data=8F062F1F2DB6918192303941304341 3046413243453533313041463034364145424430443130353938333438304134424300030B6A0045 C65601870706034E616D65000101C600015501873606037735000187220603494E5445524E455400 01870706034E616D65000187340603687474703A2F2F6E69726F2E69742E646B3A
Binary=1;DCS=F5;UDH=0B05040B8423F000038F0302;Data=313233342F73796E636D6C2F647300 01C65901873A06032E2F63617264000187070603436F6E74616374732044420001872E0603746578 742F782D7663617264000101C65901873A06032E2F63616C00018707060343616C656E6461722044 420001872E0603746578742F782D7663616C656E646172000101C6570187310603
Binary=1;DCS=F5;UDH=0B05040B8423F000038F0303;Data=757365720001873206037061737377 6F72640001010101

-------------------------------------------------------------------------
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6622
Registered: 10-2002
Posted on Tuesday, October 03, 2006 - 09:21 pm:   

Hi,

You cannot reverse decode the passcode from the binary. (That is why the passcode feature exists, to provide some protection against settings being modified during transmission.)

Well, I suppose you could decode it by brute force, as it is not exactly what I would call a secure algorithm. It is based upon a hash of the message content with the pin code.

For more information, please see the Provisioning Content specifications on the Open Mobile Alliance web site (www.openmobilealliance.org).

-bn
Ronny Voss
New member
Username: Ronnyniroitdk

Post Number: 2
Registered: 10-2006
Posted on Wednesday, October 04, 2006 - 08:47 am:   

Hi Bruce

Well i dont think you answered the message fully.

Question is not to reverse the passcode from binary, because it is not present there.

I have 2 questions.

I try detail explain more.

Scenario:

By programming we use NOWSMS to send OMAOTA.
Sample:
String postStr = ?PhoneNumber11223344&OTAPIN=1234&OTAPINTYPE=USERPIN&OTAOMA="the XML document content"

When looking into log, we find the binary code for that OMAOTA. By using the send binary message form we can fill in the 2 fields user data header and binary data. This message do arrive to phone as a OMAOTA but fails on password.

So question is can i using the send binary message form apply this "OTAPIN=1234&OTAPINTYPE=USERPIN" as binary ?

Other quetion is:
Can i reverse to original XML what NOWSMS logs ?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6626
Registered: 10-2002
Posted on Wednesday, October 04, 2006 - 06:35 pm:   

Hi Ronny,


quote:

When looking into log, we find the binary code for that OMAOTA. By using the send binary message form we can fill in the 2 fields user data header and binary data. This message do arrive to phone as a OMAOTA but fails on password.




It should not fail. The "&OTAPIN=1234&OTAPINTYPE=USERPIN" are encoded into the binary SMS ... and a part of the binary content.


quote:

Can i reverse to original XML what NOWSMS logs ?




It is technically possible, but I'm not aware of any tools to do so.

If you want to view the XML generated by the "Send OMA Settings" web forum, then use the "View XML" button on the web form.

-bn
Ronny Voss
New member
Username: Ronnyniroitdk

Post Number: 3
Registered: 10-2006
Posted on Thursday, October 05, 2006 - 10:44 am:   

Hi Bryce

Yes it seems like the pin is part of binary.
I noticed at difference in binary when i make OMAOTA with or without the pin.

So the big questions is:
why cant i grap the binary from log and use the send binary form to try achieve the same. What happens is that phone do reconize push as OMAOTA and it also prompt as expected for a password - but it will not confirm password ?

And reason for needing to use the binary form instead of the OMAOTA (xml) form is, we have the binary for most phones and would like to use these data, since they will save us much time in supporting OMAOTA.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6636
Registered: 10-2002
Posted on Friday, October 06, 2006 - 02:35 am:   

Hi Ronny,

When you send out the binary SMS, are you sending it out via NowSMS ... or are you sending it out via your own application?

Try it with NowSMS, I expect it will work.

-bn
Ronny Voss
New member
Username: Ronnyniroitdk

Post Number: 4
Registered: 10-2006
Posted on Friday, October 06, 2006 - 09:01 am:   

Hallo Bryce

We are sending it using NOWSMS send binary message form.

Please try same scenario. Send OMAOTA using webform, afterwards grab binary from log and send that binary.

You will get same error i expect.

What can we do ?
Is it a bug i NOWSMS logging or ?


Regards
Ronny
Ronny Voss
New member
Username: Ronnyniroitdk

Post Number: 5
Registered: 10-2006
Posted on Friday, October 06, 2006 - 12:13 pm:   

Hi Bryce

Pls see above message/question.

In addition i can say that i do not use the input fields PID (Protocol ID), DCS (Data Coding Scheme).

Perhaps they should be filled with something ?

Regards
Ronny
Ronny Voss
New member
Username: Ronnyniroitdk

Post Number: 6
Registered: 10-2006
Posted on Friday, October 06, 2006 - 12:39 pm:   

Hi Bryce

Well, pls see above 2 messages.

I manged to do the OMAOTA using the binary form. I had to set dcs parameter to F7.
Other NOWSMS documentation says

"The “dcs” parameter is a hexadecimal value between 0 and FF that specifies the GSM 03.38 SMS Data Coding Scheme. F7 is a common data coding scheme for most binary message formats".

So my question to you now is: i have lots of these binary OMAOTA - is it possible to verify which dcs they use if not F7 ???

Regards
Ronny
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6670
Registered: 10-2002
Posted on Friday, October 13, 2006 - 09:34 pm:   

Hi Ronny,

If you are not setting a DCS value, then it will not work. You'll notice that the NowSMS log file includes "DCS=F5" as one of the attributes of the binary message that it is sending out.

F7 should work too (we used that in early versions of NowSMS), but F5 is a more correct value.

(In some environments it is necessary to use a value of 4 instead. To configure NowSMS to use this value instead, edit SMSGW.INI, and under the [SMSGW] section header add BinaryDCS=4. I recommend using F5 unless you encounter a problem.)

-bn
Ronny Voss
New member
Username: Ronnyniroitdk

Post Number: 7
Registered: 10-2006
Posted on Tuesday, November 07, 2006 - 01:15 pm:   

HI Bryce

Thanks alot.

Well iam working on the task fulltime again 0:-)

questions:

I will stick to F5 now, but is BinaryDCS relevant to the receiving phone or the enviroment sending it ?

Has to do with my question above, because i have alot of those binary data, so i would like to know if i can check if that binary data depends on binaryDCS=5 or 4. I hope i explain myself corret.

cheers

Ronny
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6783
Registered: 10-2002
Posted on Tuesday, November 07, 2006 - 04:13 pm:   

Hi Ronny,

It is an environment issue ... specifically the SMSC through which you are submitting.

With some providers in the Americas, you need to use DCS=4. (A few years back, we changed the default in NowSMS from F5 to 4. But we quickly had to change the default back to F5 because when using a GSM modem on Vodafone UK, DCS=4 messages did not work properly.)

You'll probably be fine with F5. Just keep this in the back of your mind.

-bn
Ronny Voss
New member
Username: Ronnyniroitdk

Post Number: 8
Registered: 10-2006
Posted on Wednesday, December 20, 2006 - 04:48 pm:   

Hi Bruce

This is my status:
I have all these binary wbxml OMAOTA fore all kinds of phones. I can resend configuration using NOWSMS and it works.

What i need to do is to change some URL in that wbxml. It is easy enough to do that, so i hoped that i was home free to be able to resend existing wbxml OMAOTA which i know works, just with a modified URL. This is not the case, when modified wbxml arrived to phones the are regonized as OMAOTA, but they all fails on the password.

So i think there might be some hash value on something within wbxml or alike, this to catch anybody (like me) modifying wbxml ?

Can you help anyway on issue ?

Thanks !

Regards
Ronny
Malcolm - Now Support
New member
Username: Malcolm

Post Number: 32
Registered: 12-2006
Posted on Wednesday, December 20, 2006 - 08:55 pm:   

Hi Ronny,

Bryce is on holiday.

If you change any value within the WBXML, it is necessary to recalculate the checksums (MAC parameter?) related to the PIN.

So it is not as simple as changing the few bytes that contain a URL.

When you submit the XML to NowSMS, it performs the conversion to WBXML and generates the necessary checksum.

--
Malcolm
Now Wireless Support
Ronny Voss
New member
Username: Ronnyniroitdk

Post Number: 9
Registered: 10-2006
Posted on Thursday, December 21, 2006 - 08:41 am:   

Hi again

Well issue for me is still the same.
I have all these binary wbxml OMAOTA fore all kinds of phones, which i really wanna reuse.

2 questions to be answered:
1: can wbxml tell if pin is used or not ?
2: can i change wbxml and reproduce checksum ?

/Ronny
Malcolm - Now Support
New member
Username: Malcolm

Post Number: 49
Registered: 12-2006
Posted on Thursday, December 21, 2006 - 03:47 pm:   

I'm sorry Ronny, but these questions are really beyond the scope of NowSMS. From a NowSMS support perspective, I believe that your problems can be resolved if you post the original XML instead of WBXML.

If you want to produce your own checksums then you need to refer to the OMA (Open Mobile Alliance) specifications at http://www.openmobilealliance.org. The OMA Provisioning Content specifications cover this functionality. In particularly the "Provsioning Bootstrap" specification describes the checksum algorithms, the most common of which being USERPIN.

--
Malcolm
Now Wireless Support