Click here to Skip to main content
15,867,833 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
below is my code...but the code can only send below than 160 character...how i can send sms more than 160 characters and the receiver receive as one message only??plss help me..

C#
if (port.IsOpen)
   {
    port.WriteLine("AT+CMGF=1\r");
    Thread.Sleep(25);
    string str = "AT+CMGS=\"" + txtphno.Text.Trim() + "\"<cr>\r";
    port.WriteLine(str);
    Thread.Sleep(25);
    port.WriteLine(txtMess.Text);
    Thread.Sleep(25);
   }
Posted
Updated 17-Sep-12 23:39pm
v3
Comments
DaveAuld 18-Sep-12 5:39am    
SMS specification is 160 characters. What you need to look at is multi-part messages.
pratyush2008 18-Sep-12 6:40am    
I wanna send my whole long sms in a single sms.
fjdiewornncalwe 18-Sep-12 14:22pm    
As Dave said, "SMS SPECIFICATION is 160 characaters." You can't just break a specification rule because you feel like it. What would be the purpose to the rule.
pratyush2008 19-Sep-12 0:53am    
my purpose is i want to sent a sms having more than 160 chars.
Let for example i wanna send a sms having 200 chars.so my requarement is when a user shall get the sms in his mobile he wud get whole 200chars sms in a single sms format.Not like 160 char are in 1 sms and rest 40 chars in a other sms.
DaveAuld 19-Sep-12 4:13am    
Again, you need multi-part messages. See my solution for link to more details.

no it's SMS -Short message service
there is limitation so, you can not do that
split long sms in two or more sms and then send it
Happy Coding!
:)
 
Share this answer
 
As I said in my comment you need to look at multi-part messages to achieve what you want.

A little bit of googling by yourself would help you find the information is readily available.

Why don't you start by reading Concatenated SMS[^] on wiki.

From this you should be available to find plenty of examples on the net, just by tailoring your keyword search on the big G.
 
Share this answer
 
v2

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