participate


CLDC and MIDP - SMS, BinaryMessage and Wap Push
<<   Back to Forum  |   Give us Feedback
5 Duke Stars available
This topic has 8 replies on 1 page.
tamtamgames
Posts:3
Registered: 6/20/05
SMS, BinaryMessage and Wap Push   
Jun 20, 2005 1:08 AM

 
Hi there!

I've got this big problem with WMA BinaryMessage.

I try to make a MIDlet send an SMS with WMA. For the moment, I can send Text SMS without any problem, with a code looking like
MessageConnection l_connection = (MessageConnection) Connector.open (l_addr);
TextMessage l_msg = (TextMessage) l_connection.newMessage (MessageConnection.TEXT_MESSAGE);
l_msg.setPayloadText (l_text);


But functionnaly, I believe a Wap Push SMS would be much better (eg something like "Your friend sent you something" and an attached wap link). I read that a binary SMS could do that (am I right ?), so I used the BinaryMessage class. The problem must be with the format. I read many things on the web, and I tried many data formats. I believe the problem must be with headers and footers.
For instance, I tried to send the following data (as a byte array) with a BinaryMessage, but I just doesn't work though I found the data in a reference [wap-167-Service Indication]:
02 05 6A 00 45 C6 [as hex-coded bytes]
0D 03 [as hex-coded bytes]
xyz [as char-coded bytes]
00 85 03 [as hex-coded bytes]
email/123/abc.wml [as char-coded bytes]
00 [as hex-coded bytes]
0A C3 07 19 99 06 25 15 23 15 10 C3 04 19 99 06 30 01 [as hex-coded bytes]
03 [as hex-coded bytes]
You have 4 new e-mails [as char-coded bytes]
00 [as hex-coded bytes]
01 [as hex-coded bytes]
01 [as hex-coded bytes]


Therefore the questions are:
is it possible to send whatever binary sms with WMA?
what kind of headers / footers do we have to add?

Thank you for your help!
 
deepspace
Posts:2,943
Registered: 2/2/05
Re: SMS, BinaryMessage and Wap Push   
Jun 20, 2005 1:35 AM (reply 1 of 8)  (In reply to original post )

 
You probably need to use the direct data in the byte array, not the hex converted data. The api will probablyhandle that for you.
 
tamtamgames
Posts:3
Registered: 6/20/05
Re: SMS, BinaryMessage and Wap Push   
Jun 20, 2005 2:24 AM (reply 2 of 8)  (In reply to #1 )

 
I guess my words were not clear, but for instance when I said I put 0A as a hex-coded byte, I meant I put the decimal value 10 (=0x0A), and when I said I put 'You' as char-coded bytes, I meant I put the decimal values 89, 111 and 117.
The data are in a byte array, and I'm only talking about bytes, not strings.

I suppose you meant something like "You must use a raw byte array, not strings". Is that correct? Anyway the BinaryMessage.setPayloadData needs a byte array.
 
deepspace
Posts:2,943
Registered: 2/2/05
Re: SMS, BinaryMessage and Wap Push      
Jun 20, 2005 2:36 AM (reply 3 of 8)  (In reply to #2 )

 
yes, that's what I meant. But I guess, that's what you did already...

If I'm not mistaken, the wap Push sms should use a specific SMS port. I don't know It you can set this port? Otherwise it propably will not work.
 
tamtamgames
Posts:3
Registered: 6/20/05
Re: SMS, BinaryMessage and Wap Push   
Jun 20, 2005 3:12 AM (reply 4 of 8)  (In reply to #3 )

 
That may be the answer. And that's bad news :(

Actually I found there are several WAP PUSH ports:
wap-push        2948/tcp   WAP PUSH
wap-push        2948/udp   WAP PUSH
wap-pushsecure  2949/tcp   WAP PUSH SECURE
wap-pushsecure  2949/udp   WAP PUSH SECURE
wap-push-http   4035/tcp   WAP Push OTA-HTTP port
wap-push-http   4035/udp   WAP Push OTA-HTTP port
wap-push-https  4036/tcp   WAP Push OTA-HTTP secure
wap-push-https  4036/udp   WAP Push OTA-HTTP secure


Unfortunately the JSR-120 doesn't allow you to you use ports 2948 and 2949 for security reasons (and a SecurityException is thrown). I tried ports 4035 and 4036, but it doesn't seam to reach the receiver.

So I'm afraid the final words may be: it's not possible to send Wap Push SMS's from a MIDlet - but if someone can prove me I'm wrong, I'll be very humble and accept all solutions ;)

Many thanks for your help.
 
visualtron
Posts:10
Registered: 1/24/04
Re: SMS, BinaryMessage and Wap Push   
Aug 27, 2005 1:24 PM (reply 5 of 8)  (In reply to original post )

 
Why would you want to send a WAP Push from a mobile device? You can send a normal SMS with a link in it.

Rgds,
Joshua Lim
Visualtron Software
http://www.sms-gateway-software.com
 
danmoore
Posts:1
Registered: 12/15/05
Re: SMS, BinaryMessage and Wap Push   
Dec 15, 2005 10:01 AM (reply 6 of 8)  (In reply to #5 )

 
...i think because WAP PUSH is a standard for sending hyperlinks, whereas putting the text of a link into an SMS relies on the receiver's SMS viewer interpreting the link text to make it 'active' - i.e. on many handsets the user can't just click the link, they can only see its text.

that said, i'm sure support for links in SMS body text is ever-improving.

cheers, dan.
 
whatisthis
Posts:1
Registered: 12/16/05
Re: SMS, BinaryMessage and Wap Push   
Dec 16, 2005 12:44 AM (reply 7 of 8)  (In reply to #1 )

 
implementation of smsc server
 
Yashid
Posts:1
Registered: 5/2/06
Re: SMS, BinaryMessage and Wap Push   
May 2, 2006 3:39 AM (reply 8 of 8)  (In reply to #6 )

 
Have you found a way to send WAP Push using SMS, I needed to implement this as well. Please reply
 
This topic has 8 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics

About Sun forums
  • Oracle Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Oracle Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums