Codesys and SMS in RPi

damian177
2023-09-28
2023-09-29
  • damian177 - 2023-09-28

    Hi,
    I try use IIoT library to send and receive SMS by Raspbery PI and Codesys.

    I installed IIoT package and added the SMS library,

    But something is wrong, when I init communication it doesn't work,
    When I sniffer my communication (AT commands) beetwen RS232 RaspberryPi and my GSM modem I have only below commands:

    AT+CMEE=1
    OK
    AT+CPIN?
    +CPIN: READY
    

    Anyone have idea what can be wrong ?

     
  • damian177 - 2023-09-29

    I tried initialize my GSM modem by write simple application in C, and GSM modem works, below used AT commands:

    AtChat: T : "AT"
    AtChat: F : "OK"
    AtChat: T : "AT+CMEE=1"
    AtChat: F : "OK"
    AtChat: T : "AT+CMGF=0"
    AtChat: F : "OK"
    AtChat: T : "AT+CGMI"
    AtChat: F : "WH_Ltd"
    AtChat: F : "WH_GM35"
    AtChat: F : "Revision: RDA BV5"
    AtChat: F : "OK"
    AtChat: T : "AT+CGMM"
    AtChat: F : "WH_GM35"
    AtChat: F : "OK"
    AtChat: T : "AT+CGMR"
    AtChat: F : "Revision: GM35-D_B5_R05_A01_D170914"
    AtChat: F : "OK"
    AtChat: T : "AT+CGSN"
    AtChat: F : "868221045990218"
    AtChat: F : "OK"
    AtChat: T : "AT+CNMI=2,1,0,1,0"
    AtChat: F : "OK"
    AtChat: T : "AT+CLIP=1"
    AtChat: F : "OK"
    AtChat: T : "AT+COPS?"
    AtChat: F : "+COPS: 0,2,\"26002\""
    AtChat: F : "OK"
    operator name: "26002"
    AtChat: T : "AT+CREG?"
    AtChat: F : "+CREG: 1,1"
    AtChat: F : "OK"
    at+creg
    Modem is initialized
    

    I do not understand why Codesys SMS library send AT+CPIN? command ?

     

    Last edit: damian177 2023-09-29

Log in to post a comment.