Sending SMS AT commands to 3G modem using PHP

前端 未结 2 1080
再見小時候
再見小時候 2021-02-10 15:48

I\'m having trouble sending commands to a 3G modem connected on COM5. The modem is accepting the connection and receiving the commands. But there is something wrong (I think it

相关标签:
2条回答
  • 2021-02-10 16:20

    You need to append a \r to the end of each command rather than an "OK". The "OK" is the response you expect to be returned by the phone. Use a terminal program

    1 second delay
    +++
    1 second delay
    The modem should respond with "OK"
    Type AT+CMGF=1
    press enter key
    Modem will repond with "OK"
    

    Etc... It is possible your phone does not support SMS text mode only pdu mode

    Type at+CMGF=?

    Type enter key, if the response is at+CMGF (0,1) it supports both if (0) then pdu only. You will have to enter the SMS message in pdu mode.
    There are plenty of examples on how to do this.

    0 讨论(0)
  • 2021-02-10 16:28

    You need to append a \r to the end of each command rather than an "OK". The "OK" is the response you expect to be returned by the phone. Use a terminal program

    1 second delay +++ 1 second delay The modem should respond with "OK" Type AT+CMGF=1 press enter key Modem will repond with "OK"

    Etc... It is possible your phone does not support SMS text mode only pdu mode

    Type at+CMGF=?

    Type enter key, if the response is at+CMGF (0,1) it supports both if (0) then pdu only. You will have to enter the SMS message in pdu mode. There are plenty of examples on how to do this.

    CAN U GIVE ME THE CODE

    0 讨论(0)
提交回复
热议问题