Recieve Binary SMS from J2me

Recieve Binary SMS from J2me SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through October 31, 2007 » Recieve Binary SMS from J2me « Previous || Next »
Author Message
pedric
New member
Username: Pedric

Post Number: 1
Registered: 10-2007
Posted on Wednesday, October 17, 2007 - 03:23 am:   

Hi all,
i would like to get a binary sms from my midlet and receive it through now sms & pass it to a j2se application for processing. From the reference manual, its stated that binary data will only be passed through a http connection. Is it true? Could someone advise me on this and any recommendations? Thanks.

Regards
Pedric
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 191
Registered: 12-2006
Posted on Thursday, October 18, 2007 - 06:38 pm:   

Hi Pedric,

I see that same reference in the manual, but a quick test shows me that binary messages will be passed to a 2-way command that is an executable, as well as an HTTP command, as long as @@BINARY@@ is included somewhere in the command line string.

Alternatively, you could scan the received messages using the file-based interface in the SMS-IN directory.
pedric
New member
Username: Pedric

Post Number: 2
Registered: 10-2007
Posted on Friday, October 19, 2007 - 01:40 am:   

Hi Malcom,

I have checked through the SMS-IN directory. However, it seems to only keep only one sms message at a time only. Could it be my configuration. Please advise. Thanks.
pedric
New member
Username: Pedric

Post Number: 3
Registered: 10-2007
Posted on Friday, October 19, 2007 - 02:25 am:   

Hi,

I have tried nowsms and managed to send a binary message from my j2me MIDlet successfully to nowsms not specifying the destination port. However, my project requires me to send to a receiving port. Could you advise me if such a setting is allowed in nowsms?
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 239
Registered: 12-2006
Posted on Friday, October 19, 2007 - 08:59 pm:   

Hi pedric,

If there is no 2-way command defined, then message files will not be deleted from the SMS-IN directory. You would need to delete them manually.

If there is a 2-way command defined, then the message files are deleted from SMS-IN after they are processed by a 2-way command.


quote:

I have tried nowsms and managed to send a binary message from my j2me MIDlet successfully to nowsms not specifying the destination port. However, my project requires me to send to a receiving port. Could you advise me if such a setting is allowed in nowsms?




For a port addressed message, if you are receiving the message to a 2-way command, then NowSMS will strip off the port addressing and process it as a standard text message.

If the message is left as a file in the SMS-IN directory, you will see it as a raw binary message (not as text).
pedric
New member
Username: Pedric

Post Number: 4
Registered: 10-2007
Posted on Monday, October 22, 2007 - 03:06 am:   

Hi Malcom

Thanks for the reply. I took up what you suggested and managed to receive binary sms without a specified destination port. However, binary sms sent with a specified port was received and decoded as a text in the sms-in folder.

I am also having problems receiving binary sms from different telco and looking into the sms-in folder. The data received is decoded as a text and shows no data.

I would really appreciate your help on this.
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 248
Registered: 12-2006
Posted on Tuesday, October 23, 2007 - 06:26 pm:   

There may be binary SMS compatibility issues when going between some carriers (especially in countries that have a mix of GSM and CDMA operators, such as North America and India).

It would probably help if you provided some actual examples ... what was sent ... and what was received.
pedric
New member
Username: Pedric

Post Number: 5
Registered: 10-2007
Posted on Wednesday, October 24, 2007 - 02:52 am:   

On j2me MIDlet, i sent a binary data A2D6637712FAC6D69E23A802F4035F4DE450BA1E7E098B4F10E6FF7FB7AA555487B9B41DA1BB85AC 5848505E0459B911B599017BB76D2CF1E4712CDE7069F47939A8813AAD10058DA511C85ADBC674A2 A5968BFD97157107791354767A6FF695DB575C37265A563A752376465694E9FC6A21E1FDA6CB0579 1250C2F5EE3C7F7A (Hex String) using a specified destination port 16500. However, on now sms gateway i received it as text data type instead of a binary data. i have checked it in the sms-in folder and on my 2-way program and the binary parameters = 0 & the data is blank

Over a cross telco, the similar situation above occurs regardless if the destination port is specified or not on the MIDlet.

Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 253
Registered: 12-2006
Posted on Wednesday, October 24, 2007 - 05:02 pm:   

If you don't specify a destination port, do you see similar results?

It may be an issue that the cross-operator SMS interoperability in your country does not support binary SMS. As I mentioned above, this is a case in countries that have a mix of both GSM and CDMA operators.

If you send a binary message from NowSMS cross-operator, do you experience similar problems receiving the binary data in your application?

-malcolm
pedric
New member
Username: Pedric

Post Number: 6
Registered: 10-2007
Posted on Thursday, October 25, 2007 - 02:12 am:   

Hi,

I have 2 error scenarios here as listed below:

1. Over a similar telco, not specifying a destination port, i was able to receive the binary data on now sms. However, by specifying a destination port in my MIDlet. The data is received but interpreted as a text data instead of a binary data as shown in the smsin-folder and its content is blank.

2. Over an inter-telco, no matter if a destination port is specified or not. The binary sms is also interpreted wrongly. The log from smsdebug is pasted below:

10:18:58:593 [2] ThreadProcessModem: Modem initialization complete: iTegno GPRS Wireless Modem #2
10:24:53:531 [2] ModemReceiveMessages:
+CMGL: 2,0,,19
06915669917777040A9156792608520000700152014274230120

OK

10:24:53:531 [2] ModemReceiveMessages: Decoding received message index 2 from message storage SM
10:24:53:656 [2] ModemReceiveMessages: 06915669917777040A9156792608520000700152014274230120
10:24:53:734 [2] ModemReceiveMessages: SMSC address len = 6
10:24:53:734 [2] ModemReceiveMessages: SMSC Address = +xxxxxxxxx
10:24:53:734 [2] ModemReceiveMessages: SMS Message Type = SMS-DELIVER
10:24:53:734 [2] ModemReceiveMessages: Sender address len = 10
10:24:53:734 [2] ModemReceiveMessages: Sender Address = +xxxxxxxxx
10:24:53:734 [2] ModemReceiveMessages: PID = 00
10:24:53:734 [2] ModemReceiveMessages: DCS = 00
10:24:53:796 [2] ModemReceiveMessages: Anticipated user data length = 1
10:24:53:796 [2] ModemReceiveMessages: Message =
10:24:53:796 [2] ModemReceiveMessages: AT+CMGD=2

10:24:53:953 [2] ModemReceiveMessages:
OK

10:24:54:203 [3] ThreadProcessInboundSMS: Processing 471FFE75.in...
10:24:54:203 [3] GetProgramToExecute: C:\testbinarysms.bat @@BINARY@@ @@SENDER@@ @@RECIP@@ @@FULLSMS@@ @@MSGDATE@@ @@MSGTIME@@
10:24:54:203 [3] GetProgramToExecute: Converting character set for received SMS message to utf-8
10:24:54:203 [3] smsData Before:
10:24:54:203 [3] UTF8ToLocalString: Error 87 from WideCharToMultiByte
10:24:54:203 [3] UTF8ToLocalString: Error 87 from WideCharToMultiByte
10:24:54:203 [3] smsData After:
10:24:54:203 [3] GetProgramToExecute: C:\testbinarysms.bat 0 +xxxxxxxx +xxxxxxxx 20071025 102453
10:24:54:203 [3] ThreadProcessInboundSMS: Executing C:\testbinarysms.bat 0 +xxxxxxxx +xxxxxxxx 20071025 102453
10:31:12:937 [2] ThreadProcessModem: Before ModemRelease - iTegno GPRS Wireless Modem #2
10:31:12:937 [2] ThreadProcessModem: After ModemRelease - iTegno GPRS Wireless Modem #2
10:31:19:843 [0] main: Shutdown: Closing log files

I believe that the problem lies in the interpretation of the data. Is there anyway i could get the raw data from now sms to interpret the data myself as the sms-in folder interprets the data as binary in the first senario and none in the second senario.

Btw, what is nowsms cross-operator? I do not have any idea on it, please kindly explain. Thanks.
pedric
New member
Username: Pedric

Post Number: 7
Registered: 10-2007
Posted on Thursday, October 25, 2007 - 03:23 am:   

Btw, the telco that i used for testing is in singapore: Singtel, MobileOne, StarHub.
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 264
Registered: 12-2006
Posted on Thursday, October 25, 2007 - 05:16 pm:   

I'm sorry, but NowSMS is interpreting the message correctly. It is blank.

A good tool for manually decoding the raw SMS messages is PDUSpy, which you can download at http://www.nobbi.com/download.htm#pduspy.

If you use PDUSpy to manually decode this as an incoming message, you'll see what I mean.

The raw data that you need to supply is:

06915669917777040A9156792608520000700152014274230120

Hope that helps.

You may want to try sending some binary messages from NowSMS to itself to try to troubleshoot whether your problem is a limitation of the operator network ... or if it is a problem with the J2ME application.

-malcolm
pedric
New member
Username: Pedric

Post Number: 8
Registered: 10-2007
Posted on Monday, October 29, 2007 - 01:16 am:   

i am definite that theres nothing wrong with my j2me application as i could send and receive a binary sms sucessfully through J2ME regardless of operator.

With no solutions on hand, i decided to try a last resolution to switch my modem from the iTegno 3000 to a nokia 3650 or a nokia 6233. Could you advise me if the above two models is good for sending/ receiving binary sms through now sms gateway?

Login Login / Register Logout Logout Search Last 30 Days Topics Topics