EDN Admin
Well-known member
I wrote application to send sms using AT commands as follows
SerialPort _serialPort = new SerialPort("COM40", 115200);
Thread.Sleep(1000);
_serialPort.Open();
Thread.Sleep(1000);
_serialPort.Write("AT+CMGF=1r");
Thread.Sleep(1000);
_serialPort.Write("AT+CMGS="" + toPhoneNumber + ""rn");
Thread.Sleep(1000);
_serialPort.Write("Test" + "x1A");
Thread.Sleep(1000);
//labelStatus.Text = "Status: Message sent";
_serialPort.Close();
This code works well if the phone is installed and if COM port number is available.
My problem is when dual sim phone is connected to the computer, is there any way to select the sim to send message from?
View the full article
SerialPort _serialPort = new SerialPort("COM40", 115200);
Thread.Sleep(1000);
_serialPort.Open();
Thread.Sleep(1000);
_serialPort.Write("AT+CMGF=1r");
Thread.Sleep(1000);
_serialPort.Write("AT+CMGS="" + toPhoneNumber + ""rn");
Thread.Sleep(1000);
_serialPort.Write("Test" + "x1A");
Thread.Sleep(1000);
//labelStatus.Text = "Status: Message sent";
_serialPort.Close();
This code works well if the phone is installed and if COM port number is available.
My problem is when dual sim phone is connected to the computer, is there any way to select the sim to send message from?
View the full article