To send sms to a specific port number ( eg: port in your j2me application ) you have to add following extra parameter to kannel send sms url
udh=
which will specify the User Data Header of the sms. For example following url will send the sms to port 6579
http://127.0.0.1:13013/cgi-bin/sendsms?username=[kannel user]&password=[kannel passwd]&to=[to phone number]&text=[message text]&udh=%06%05%04%19%B3
As you can see udh is a url-encoded string and it have a standard format as follows;
[how long the UDH is] [the format used to specify ports numbers] [the port number length] [destination port number] [source port number]
As a practical example, say I want to create a UDH to send a sms to port 2948, the UDH will be:
06 05 04 0B 84 23 F0 -> 06%05%04%0B%84%23%F0
where:
* 06 means "hey read the following 6 bytes"
* 05 is the format for numbers, in this case hexadecimal numbers
* 04 will tell the UDH that each port is represented using 4 character
* 0B84 is the destination port in hexadecimal, 2948 (decimal representation)
* 23F0 is the source port in hexadecimal, 9200 (decimal representation) or 23F0 (hexadecimal representation).
You have to keep in mind that after adding udh to the url, sms will be transfred as a binary messaage.
Ref:http://mobiforge.com/developing/story/binary-sms-sending-rich-content-devices-using-sms
Subscribe to:
Post Comments (Atom)
Intel Corporation XMM7360 LTE Advanced Modem in ArchLinux
The required packages are available in ArchLinux User Repository (AUR) so it will be easier if you can use an AUR helper package like yay . ...
-
* check wethre system is up-to-date ( apt-get update && apt-get upgrade) 1. wget http://www.draisberghof.de/usb_modeswitch/usb_modes...
-
Kannel is a gateway for connecting WAP (Wireless Application Protocol) phones to the Internet. It also works as an SMS gateway, for providin...
-
1) Add one of the following options to core group of kannel configuration. If you use mysql as dlr -storage you have to configure two more...
wonderful, you have made my day
ReplyDelete:)
Hey laxaman nice article...But i get message as binary format...how can i make it text format using UDH....UDH will allow sending as only BINARY format...???Please help
ReplyDeleteWith java You can try this:
ReplyDeleteif (msg instanceof TextMessage) {
TextMessage textMessage = (TextMessage) msg;
redMsg = textMessage.getPayloadText();
} else {
BinaryMessage binaryMessage = (BinaryMessage) msg;
byte data[] = binaryMessage.getPayloadData();
redMsg = new String(data);
}
Hi Laxman I need your help for sending binary(Picture)sms from kannel. If posible can you help me my mail id is ikiranreddy@gmail.com
ReplyDeletePlease I need Kannel Configration please ?
ReplyDeleteHi Laxman I need your help for sending binary(Picture)sms from kannel. If posible can you help me
ReplyDelete