Click here to Skip to main content
15,906,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want send and receive sms using gsm modem with AT commands.I used as sample https://www.codeproject.com/Articles/38705/Send-and-Read-SMS-through-a-GSM-Modem-using-AT-Com
but this program send message <<content not supported>> and sometimes not send message.

What I have tried:

port.PortName = "COM6";
port.ReadTimeout = 2000;
port.Open();
port.Write("AT" + "\r");
port.Write("AT+CMGF=1" + "\r");
Thread.Sleep(1500);
// port.Write("AT+CSCS=\"PCCP437\"" + "\r");
//Thread.Sleep(100);
port.Write("AT+CMGS=\"" + txtSIM.Text.Trim() + "\"" + "\r\n");
Thread.Sleep(1500);
port.Write(txtMessage.Text.Trim() + "\x1A");
MessageBox.Show("Message successfully");
Posted
Updated 25-Jan-19 22:58pm

1 solution

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