Click here to Skip to main content
15,895,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using AT command set.
I want to send long sms but i m able to send only 160 chars msg.
How can I send long msg having more than 160 chars from gsm modem ?

C#
public bool sendSms(string cellNo, string sms)
       {
           string messages = null;
           messages = sms;

           if (this.serialPort.IsOpen == true)
           {
               try
               {
                   this.serialPort.WriteLine("AT" + (char)(13));
                   Thread.Sleep(4);
                   this.serialPort.WriteLine("AT+CMGF=1" + (char)(13));
                   Thread.Sleep(5);
                   this.serialPort.WriteLine("AT+CMGS=\"" + cellNo + "\"");
                   Thread.Sleep(10);
                   this.serialPort.WriteLine(messages + (char)(26));
               }
               catch (Exception ex)
               {
                   MessageBox.Show(ex.Source);
               }
               return true;
           }
           else
               return false;
       }
Posted
Comments
Member 11615393 8-Sep-18 5:21am    
Hi ,have you ever gotten answer from this question?

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900