0

I use GSM modem seimen to send SMS. I use library Gsmcomm to connect to modem Modem plug into PC by USB Serial Port

My problem is i can open port with no error:

GsmCommMain comm = new GsmCommMain("COM20", 19200, 300); 
comm.Open();

but after that i call send message it though error "no phone connected"

pdu = new SmsSubmitPdu("test", "0965432341", "");
comm.SendMessage(pdu);

I was checked in computer device management,it exits COM20 I download this source and running too but with no luck https://www.codeproject.com/Articles/20420/How-To-Send-and-Receive-SMS-using-GSM-Modem-2

Anybody who faced this problem, help me fix this.

thanks

QViet
  • 297
  • 5
  • 25
  • See answer two : the third parameter should be service center number : https://stackoverflow.com/questions/28910230/smssubmitpdu-gsmcomm-command-is-not-supported-by-the-device-wavecom-modem – jdweng Apr 04 '19 at 17:19
  • Thanks @jdweng but my situation is when i call any function of comm object, it return "No phone connected", can we fix this ? – QViet Apr 05 '19 at 05:46
  • Then the baud rate or Com port number is wrong. Check settings in modem that it is correct. I think it should be 19200, no parity, 8 bit, no controls. also check device manager to see if modem is connected to port 20. – jdweng Apr 05 '19 at 08:52
  • thanks you, i trying to find the right baudrate of my modem – QViet Apr 07 '19 at 00:20
  • Find the oscillator on the board. The Frequency should be stamped on top. – jdweng Apr 07 '19 at 11:02

0 Answers0