Hello,

My requirement is to send message on port in j2me

application,
i came to know that by using UDH we can deliver a

message on port, i try to add the destination port

no in smpp class file where $part_no is define but

control is not coming over there and tried different

ways but no use.

can any body help me out from this issue i would be

very thank full.

Thanks in Advance
Kalidas

Dani AI

Generated

raised the right idea: delivering to a J2ME application port is done with a User Data Header (UDH). was correct that the topic belongs with SMPP/SMS protocol discussion rather than generic Java. Below are concise, practical points to implement and debug UDH-based port addressing over SMPP.

UDH basics and what to send: UDH is a binary header prepended to the user-data. It begins with a single-byte UDHL (length of the header following), then one or more Information Elements (IE). For application ports use IEI 0x04 (8-bit ports, IEDL=2) or IEI 0x05 (16-bit ports, IEDL=4). For a 16-bit destination+source pair the header bytes are: UDHL=0x06, IEI=0x05, IEDL=0x04, destHi, destLo, srcHi, srcLo, followed by the message payload bytes. See User Data Header for the formal layout.

Common pitfalls and checks:

  • Ensure the UDHI indicator is set in the SMPP PDU (esm_class) so handsets treat the start of the user data as UDH.
  • Send the combined UDH+payload as binary data (or use the SMPP message_payload optional parameter) so the UDH bytes are not mangled by text encoding.
  • Account for UDH length when splitting/concatenating messages; if concatenation is used, the concat IE must be included in the same UDH and UDHL adjusted.
  • Verify the SMSC/gateway does not strip or block UDH/port addressing (some operators disable it).

If problems persist, capture and inspect the raw SMPP submit_sm PDU bytes going to the SMSC and confirm UDHL, IEI/IEDL, port bytes, and that UDHI is set. Refer to the SMPP/SMSC documentation from the gateway provider if any behavior differs from expectations.

Recommended Answers

All 2 Replies

If this is a Java question then it is posted in the wrong forum.

Hi Chris,

This is not a Java question, actually am using SMPP class to send SMS, sending SMS are working fine , my requirement is that to send SMS on port by using UDH with message.

can any body help to solve this issue sending sms on port in smpp class using by adding UDH with message to send on port, i will be very thank full

Thanks in advance
Kalidas

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.