About converting byte to send SMS in Javacard

Hello all,
I'm try to send a location information out by put it in the unformat SMS.
The location will return in 7 bytes; which including MCC and MNC (3 bytes), LAC (2 bytes), and cell id (2 bytes).
Suppose it is 02 F8 00 | 00 14 | 00 79,
it means MCC is 208, MNC is 00, LAC 0041, and cell id is 0097
And that is the result getting from TLV of location proac. command.
After that I try to send these extract number by SMS. But I can't figure out how to convert it. I can't think how to calculate it. Anyone please suggest me, I can't solve it.
Thank you very much.

hi
u r getting ur answer in nibble swap format.
so write one function to swap nibbles of a byte.
to swap nibbles-------->
1)store byte in two diff variables
2)first right shift byte of one variable for 4 times then do and operation with 0x0F.
3)then left shift the same byte(stored in second variable) 4 times.
4)do or oeration between result of step 2 and step 3
resultant byte is ur answer.
Regards
Divyesh.

Similar Messages

  • Is there any way to send sms in MIDP1?

    Is there any way to send sms in MIDP1 which doesn't support WMA (MessageConnection, TextMessage, ...) ?
    It seems it should, because in MIDP 1.0 documentation is note about sending sms using protocol sms://destination:port and that it returns DatagramConnection but there is no example and I really don't know how to create new Datagram to send TEXT message. It can only be created from array of bytes so it seems it can only send binary messages (?!).
    Plz help me...

    what special API where i can get it any link or information about that APi
    regards
    abdul rafiq jani
    Applitech Solution Limited

  • And is there any way to send sms in MIDP1?

    And is there any way to send sms in MIDP1 which doesn't support WMA (MessageConnection, TextMessage, ...) ?
    It seems it should, because in MIDP 1.0 documentation is note about sending sms using protocol sms://destination:port and that it returns DatagramConnection but there is no example and I really don't know how to create new Datagram to send TEXT message. It can only be created from array of bytes so it seems it can only send binary messages (?!).
    Plz help me...

    what special API where i can get it any link or information about that APi
    regards
    abdul rafiq jani
    Applitech Solution Limited

  • Sending sms to a specific port using j2se

    Hi,
    I want to send sms to a specific port from j2se platform not from j2me.Is there any way to send it through a modem or through a third party service provider like SMSJunction or Clickatell?If anyone have the code of doing this,plzz help me.
    Arnab.

    I don�t know but i use the JAVA ME JSR 120
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import javax.wireless.messaging.*;
    public class SmsConnecter // implements MessageListener
         String port = "5001";
         public SmsConnecter()
    public boolean sendSMS(byte data[]) {
         try {
              String destAddress = "sms://4681234567:5001";
              MessageConnection smsConnection =
                   (MessageConnection)Connector.open(destAddress);
              //Create binary message
              BinaryMessage binaryMSG = (BinaryMessage)smsConnection.newMessage(
                   MessageConnection.BINARY_MESSAGE);
              //Setting destination add
              binaryMSG.setAddress(destAddress);
              //Add payload data
              binaryMSG.setPayloadData(data);
              //Now send the message
              smsConnection.send(binaryMSG);
              smsConnection.close();
              return true;
         } catch(Exception e) {
              //System.out.println("e="+e);
             return false;   
    }Ad about port...
    Port number Description
    2805 WAP WTA secure connection-less session service
    2923 WAP WTA secure session service
    2948 WAP Push connectionless session service (client side)
    2949 WAP Push secure connectionless session service (client side)
    5502 Service Card reader
    5503 Internet access configuration reader
    5508 Dynamic Menu Control Protocol
    5511 Message Access Protocol
    5512 Simple Email Notification
    9200 WAP connectionless session service
    9201 WAP session service
    9202 WAP secure connectionless session service
    9203 WAP secure session service
    9207 WAP vCal Secure
    49996 SyncML OTA configuration
    49999 WAP OTA configuration
    //Mickenull

  • Sending SMS with Simplewire SDK to a specific port, not working

    Hi,
    I guess most ppls are familiar with the simplewire SDK. I tried sending SMS to a port on my number thru the SimpleWire SDK but I guess it is not delivering the the apt port.
    The reason is quite simple:
    I tired sending to the same port on the same phone thru the java wireless API on the same phone and the midlet picked up the SMS.
    Anytime I send thru the Simplewire SDK, it comes to the phone (though my ringtone never rings, which suggest it may not going to the default port), but my midlet never picks.
    I am suspectign the mode of settin the port may be faulty. Here is my settings
    SMS sms = new SMS();
    sms.setDestPort(port);
    // Where port = (short) 16000

    I don�t know but i use the JAVA ME JSR 120
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import javax.wireless.messaging.*;
    public class SmsConnecter // implements MessageListener
         String port = "5001";
         public SmsConnecter()
    public boolean sendSMS(byte data[]) {
         try {
              String destAddress = "sms://4681234567:5001";
              MessageConnection smsConnection =
                   (MessageConnection)Connector.open(destAddress);
              //Create binary message
              BinaryMessage binaryMSG = (BinaryMessage)smsConnection.newMessage(
                   MessageConnection.BINARY_MESSAGE);
              //Setting destination add
              binaryMSG.setAddress(destAddress);
              //Add payload data
              binaryMSG.setPayloadData(data);
              //Now send the message
              smsConnection.send(binaryMSG);
              smsConnection.close();
              return true;
         } catch(Exception e) {
              //System.out.println("e="+e);
             return false;   
    }Ad about port...
    Port number Description
    2805 WAP WTA secure connection-less session service
    2923 WAP WTA secure session service
    2948 WAP Push connectionless session service (client side)
    2949 WAP Push secure connectionless session service (client side)
    5502 Service Card reader
    5503 Internet access configuration reader
    5508 Dynamic Menu Control Protocol
    5511 Message Access Protocol
    5512 Simple Email Notification
    9200 WAP connectionless session service
    9201 WAP session service
    9202 WAP secure connectionless session service
    9203 WAP secure session service
    9207 WAP vCal Secure
    49996 SyncML OTA configuration
    49999 WAP OTA configuration
    //Mickenull

  • I want to send sms through j2me

    plz help me.
    send ur replies as soon as possible.
    thank u.

    And is there any way to send sms in MIDP1 which doesn't support WMA (MessageConnection, TextMessage, ...) ?
    It seems it should, because in MIDP 1.0 documentation is note about sending sms using protocol sms://destination:port and that it returns DatagramConnection but there is no example and I really don't know how to create new Datagram to send TEXT message. It can only be created from array of bytes so it seems it can only send binary messages (?!).
    Plz help me...

  • Convert byte array to table of int

    [http://www.codeproject.com/KB/database/PassingArraysIntoSPs.aspx?display=Print|http://www.codeproject.com/KB/database/PassingArraysIntoSPs.aspx?display=Print] Hello friends.
    I'm pretty new with PL/SQL.
    I have code that run well on MSSQL and I want to convert it to PL/SQL with no luck.
    The code converts byte array to table of int.
    The byte array is actually array of int that was converted to bytes in C# for sending it as parameter.
    The TSQL code is:
    CREATE FUNCTION dbo.GetTableVarchar(@Data image)
    RETURNS @DataTable TABLE (RowID int primary key IDENTITY ,
    Value Varchar(8000))
    AS
    BEGIN
    --First Test the data is of type Varchar.
    IF(dbo.ValidateExpectedType(103, @Data)<>1) RETURN
    --Loop thru the list inserting each
    -- item into the variable table.
    DECLARE @Ptr int, @Length int,
    @VarcharLength smallint, @Value Varchar(8000)
    SELECT @Length = DataLength(@Data), @Ptr = 2
    WHILE(@Ptr<@Length)
    BEGIN
    --The first 2 bytes of each item is the length of the
    --varchar, a negative number designates a null value.
    SET @VarcharLength = SUBSTRING(@Data, @ptr, 2)
    SET @Ptr = @Ptr + 2
    IF(@VarcharLength<0)
    SET @Value = NULL
    ELSE
    BEGIN
    SET @Value = SUBSTRING(@Data, @ptr, @VarcharLength)
    SET @Ptr = @Ptr + @VarcharLength
    END
    INSERT INTO @DataTable (Value) VALUES(@Value)
    END
    RETURN
    END
    It's taken from http://www.codeproject.com/KB/database/PassingArraysIntoSPs.aspx?display=Print.
    The C# code is:
    public byte[] Convert2Bytes(int[] list)
    if (list == null || list.Length == 0)
    return new byte[0];
    byte[] data = new byte[list.Length * 4];
    int k = 0;
    for (int i = 0; i < list.Length; i++)
    byte[] intBytes = BitConverter.GetBytes(list);
    for (int j = intBytes.Length - 1; j >= 0; j--)
    data[k++] = intBytes[j];
    return data;
    I tryied to convert the TSQL code to PL/SQL and thats what I've got:
    FUNCTION GetTableInt(p_Data blob)
    RETURN t_array --t_array is table of int
    AS
    l_Ptr number;
    l_Length number;
    l_ID number;
    l_data t_array;
    BEGIN
         l_Length := dbms_lob.getlength(p_Data);
    l_Ptr := 1;
         WHILE(l_Ptr<=l_Length)
         loop
              l_ID := to_number( DBMS_LOB.SUBSTR (p_Data, 4, l_ptr));
              IF(l_ID<-2147483646)THEN
                   IF(l_ID=-2147483648)THEN
                        l_ID := NULL;
                   ELSE
                        l_Ptr := l_Ptr + 4;
                        l_ID := to_number( DBMS_LOB.SUBSTR(p_Data, 4,l_ptr));
                   END IF;
                   END IF;
    l_data(l_data.count) := l_ID;
              l_Ptr := l_Ptr + 4;
         END loop;
         RETURN l_data;
    END GetTableInt;
    This isn't work.
    This is the error:
    Error report:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    06502. 00000 - "PL/SQL: numeric or value error%s"
    I think the problem is in this line:
    l_ID := to_number( DBMS_LOB.SUBSTR (p_Data, 4, l_ptr));
    but I don't know how to fix that.
    Thanks,
    MTs.

    I'd found the solution.
    I need to write:
    l_ID := utl_raw.cast_to_binary_integer( DBMS_LOB.SUBSTR(p_Data, 4,l_ptr));
    instead of:
    l_ID := to_number( DBMS_LOB.SUBSTR (p_Data, 4, l_ptr));
    The performance isn't good, it's take 2.8 sec to convert 5000 int, but it's works.

  • Having horrible service with 4GLTE I have had 3G for several weeks (I am not the only person I know having this problem), I have reset my network settings and it did not resolve the issue.  I am also unable to send SMS and text messages without them eithe

    Having horrible service with 4GLTE I have had 3G for several weeks (I am not the only person I know having this problem), I have reset my network settings and it did not resolve the issue.  I am also unable to send SMS and text messages without them either failing or not sending at all.  Is there an outage in the Cleveland, Ohio area (zip codes 44129, 44134, 44137) or anything else I can do to resolve this issue?

    Not that I'm a Verizon employee, but I have experience in the field. An LTE tower will only extend up to, on a perfect day, with no elevation, 6-7 miles. On a typical day, you will be lucky at four (4) miles. The three ZIP codes you've given are all within about a 12 mile radius. That would mean that 2-3 towers are currently down at the same time, and Verizon would know about it within the hour. Being it's Cleveland, I'm sure they would receive numerous calls regarding an outage of that size.
    My point is that if you're having issues in all three ZIP codes, chances are it's a phone issue. If you're handset is simply not receiving LTE, but still receiving 3G, that would signify a SIM card issue. You need to get your SIM card replaced.

  • How can I send SMS from email through iMS5.2

    there is a way for sending SMS through iMS5.2 but i do not know how?Is there any need for SMPP server or any gateway for sending SMS.I know about the rewrite rule to be include in imta.cnf file but I want to know the steps for configuring the iMS5.2 for sending SMS.is there any SMPP server(SMSC) that needs to be separately installed

    IMS 5.2 supports one way SMS, however, you must have access to the SMSC's SMPP server. The server must support SMPP V3.4 over TCP/IP and there must be TCP/IP connectivity between the host running iMS and the SMPP server.
    You also have to configure a SMS channel in iMS, then it is merely a matter of sending a mail message to the address associated with that channel.
    The documentation for how to do that can be found at http://docs.iplanet.com/docs/manuals/messaging/technotes/5.2sms.html which is reached from the "related links" at the bottom of the messaging documentation web site http://docs.iplanet.com/docs/manuals/messaging.html#related, and then select "Technical Notes and Examples". Note SMS is supported, the doc just didn't make it into the regular set.

  • I recently buyed totally unlocked sprint iphone which was legally contract free and i am using that phone in india but i am not able to send sms .everything is working fine except sending sms. i have tried everything plz help me !!

    i recently buyed totally unlocked sprint iphone which was legally contract free and i am using that phone in india but i am not able to send sms .everything is working fine except sending sms. i have tried everything plz help me !! i have tried everything i.e. reset iphone /hard reset/network setting reset /sms service no i have also changed but i am still not able to send sms.. please help me as i am really worried .. thank you !!

    I had the same problem.  Kept getting message of waiting for activation or check network connections.  I also tried every solution out there and nothing worked.  This did though:  I download the newest version of itunes (through Internet Explorer - Google Chrome wouldn't work).  It pulled in my entire library thank goodness and then I plugged my iphone 4s into the computer.  I let itunes find it, did a complete backup in icloud, then did a restore.  Entire process took a couple of hours, but I now have imessage and facetime back.  I was about ready to give up on Apple and go get a different phone ~

  • How to send sms through java program?

    hi,
    i am trying to send sms through java program.i am usining ubuntu 6.04.i am using modem MC35i.i use the jSMSEnjine.jar and rxtxcomm.jar.
    these are the following program.
    import org.jsmsengine.*;
    import java.util.*;
    class SendMessage
         public static void main(String[] args)
              int status;
              // Create jSMSEngine service.
         CService srv = new CService("Com2",9600);
              //CService srv = new CService("COM2",9600);
              System.out.println();
              System.out.println("SendMessage(): sample application.");
              System.out.println(" Using " + srv._name + " " + srv._version);
              System.out.println();
              try
                   //     Initialize service.     
                   srv.initialize();
                   Thread thread =Thread.currentThread();
                   thread.sleep(1000);
                   System.out.println(srv);
                   //     Set the cache directory.
                   srv.setCacheDir(".\\");
                   //     Set the phonebook.
                   //     srv.setPhoneBook("../misc/phonebook.xml");
                   //     Connect to GSM device.
                   status = srv.connect();
                   //     Did we connect ok?
                   int st=CService.ERR_OK;
                   System.out.println(st);
                   System.out.println(status);
                   if (status == CService.ERR_OK)
                        //     Set the operation mode to PDU - default is ASCII.
                        srv.setOperationMode(CService.MODE_PDU);
                        // Set the SMSC number (set to default).
                        srv.setSmscNumber("");
                        //     Print out GSM device info...
                        System.out.println("Mobile Device Information: ");
                        System.out.println("     Manufacturer : " + srv.getDeviceInfo().getManufacturer());
                        System.out.println("     Model : " + srv.getDeviceInfo().getModel());
                        System.out.println("     Serial No : " + srv.getDeviceInfo().getSerialNo());
                        System.out.println("     IMSI : " + srv.getDeviceInfo().getImsi());
                        System.out.println("     S/W Version : " + srv.getDeviceInfo().getSwVersion());
                        System.out.println("     Battery Level : " + srv.getDeviceInfo().getBatteryLevel() + "%");
                        System.out.println("     Signal Level : " + srv.getDeviceInfo().getSignalLevel() + "%");
                        //     Create a COutgoingMessage object and dispatch it.
                        //     *** Please update the phone number with one of your choice ***
    // String smsLengthTest="Hi"+"\nTesting is going on.Test for sending unlimited number of charecter.So you will get N number of SMS.Initially I trancate the whole string by 70 charecter.Later I will put it upto 90 charecter.Some chararecter should kept for header portion.I don't know the total number.It is just test.If you got the sms u should appreciate me...This is Ripon...I have written sms program";
    String smsLengthTest="Hi\n"+"This is Govindo";
    int mao=smsLengthTest.length();
    System.out.println("Length of sms :"+mao);
    String smsNo="9433314095";
    smsNo="+91"+smsNo;
    if(mao<70)
    COutgoingMessage msg = new COutgoingMessage(smsNo,smsLengthTest);
    //     Character set is 7bit by default - lets make it UNICODE :)
    //     We can do this, because we are in PDU mode (look at line 63). When in ASCII mode,
    //          this does not make ANY difference...
    msg.setMessageEncoding(CMessage.MESSAGE_ENCODING_UNICODE);
    if (srv.sendMessage(msg) == CService.ERR_OK) System.out.println("Message Sent!");
    else System.out.println("Message Failed!");
    else
    // COutgoingMessage msg = new COutgoingMessage(smsNo,smsLengthTest);
    // LinkedList messageList;
    // messageList = new LinkedList();
    // messageList.add(msg);
    // LinkedList maooo=new LinkedList();
    // maooo=srv.splitLargeMessages(messageList);
    int sizelength=0;
    int counter=0;
    sizelength=smsLengthTest.length();
    System.out.println("SMS length :"+sizelength);
    int smsCntr=sizelength/70;
    System.out.println("smsCntr :"+smsCntr);
    counter=smsCntr+1;
    int j=70;
    int k=0;
    try
    for(int i=0;i<smsCntr;i++)
    String test="";
    test=test+i;
    test=smsLengthTest.substring(k,j);
    System.out.println(test);
    System.out.println(test.length());
    COutgoingMessage msg = new COutgoingMessage(smsNo, test);
    System.out.println("hi this is suman" + smsNo);
    //     Character set is 7bit by default - lets make it UNICODE :)
    //     We can do this, because we are in PDU mode (look at line 63). When in ASCII mode,
    //          this does not make ANY difference...
    msg.setMessageEncoding(CMessage.MESSAGE_ENCODING_UNICODE);
    if (srv.sendMessage(msg) == CService.ERR_OK) System.out.println("Message Sent!");
    else System.out.println("Message Failed!");
    k=k+70;
    j=j+70;
    catch(Exception e)
    System.out.println("Error...1");
    e.printStackTrace();
    e.getMessage();
    String lastPortion=smsLengthTest.substring(k);
    System.out.println(lastPortion);
    COutgoingMessage msg = new COutgoingMessage(smsNo, lastPortion);
    //     Character set is 7bit by default - lets make it UNICODE :)
    //     We can do this, because we are in PDU mode (look at line 63). When in ASCII mode,
    //          this does not make ANY difference...
    msg.setMessageEncoding(CMessage.MESSAGE_ENCODING_UNICODE);
    if (srv.sendMessage(msg) == CService.ERR_OK) System.out.println("Message Sent!");
    else System.out.println("Message Failed!");
                        // Disconnect from GSM device.
                        srv.disconnect();
                   else System.out.println("Connection to mobile failed, error: " + status);
              catch (Exception e)
                   e.printStackTrace();
              System.exit(0);
    the error is:
    SendMessage(): sample application.
    Using jSMSEngine API 1.2.6 (B1)
    org.jsmsengine.CService@addbf1
    0
    -101
    Connection to mobile failed, error: -101
    please help me,its very urgent.

    come back in about 5 years, we may have time for you by then.
    In the meantime, how about contacting the people who wrote that library and asking them nicely for help (rather than trying to order people to drop whatever they're doing and jump through hoops to accommodate your every wish as you're doing here)?

  • Problem in sending SMS via using java communication API

    I need to send SMS via my sony ericsson Z530i. It is connected to the com5 port of my system. I got the following code.
    import java.io.*;
    import java.util.BitSet;
    import javax.comm.*;
    import java.lang.*;
    public class SerialToGsm {
        InputStream in;
        OutputStream out;
        String lastIndexRead;
        String senderNum;
        String smsMsg;
        SerialToGsm(String porta) {
            try {
    //            CommPortIdentifier portId = CommPortIdentifier.getPortIdentifier("com5");
                CommPortIdentifier portId = CommPortIdentifier.getPortIdentifier(porta);
                SerialPort sp = (SerialPort)portId.open("Sms_GSM", 0);
                sp.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
                sp.setFlowControlMode(sp.FLOWCONTROL_NONE);
                in = sp.getInputStream();
                out = sp.getOutputStream();
                // modem reset
                sendAndRecv("+++AT", 30);       // delay for 20 sec/10
                sendAndRecv("AT&F", 30);
                sendAndRecv("ATE0", 30);        // echo off
                sendAndRecv("AT +CMEE=1", 30);  // verbose error messages
                sendAndRecv("AT+CMGF=0", 70);   // set pdu mode
    //            sendAndRecv("AT V1E0S0=0&D2&C1", 1000000);
            catch (Exception e) {
                System.out.println("Exception " + e);
             System.exit(1);
        private String sendAndRecv(String s, int timeout) {
            try {
                // clean serial port input buffer
                in.skip(in.available());
                System.out.println("=> " + s);
                s = s + "\r";         // add CR
                out.write(s.getBytes());
                out.flush();           
                String strIn = new String();
                for (int i = 0; i < timeout; i++){
                    int numChars = in.available();
                    if (numChars > 0) {
                        byte[] bb = new byte[numChars];
                        in.read(bb,0,numChars);
                        strIn += new String(bb);
                    // start exit conditions
                    if (strIn.indexOf(">\r\n") != -1) {
                        break;
                    if (strIn.indexOf("OK\r\n") != -1){
                        break;
                    if (strIn.indexOf("ERROR") != -1) { // if find 'error' wait for CR+LF
                        if (strIn.indexOf("\r\n",strIn.indexOf("ERROR") + 1) != -1) {
                            break;                                            
              Thread.sleep(100); // delay 1/10 sec
                System.out.println("<= " + strIn);
                if (strIn.length() == 0) {
                    return "ERROR: len 0";
                return strIn;
            catch (Exception e) {                 
                System.out.println("send e recv Exception " + e);
                return "ERROR: send e recv Exception";
        public String sendSms (String numToSend, String whatToSend) {
            ComputeSmsData sms = new ComputeSmsData();
            sms.setAsciiTxt(whatToSend);
            sms.setTelNum(numToSend);
    //        sms.setSMSCTelNum("+393359609600");  // SC fixed
            String s = new String();
            s = sendAndRecv("AT+CMGS=" + (sms.getCompletePduData().length() / 2) + "\r", 30);
    //        System.out.println("==> AT+CMGS=" + (sms.getCompletePduData().length() / 2));
    //        System.out.println("<== " + s);
            if (s.indexOf(">") != -1) {
    //            s = sendAndRecv(sms.getSMSCPduData() + sms.getCompletePduData() + "\u001A"); // usefull one day?
    //            System.out.println("Inviero questo >>>> " + sms.getCompletePduData());
                   // if this sintax won't work try remove 00 prefix
                s = sendAndRecv("00" + sms.getCompletePduData() + "\u001A", 150);
    //            System.out.println("<== " + s);
                return s;
            else {
                return "ERROR";
        // used to reset message data
        private void resetGsmObj() {
            lastIndexRead = null;
            senderNum = null;
            smsMsg = null;
        public String checkSms (){
            String str = new String();
            String strGsm = new String();                         
            strGsm = sendAndRecv("AT+CMGL=0", 30);  // list unread msg and sign them as read
            // if answer contain ERROR then ERROR
            if (strGsm.indexOf("ERROR") != -1) {
                resetGsmObj();
                return strGsm; // error
            strGsm = sendAndRecv("AT+CMGL=1", 30);  // list read msg
            // if answer contain ERROR then ERROR
            if (strGsm.indexOf("ERROR") != -1) {
                resetGsmObj();
                return strGsm; // error
            // evaluate message index
            if (strGsm.indexOf(':') <= 0) {
                resetGsmObj();
                return ("ERROR unexpected answer");
            str = strGsm.substring(strGsm.indexOf(':') + 1,strGsm.indexOf(','));
            str = str.trim(); // remove white spaces
    //        System.out.println("Index: " + str);
            lastIndexRead = str;
            // find message string
            // look for start point (search \r, then skip \n, add and one more for right char
            int startPoint = strGsm.indexOf("\r",(strGsm.indexOf(":") + 1)) + 2;
            int endPoint = strGsm.indexOf("\r",startPoint + 1);
            if (endPoint == -1) {
                // only one message
                endPoint = strGsm.length();
            // extract string
            str = strGsm.substring(startPoint, endPoint);
            System.out.println("String to be decoded :" + str);
            ComputeSmsData sms = new ComputeSmsData();
            sms.setRcvdPdu(str);
    //        SMSCNum = new String(sms.getRcvdPduSMSC());
            senderNum = new String(sms.getRcvdSenderNumber());
            smsMsg = new String(sms.getRcvdPduTxt());
            System.out.println("SMSC number:   " + sms.getRcvdPduSMSC());
            System.out.println("Sender number: " + sms.getRcvdSenderNumber());
            System.out.println("Message: " + sms.getRcvdPduTxt());
            return "OK";
        public String readSmsSender() {
            return senderNum;
        public String readSms() {
            return smsMsg;
        public String delSms() {  
            if (lastIndexRead != "") {               
                return sendAndRecv("AT+CMGD=" + lastIndexRead, 30);
            return ("ERROR");
    }When i compile, there is no error. But when i execute it, the following error comes:
    E:\java\JavaSmsApi>javac SerialToGsm.java
    E:\java\JavaSmsApi>java SerialToGsm
    Exception in thread "main" java.lang.NoSuchMethodError: main
    What might be the error? Somebody help me. Thanks in advance.

    You are probably trying to run this as a CLDC application instead of a MIDP application (aka a MIDLet). Since CLDC apps start with a main(....) your runtime looks for one but does not find it, hence the error. Please recheck the project configuration.

  • Problem in sending SMS?????????

    hi all,
    i have problem in sending sms using wma.its arises exception about "port format", whats the problem is???? anybody help me??

    firstway
    Please be clear on this. I have not accused you or anyone else of being dishonest. I have merely stated a point of fact, that sending a mail to an unknown recipient is not good policy.
    Forums are anyhow meant for open discussion, not as a gateway to private communication.
    No offence, but my daily schedule is just busy enough to make me not want to engage in Yahoo! or any other chat.
    All the best, Darryl
    ** Did you notice the starting date of this thread?

  • Using iMessage 8.0 with Mavericks to send sms message to my friend who has an iPhone.  Only allows me to log in under AIM, YAHOO, GOOGLE, or BONJOUR.  I don't want to do any of that.  Just my phone number.  Is this possible?

    Using iMessage 8.0 with Mavericks to send sms message to my friend who has an iPhone.  Only allows me to log in under AIM, YAHOO, GOOGLE, or BONJOUR.  I don't want to do any of that.  Just my phone number.  Is this possible?

    Hi,
    The first run of Messages will ask you to enter an Apple ID to "register' with iMessages.
    If you do not do this but open the App and look in Preferences > Accounts then you will see the iMessages account and the Bonjour Account which will not be activated.
    Neither of these two account can be deleted. (even if not being used)
    If you then press the + icon to add you will get the choices you posted.
    To iMessage you need to "register" and Apple ID with the iMessages service.
    As Diane then points out you can link this to your iPhone number.
    This "syncs" (Displays on all devices) the various iMessages sent to either iPhone or Apple ID
    You can then chose  on both iPhone or Mac version how or which ID/Number is going to be used to "Start the conversations from"
    I have my Mac version set to start from my Apple ID and the iPhone from it's number.
    At this moment the Mac version cannot send SMS text messages to an iPhone.
    This is apparently coming with iOS 8 and OS 10.10 (Yosemite)
    An AIM account can send SMS Messages but only to a limited number of USA based phone users on these carriers.
    (Basically you add a phone number with country code +1 as a Buddy to your List)
    Mocked up number  (It not really an auto responder although you do get sent back and Error message about it not being valid)
    8:37 pm      Sunday; July 13, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How to send SMS from process chain

    Hello,
             Kindly tell me is there any way by which i can send SMS to user about process chain results?

    Hi,
    Right click on the process chain node --> create message. give name and desc
    then click on "Maintain Recipient List" and give the entries
    Depending on the recipient, there are recipient types you have to choose like Internet address (email ID), fax no, pager no, sap logon name etc. I dont think there is a SMS option explicitly.
    Hope this helps!
    Thanks,
    Krishna

Maybe you are looking for

  • Using Both BW and R/3 Tables in the same report

    I am very new to Crystal and I have a requirement that involves data that is contained in both R/3 tables  and BW. Basically it is a series of report sections (17 total) with 14 being from R/3 tables and 3 coming from BW).  My first question is it ev

  • Still Images not working

    I've put together a DVD in Encore, and many of the timelines are made up of at least one clip, and one still image leading into that clip. Everything looks fine in Encore, and it all writes to a disc with no trouble, but when I play the DVD some of t

  • "JVM heartbeat .. dead" in trace file - how to diagnose it?

    One of our customers reported, that Java applet hosted on our website (running in Java Plug-In 1.6.0 update 23, Mozilla Firefox 3.6.13) seems to terminate in the same situation each time. This is a signed applet, which is about to estabilish a HTTPS

  • Adobe Air Aplication descriptor could not be found for this application

    Can You Please help me it s so importan i downloaded program and it required adobe air i downloaded it then it says aplication descriptor could not be found for this application

  • Mail trigger from VK11

    Dear Gurus, Iam aware that mail trigger to the concerned is not possible in std SAP when we create/update condition records in VK11/VK12. Still, my client requires that wjever a new pricing record created/amended in VK11/VK12 an automatic mail should