PRO_CMD_SEND_SHORT_MESSAGE
Hello Guys,
I am trying to send sms from a STK application using PRO_CMD_SEND_SHORT_MESSAGE proactive command. It works well on most handsets, but I noticed that it cannot work on certain handsets like samsung omniaII and SE Xpreia. (Other STK services like receiving sms, displaying text are okay) Do you have an idea about this problem ? Where should I focus on. Same program, same card but different handsets I am really stuck.
Regards
Hi igosneves
First : i noticed that
/ / TP-DA length
tempBuffer[2] = (byte)0x03; // i.e destination address is 3 digits
tempBuffer[5] = (byte)0x00;//so if ur number 740 ,so tempBuffer[5] should be F0
Second:
to send SMS contains large data (theoretical > 140 bytes ) , u must divide original SMS into segments each one is limited to 140 bytes with the concatenated messages options.
i.e
// TP-MTI +
TPDU[0]=tempBuffer[0] =(byte)0x41 ;// 0 1 0 0 0 0 0 1 ,i.e SMS-SUBMIT +
|
user data header indicator i.e there are optional features in this SMS
u must add TLV describing concatenated short messages , before user data
Tag for concatenated short messages = 0x00
length = 0x03
Referance Number = consatnt byte (0x00 to FF), all segments of sharing this SMS must have the same value
Total number of seg. in entire msg. = consatnt byte (0x01 to FF), all segments of sharing this SMS must have the same value
Index of this Segment = 1 to N(Number of segments) ,segment number u must adjust this byte for every segment
i.e
tempBuffer[8] = (byte)tempMessageSize+(byte)0x05 ; // 5 bytes of concatenated short msg.
tempBuffer[9] = (byte)0x00;
tempBuffer[10] = (byte)0x03;
tempBuffer[11] = (byte)0x00;
tempBuffer[12] = (byte)NumberOfSegments;
tempBuffer[13] = (byte)IndexOfSegment;
Edited by: Nabil_ on Dec 30, 2009 2:02 AM
Similar Messages
-
EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM
Hi all, i have a problem with event handler in my sim toolkit applet.
i wrote the code:
reg.setEvent(EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM);
case EVENT_MENU_SELECTION:
proHdlr.init(PRO_CMD_SEND_SHORT_MESSAGE, (byte)0x00, DEV_ID_NETWORK);
proHdlr.appendTLV(TAG_ALPHA_IDENTIFIER, strings,
(short)((MSG_SENDING_SMS * STRING_RECORD_LENGTH)+(short)1),
(short)(strings[(short)(MSG_SENDING_SMS * STRING_RECORD_LENGTH)]));
// Define and append optional "Service center address" for the message (TON/NPI + number)
Util.arrayFillNonAtomic(tempBuffer, (short)0, (short)tempBuffer.length, (byte)0x00);
tempBuffer[0] = (byte)0x91;
tempBuffer[1] = (byte)0x21;
tempBuffer[2] = (byte)0x43;
tempBuffer[3] = (byte)0x65;
tempBuffer[4] = (byte)0x87;
proHdlr.appendTLV(TAG_ADDRESS, tempBuffer, (short)0, (short)5);
// Define and append SMS TPDU
Util.arrayFillNonAtomic(tempBuffer, (short)0, (short)tempBuffer.length, (byte)0x00);
// TP-MTI
tempBuffer[0] = (byte)0x01;
// TP-MR
tempBuffer[1] = (byte)0x00;
// TP-DA length
tempBuffer[2] = (byte)0x04;
// TP-DA
tempBuffer[3] = (byte)0x91;
tempBuffer[4] = (byte)0x34;
tempBuffer[5] = (byte)0x12;
// TP-PID
tempBuffer[6] = (byte)0x41;
// TP-DCS
tempBuffer[7] = (byte)0xF2;
// TP-UDL
tempBuffer[8] = (byte)0x05;
// TP-UD 'Hello' in 7-bit packed format
tempBuffer[9] = (byte)'H';
tempBuffer[10] = (byte)'E';
tempBuffer[11] = (byte)'L';
tempBuffer[12] = (byte)'L';
tempBuffer[13] = (byte)'O';
proHdlr.appendTLV(TAG_SMS_TPDU, tempBuffer, (byte)0, (byte)14);
// Send the command to the mobile
proHdlr.send();
return;
case EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM:
EnvelopeResponseHandler erh = EnvelopeResponseHandler.getTheHandler();
the sms is correctly sent, but the event is not captured!by debugging i can see that the line "EnvelopeResponseHandler erh = EnvelopeResponseHandler.getTheHandler();" is never reached!
Can anyone help me?
thanks!Hi Guys,
Have you found a slution? I have the same problem!!
many thanks
:-) -
STK send sms on nokia 6021 results in 0x32
Hi,
I am developing a STK application that sends an SMS. On the emulator and nokia 6680 everything goes fine. However, the nokia 6021 returns a resultcode of 0x32 ("command data not understood by ME").
What could be the problem ???
Thanks, Eric
This is the SMS_TPDU (number is Z-ed out):
public byte[] tpdu = {
// |
(byte) 0x11, // TP-RP TP-UDHI TP-SRR TP-VPF TP-RD TP-MTI
// 0=no 0=no 0=no 00=no field 0 01 (submit)
// reply usr data 1=yes 10=relative
// path header status 01=enhanced
// indicat report 11=absolute
// validity period format
(byte) 0x00, // TP-MR (message reference)
(byte) 0x0B, // address length
(byte) 0x91, // TON
0x13, 0x16,(byte)0xZZ,0xZZ, (byte)0xZZ, (byte)0xfZ, // number
(byte) 0x00, // TP-PID protocol id
(byte) 0x04, // TP-DCS (8bit data =0x04)
(byte) 0x0B, // TP-VALIDITY-PERIOD 0x0B=1H 0xAA=4 DAYS
(byte) 00, // TP-USER DATA LENGTH
(byte) 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, // 140 bytes
(byte) 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
(byte) 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
(byte) 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
(byte) 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
(byte) 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
(byte) 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
(byte) 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 // 20 bytes overflow
};and the code (writePos is the length of the the TPDU):
ProactiveHandler hdlr = ProactiveHandler.getTheHandler();
hdlr.clear();
hdlr.init(PRO_CMD_SEND_SHORT_MESSAGE, (byte)0x00, DEV_ID_ME);
// bit 0: 0=no pack 1=ME packs ^^^^
// alpha indentifier with no data indicates that ME should not show anything
hdlr.appendTLV(this.TAG_ALPHA_IDENTIFIER, nullAlphaIdentifier, (byte)0, (byte)nullAlphaIdentifier.length );
tpdu[OFFSET_USERDATA_LENGTH]= (byte) (writePos-OFFSET_USERDATA_BEGIN);
hdlr.appendTLV(this.TAG_SMS_TPDU, tpdu, (byte)0, writePos);
byte r = hdlr.send();Does the 6021 actually support the Send Short Message proactive command ? Nokia's are notorious for having inaccurate terminal profiles.
However the 6021 teminal profile
DF F7 FF FF 1F 00 00 DC 5D 00 00 00 00 05 0F 80 00 00 00
would suggest that it is meant to support it. -
Hi,
does anyone have an example of source code for sending a SMS MO using the proactive command: PRO_CMD_SEND_SHORT_MESSAGE
thanks in advanceJason Gosling wrote:
Dear guys
I have a question related to Proactive Command. Has the size of a proactive command (including tag, length and value) ever been greater than 256?
As far as I know, it seems to be YES.
However, if it is YES, how can the SIM inform the ME about the length of proactive command exactly when it has only one byte to do that job? Remember this length is gonna be used in *91xx* status (with xx (1 byte) = length of the proactive command/data) :)
Please tell me the transmission mechanism between SIM & ME in case the proactive command/data is greater than 256 bytes. :)
Thanks in advance,
JasonOK, it is correct. The data is not longer than 1 byte. So, if you want to send more than that, you have to cut it or use 61XX for this. -
Freeware program simulation with Sim Tool Kit
Hi:
Somebody knows about some freeware program simulation with Sim Tool Kit?
thanks* Send message by SMS
* @param message byte[] : message to send
* @param number byte : number of the sms
public void envoiSMS(byte[] message, byte number) {
// sending of message with all needed parameters
ProactiveHandler hdlerPro = ProactiveHandler.getTheHandler();
short tpduSubmitLength = (short) (SERVER_ADDRESS.length + 6 +
message.length);
byte[] tpduSubmit = new byte[tpduSubmitLength];
// TP-SRR + TP-UHDI + TP-RP + TP-VPF + TP-RD + TP-MTI
//reply path(b) | user header indicator (b) | report request (b) | periode validity(2b) | rejet m�me numero MR(b) | message type (2b)
byte FIRST_BYTE_local = (byte) 0x01; //juste type de message SUBMIT
//tpduSubmit[0] = FIRST_BYTE; // TP-MTI + TP-RD + TP-VPF + TP-RP + TP-UDHI + TP-SRR
tpduSubmit[0] = FIRST_BYTE_local;
//tpduSubmit[1] = number;
tpduSubmit[1] = 5;
for (short i = 0; i < SERVER_ADDRESS.length; i++) {
tpduSubmit[ (short) (i + 2)] = SERVER_ADDRESS;
tpduSubmit[ (short) (SERVER_ADDRESS.length + 2)] = TP_PID;
tpduSubmit[ (short) (SERVER_ADDRESS.length + 3)] = TP_DCS;
tpduSubmit[ (short) (SERVER_ADDRESS.length + 4)] = (byte) message.length; //UDL
for (short i = 0; i < message.length; i++) {
tpduSubmit[ (short) (SERVER_ADDRESS.length + 5 + i)] = message[i]; //UD
//envoi d'un SMS
hdlerPro.init(PRO_CMD_SEND_SHORT_MESSAGE, (byte) 0, DEV_ID_NETWORK);
hdlerPro.appendTLV(TAG_SMS_TPDU, tpduSubmit, (short) 0,
(short) tpduSubmitLength);
hdlerPro.send();
I can't do all comments in english; another comments is in french. -
Sim tool kit with java card help
Hi all,
i want to develop an applet which sends a sms to the network using sim tool kit and java card. can anyone can help me on this?
if u can give me any document or links or sampale codes i realy appriciate it.
Nuwan Nanayakkara* Send message by SMS
* @param message byte[] : message to send
* @param number byte : number of the sms
public void envoiSMS(byte[] message, byte number) {
// sending of message with all needed parameters
ProactiveHandler hdlerPro = ProactiveHandler.getTheHandler();
short tpduSubmitLength = (short) (SERVER_ADDRESS.length + 6 +
message.length);
byte[] tpduSubmit = new byte[tpduSubmitLength];
// TP-SRR + TP-UHDI + TP-RP + TP-VPF + TP-RD + TP-MTI
//reply path(b) | user header indicator (b) | report request (b) | periode validity(2b) | rejet m�me numero MR(b) | message type (2b)
byte FIRST_BYTE_local = (byte) 0x01; //juste type de message SUBMIT
//tpduSubmit[0] = FIRST_BYTE; // TP-MTI + TP-RD + TP-VPF + TP-RP + TP-UDHI + TP-SRR
tpduSubmit[0] = FIRST_BYTE_local;
//tpduSubmit[1] = number;
tpduSubmit[1] = 5;
for (short i = 0; i < SERVER_ADDRESS.length; i++) {
tpduSubmit[ (short) (i + 2)] = SERVER_ADDRESS;
tpduSubmit[ (short) (SERVER_ADDRESS.length + 2)] = TP_PID;
tpduSubmit[ (short) (SERVER_ADDRESS.length + 3)] = TP_DCS;
tpduSubmit[ (short) (SERVER_ADDRESS.length + 4)] = (byte) message.length; //UDL
for (short i = 0; i < message.length; i++) {
tpduSubmit[ (short) (SERVER_ADDRESS.length + 5 + i)] = message[i]; //UD
//envoi d'un SMS
hdlerPro.init(PRO_CMD_SEND_SHORT_MESSAGE, (byte) 0, DEV_ID_NETWORK);
hdlerPro.appendTLV(TAG_SMS_TPDU, tpduSubmit, (short) 0,
(short) tpduSubmitLength);
hdlerPro.send();
I can't do all comments in english; another comments is in french.
Maybe you are looking for
-
10.9.2 sleep issue won't wake up.
When 10.9.2 on my iMac 27 mid 2011 goes to sleep naturally overnite it won't wake. I have to do a reboot with the back button. Is anyone else having this issue?
-
Impact of the MRP module on Financial data
Hi, I wanted to play around with the MRP module that comes along with SBO - mainly to check out the features SBO offers and to find out the ease of use. I plan to test out on the TEST system and not PRODUCTION (LIVE). The question I have is, since I
-
hi all.i need help on this issue.. this is my web.xml <servlet> <servlet-name>ApplicationService Servlet</servlet-name> <servlet-class>ljt.view.servlet.ApplicationService</servlet-class> <load-on-startup>1</load-on-startup> </servlet> this is my Appl
-
How can I fix error message 150:30 in Premiere Elements?
Running Premiere Elements opens the message 'Licence for this product has stopped working' and Error 150:30. I have restarted my pc but it still appears.
-
BPEL and Axis2 Asynchronous service
Does anybody have develope Oracle BPEL Asynchronous process and Axis2 Asynchronous service. Can somebody share their expreince?? Thanks Gopal