Category Archives: Java

Java Programming

How to convert SI message to GSM SMS User Data

After publishing the article on “How to send WAP Push data through SMPP”, there is a lot of requests on how to formulate the GSM SMS User Data.

Basically, the following is an example in java with remark in the code to explain how this is done:

  public String toSmsBinary() {
    /**
     GSM SMS User Data
     06: UDH Length which is 6
     05: 16 bit address
     04: Length(4)
     0B84: Destination Port(2948)
     23F0: Source Port(9200)
     
     Wireless Session Protocol 
     90: Transaction ID
     06: PDU Type(Push)
     01: Headers Length is 1
     AE: Content-Type is application/vnd.wap.sic
     
     */
    StringBuilder ud = new StringBuilder().append("0605040b8423f0900601ae");
    ud.append(toWBXML());
    return ud.toString();

  }

The above function creates the GSM SMS User Data and Wireless Session Protocol (WSP) header. Continue reading How to convert SI message to GSM SMS User Data

How to send WAP Push data through SMPP

After publishing the article on “How to send WAP Push data through SMPP”, there is a lot of requests on how to formulate the GSM SMS User Data.

Basically, the following is an example in java with remark in the code to explain how this is done:

  public String toSmsBinary() {
    /**
     GSM SMS User Data
     06: UDH Length which is 6
     05: 16 bit address
     04: Length(4)
     0B84: Destination Port(2948)
     23F0: Source Port(9200)
     
     Wireless Session Protocol 
     90: Transaction ID
     06: PDU Type(Push)
     01: Headers Length is 1
     AE: Content-Type is application/vnd.wap.sic
     
     */
    StringBuilder ud = new StringBuilder().append("0605040b8423f0900601ae");
    ud.append(toWBXML());
    return ud.toString();

  }

The above function creates the GSM SMS User Data and Wireless Session Protocol (WSP) header. Continue reading How to send WAP Push data through SMPP