Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i'm sending SMS using AT commands in Text mode, its works fine but there is a problem in characters.... i m not able to send sms more than 160 character at one sms.

Please tell me how do i send a long sms exceeding 160 characters using AT command (Dongle).

Thanks in advance.
Posted
Comments
Richard MacCutchan 20-May-15 3:36am    
Send it as multiple messages of 160 or less.
Mohamed Farhan 20-May-15 7:01am    
Hi Richard, I don't know how to send it as multipart message can you post the code please...

160 characters is the limit for a single SMS - that's what the first "S" stands for: "Short Messaging Service".

To send longer messages, you need to break them into multiple messages, all shorter than 160 characters.
 
Share this answer
 
There is already an answer[^] about the issue.
Anyway to send multipart SMS you have to use the PDU mode[^].
A sample for multipart PDU is here[^] where they show you how to add an UDH (User Data Header) to send a multipart message in PDU mode.
There are a lot of online PDU encoders just google[^].
There is an excellent article wiith code for a library[^] on codeproject.
 
Share this answer
 
v3
Comments
Mohamed Farhan 20-May-15 6:59am    
I have already tried but no success... Can you post a multipart message in PDU mode coding and explain it.. thank for reply my question....
Frankie-C 20-May-15 7:31am    
Have you read the whole serie of articles in the site whose link I attached?
This page [http://mobiletidings.com/2009/02/11/more-on-the-sms-pdu] details very well the PDU, phone number encoding, 7 bits gsm encoding etc.
Mohamed Farhan 20-May-15 9:23am    
I Red this article and got a good knowledge.... but error... where to attached the pdu
AT+CMGS=24<crlf>
> 0001000B915121551532F400000CC8F79D9C07E54F61363B04<ctrl-z>

What Does Value??? Send me example of Message using PDU code please...
Frankie-C 20-May-15 9:37am    
I updated the solution with a library link and some other usefull links.
If it's ok for you accept the answer.
Mohamed Farhan 20-May-15 10:41am    
First Link Sample PDU Not Working....

This is my text base code
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;
}


I Need this pdu please help me...

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