Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2003

    SMS "portless" messages

    WMA provides a way for sending messages w/o a port number, the WMA 1.0 provides the following example url:

    What it does not say, however, is how to receive it. Are they being sent to some special port? If so what would be the port number to listen to?

    (trying to listen to sms://: or sms:// results in an error).

    Thanks a lot !

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003

    Address part of the message:
    defines is connection working in :
    “client” mode for sending: String addr = “sms://+358401234567”; //recipient String addr = “sms://+358401234567:6578”;

    server” mode for receiving:String addr = “sms://:5432”; //local port nr.
    MessageConnection conn = (MessageConnection)Connector.open(addr);

    Data part of the message:
    API is designed to handle both text and binary data.
    Represented by two interfaces of Message:

    TextMessage msg =

    Provides ways to manipulate the payload
    msg.setPayloadText(“Hello World!”);

    The port numbers in the GSM SMS are used to address the recipient MIDlet in the phone
    If a message is sent without a port number, it is a ”normal” SMS message
    it will go to the normal SMS inbox
    it will be shown normally to the recipient
    a MIDlet can reserve a port number (or several port numbers) for its own messages
    messages sent to the port number of the MIDlet will be delivered directly to the MIDlet and they should not be shown to the end user as normal messages

    A server that responds to received messages:
    try {
    String addr = “sms://:5432”;
    MessageConnection conn = (MessageConnection) Connector.open(addr);
    Message msg = null;
    while (someExitCondition) {
    // wait for incoming messages
    msg = conn.receive();

    // received a message
    if (msg instanceof TextMessage) {
    TextMessage tmsg = (TextMessage)msg;
    String receivedText = tmsg.getPayloadText();
    // respond with the same text with “Received:”
    // inserted in the beginning
    tmsg.setPayloadText(“Received:” + receivedText);
    // Note that the recipient address in the message is
    // already correct as we are reusing the same object
    } else {
    // Received message was not a text message, but e.g. binary}
    } catch (Exception e) {?_}

  3. #3
    Registered User
    Join Date
    Mar 2003

    Okay, so we know that,

    i)we can send a sms with port number from one midlet to another midlet.

    ii) A sms message without a port number is an ordinary message (sms class 1) where it will be stored in the phone sms inbox.

    ii)A sms message with port number will not be stored in the sms inbox and only midlet can capture it.

    My question is,

    i)What type (sms class) of message is the sms with port number?
    ii)Is midlet the only way to send a sms with port number? Can we use other means such as java application, gsm modem,etc?
    iii) I am not sure whether this is correct, but from my understanding, the port number is added to the header of the sms. So do we have any idea on how the header format of a sms with port number look like?

    Hope to hear from you guys soon. MANY thanx in advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts