Click here to Skip to main content
15,881,424 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Members,

I am new in vb.net solution and I have a project which send a sms using smartbro plug in. It can send single and multiple message but it's only limited to 160 characters. Can anyone help me to check my code for me to send beyond 160 characters.

I read some forums to send SMS in PDU mode but it's very difficult to understand. Kindly see below code for your reference and comment. Hope someone who can help me.

What I have tried:

With SerialPort1
.WriteLine("AT" & vbCrLf)
Threading.Thread.Sleep(300)
.WriteLine("AT+CREG=1" & vbCrLf)
Threading.Thread.Sleep(300)
.Write("AT+CGREG=1" & vbCrLf)
Threading.Thread.Sleep(300)
.WriteLine("AT+CMGF=1" & vbCrLf)
Threading.Thread.Sleep(300)
.WriteLine("AT+CSMP=17,167,2,0" & vbCrLf)
Threading.Thread.Sleep(300)
.WriteLine("AT+CSCS=""GSM""" & vbCrLf)
Threading.Thread.Sleep(300)
.WriteLine("AT+CMGS=" & Chr(34) & txtNumber.Text & Chr(34) & vbCrLf)
Threading.Thread.Sleep(300)
.WriteLine(RichTextBox1.Text & Chr(26))
Threading.Thread.Sleep(300)
MsgBox(rcvdata.ToString)
End With
If rcvdata.ToString.Contains(">") Then
MessageBox.Show("Messsage is successfully sent!", "Sending SMS Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
cmdSend.Enabled = False
txtNumber.Clear()
RichTextBox1.Clear()
txtNumber.Enabled = True
Posted
Updated 18-Oct-21 3:21am
Comments
Peter_in_2780 7-Dec-20 19:48pm    
SMS stands for *SHORT* Message Service. An SMS message is limited to 160 characters (if entirely alphanumeric).
Member 15014775 7-Dec-20 23:04pm    
Hi Sir Peter, thank you for your comment. Just to add, I downloaded a trial version of sms sender then I used the smart bro plugin and it can send more than 160 characters by setting the modem to PDU mode but I don't know how to do it. I read many articles and read forum about SMS sender but hardly understand. Hope somebody can help me.

Thanks in advance.
kgmmurugesh 8-Dec-20 7:17am    
This is true.
Richard Deeming 8-Dec-20 5:20am    
How about reading the documentation that came with your modem, or contacting the manufacturer's support team?

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