-2

I tried to send sms using below command.

SmsCom.ExecCommand("AT+CMGS=42<CR>07915892000000F001000B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E" + char.ConvertFromUtf32(26), 300, "Messagenot sent " + Portname + ".");

Is show this response with Error. Please kindly help me. Thanks

Saw Al Gor
  • 91
  • 7

1 Answers1

0

Without knowing this SmsCom library, I can guarantee that you cannot use ExecCommand (if it is implemented properly) to execute the AT+CMGS command. All other AT commands, but not that one. The reason is that you MUST wait for the "\r\n> " response before you send the payload. Anything else is a huge mistake that never will work reliable (if at all).

Start reading the first part of this answer and then read chapter 4.3 Send Message +CMGS in the 3GPP specification 27.005 to learn how to handle the AT+CMGS command properly. It is not the simplest AT command, but it is by all means doable with some care to its special required handling.

Community
  • 1
  • 1
hlovdal
  • 26,565
  • 10
  • 94
  • 165