Sending SMS to a mobile app from smpp server
Hi frndz
I have a j2me application which is listening to port number 1581
So, any message for port number 1581 will be directed to my j2me application,
problem is how can I send an SMS to a specific port number using SMPP server so my j2me app. receives the msg.
I have my own SMPP server through which I am able to send simple messages
so what modification required to send messages to a particular port
thanks
alpesh
[467 byte] By [
alpesha] at [2007-11-26 12:26:01]

# 1
Hi there..
Sending messages to a j2me application to a specific port can be achieved by setting the UDH (User Data Header) values as the port values for ex.,500001 should be in hexcode.With the help of SMPP client if u submit a message to the j2me client it will be received by client and shows the messages with out going to the inbox which has its default port 0.
Its been tested and we are using for our real time processing..
feel free to seek for further clarifications.
with regds,
Senthil g.
# 2
Thanks Senthil
I tried two methods for sending msgs to a specific port from SMPP server
(I) setting up the optional parameter (TLV values)
The Code is:
request.setDestAddr(ton, npi,mobile_no );
request.setShortMessage("This msg is on port number 1581");
request.setDestinationPort((short)0x62D);// HEX for 1581
request.setSourcePort((short)0000);
request.setReplaceIfPresentFlag(replaceifpresentflag);
request.setRegisteredDelivery(registeredDelivery);
(II) setting UDH parameter
The Code is:
// setting UDH parameter CODE
ByteBuffer msgUDH=new ByteBuffer();
msgUDH.appendByte((byte)6);
msgUDH.appendByte((byte)5);
msgUDH.appendByte((byte)4);
msgUDH.appendShort((short)0x1581);
msgUDH.appendShort((short)0x0000);
// appending msg to the UDH header
message="Sending Message on Specified Port";
msgUDH.appendBuffer(new ByteBuffer(message.getBytes()));
// submitting the msg
request.setDestAddr(ton, npi,mobile_no );
request.setMessagePayload(msgUDH);
request.setProtocolId((byte)0xF5);
request.setEsmClass((byte)(Data.SM_UDH_GSM));
request.setReplaceIfPresentFlag(replaceifpresentflag);
request.setRegisteredDelivery(registeredDelivery);
I am submitting the message using any of the above method, message goes to mobile phone default Inbox, not to my J2ME app.
any Idea, what is wrong?
thanks
alpesh