-2

I've huawei EC156 cdma modem, I tried to send SMS via AT commands with many commands, But always received response "command not support".

I have used the following commands:

1- AT+CMGS

2- AT + GWWC Also, I didn't find any C# Libraries dealing with cdma modems.

  • I think that you have been downvoted (not by me) because of a poor research effort: in fact there are plenty of questions asking how to send an SMS through AT commands. Talking about your specific case: what commands did you _exactly_ send (please report the full command sequence)? – Roberto Caboni Apr 14 '20 at 20:40
  • thanks for response, I tried to execute this command (AT+CMGS) in huawei EC156 cdma modem, But the response is "command not support". i need any one helpe my to fix that issue. – user3453048 Apr 14 '20 at 23:40

1 Answers1

0

You definitely need to check the AT commands user manual of your device and check their syntax.

AT+CMGS has two different modes:

  • in PDU mode its syntax is AT+CMGS=<PDU>
  • in text mode it is AT+CMGS=< dest phone number>

In both cases AT+CMGS is wrong, and operation not supported is the error you get for a wrong syntax (after setting verbose error mode with AT+CMEE=2).


There are plenty of questions showing the correct AT commands sequence required to send an SMS, for example this one.

I summarize that sequence here briefly:

Some things ti check before starting:

  1. Make sure that the SIM is inserted
  2. Make sure that the PIN code has been correctly inserted (by issuing AT+CPIN? you have to receive the READY response)
  3. Make sure that the device is correctly registered to the network (by issuing AT+CREG? you have to receive the +CREG: 0,1 response)

Then:

  1. Switch to text mode by issuing AT+CMGF=1
  2. Tell to the device the phone number you want send the SMS to, by issuing AT+CMGS=<PHONE NUMBER>. The device will output the > prompt character
  3. Write your text
  4. Close the SMS by providing the Ctrl-Z character (0x1A ASCII code)
  5. On success, the response +CMGS: <N> will be displayed, with N in the range 0-255 meaning the progressive ID of sent messages
Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39
  • I implemented checking steps . (AT+CPIN?) i received Ready. But ( AT+CREG?) received Error / command not support. – user3453048 Apr 15 '20 at 15:01
  • Is there another way te registered device to the network – user3453048 Apr 15 '20 at 15:03
  • Try also `at+cgreg?` and `at+cereg?`. Probably your module doesn't have the fallback to 2g I admittedly didn't check it) – Roberto Caboni Apr 15 '20 at 15:10
  • 1
    Thanks for your interactive, I also received error (command not support). My modem model is `Huawei EC156`. CDMA network – user3453048 Apr 15 '20 at 16:14
  • There must be a cdma specific command that I currently don't remember. Nevermind: make sure that the antenna is connected and wait 10-15 seconds. Then you will be probably able to send your sms. – Roberto Caboni Apr 15 '20 at 17:17
  • Ps: according ti all the AT guides I checked `at+creg?` should definitely be defined. – Roberto Caboni Apr 15 '20 at 17:30
  • I tried again same error. Also, I would like to inform you that I can send SMS from Huawei mobile partner. Is there a way to know how that app send OR import his libraries within my C# app. – user3453048 Apr 15 '20 at 18:44