Sending SMS while keeping an active socket

4 thoughts on “Sending SMS while keeping an active socket

  1. Dear Sir,

    How can i send SMS while keeping an active socket 

    Module – GL868-DUAL

    F/W – 10.01.181

    CPU – Module built in processor using Python.

    i used below code but it is responding error. 

    def test(SMSnumber):
    print ‘sending SMS’
    print SMSnumber
    Wait(1)
    a = ‘AT+CMGS=’+ SMSnumber + ‘r’
    print a
    a = MDM2.send(a,3)
    res = MDM2.receive(30)
    print res
    Wait(1)
    a = MDM2.send(‘test SMS’,3)

    a = MDM2.sendbyte(0x1A,3)
    res=MDM2.receive(30)
    print res

    # res = MDM_waitfor(‘OK’,20)
    print ‘SMS sent wait for 60 second’
    res=MDM2.receive(2)
    print res

    ##################################################

    sending SMS
    +919911051987
    AT+CMGS=+919911051987

    >

    ERROR

    SMS sent wait for 60 second

    ###############################################

    Thanks,

    Diwakar

    1. Where is the socket open, in MDM, online or command mode? Try to suspend it with +++ then send the SMS.

  2. Dear Sir,

    1. If we are suspending socket using “+++” and restoring socket using “AT#SO=1” Then “+++” and “AT#SO=1” string is reflecting at server end. This is not expectable by our client.

                Please let me know, how to avoid unwanted (“+++”, “AT#SO=1”)data at server end.

          2. If we are sending SMS using MDM2 during online mode, then module is responding “ERROR”.

    Please let me know, what is the posibility to send SMS while keeping an active socket.

    Thanks,

    Diwakar

    1. See AT#SKIPESC; online control can be gained with DTR see AT&D; there is also the command mode as an alternative to the online mode.

      Set AT+CMEE=2 to get more informative errors.