SIMCOM AT Commands Set

Từ ChipFC Wiki
Phiên bản vào lúc 14:45, ngày 29 tháng 8 năm 2017 của Chipfc (Thảo luận | đóng góp) (Tạo trang mới với nội dung “Category:SIMCOM AT Commands Set {{Đang viết}} == Introduction== * SIM908 and SIM900 have the auto baudrate detect function, can support baudrate f…”)
Bước tới: chuyển hướng, tìm kiếm

Editor.png

Bài viết này đang được phát triển hoặc chỉnh sửa lớn.
Bạn có thể đóng góp để bài viết hoàn thiện hơn.
Sau khi chỉnh sửa xong thông báo này sẽ được gỡ bỏ.

Introduction

  • SIM908 and SIM900 have the auto baudrate detect function, can support baudrate from 1200-115200, so you can use any baudrate in this range, the first data send from SIM IC will be like random error data that can be ignored.

Common AT Commands

Command Description Return Result
AT+CPIN? check sim card status +CPIN:READY Sim card is found
AT+CSQ check signal quality +CSQ:30,0 30 is the quality of signal, max at 31
AT+COPS? check card service provider +COPS:0,0,"CHINAMOBILE" or empty CHINAMOBILE is the service provider
AT+CGMI Check the module maker SIMCOM_Ltd Made by simcom
AT+CGMM Check the module model type SIMCOM_SIM900A SIM900A
AT+CGSN Check the module IMEI, worldwide unique 869988012018905 869988012018905
AT+CNUM Check the number of current sim card, not all kinds of card support this function +CNUM:"","15902020353",129,7,4 phone number 15902020353
AT+ATE1 on/off AT commands return info send either ATE0 or ATE1 -

Calling and DTMF

Command Description Return Result
ATD+number don't forget the ";" after AT commands, for example "ATD+18576608994;" OK -
ATA answer the incoming phone call OK -
ATH hangoff current phone call OK -
AT+COLP show up the calling number +COLP:"10086",129,"","" -
AT+CLIP sown up the number of incomming call +CLIP:"15124532672",161,"",,"ailin",0, -
AT+VTS=* send DTMF audio. for example, when we call the service provider number and need the press number 1 for operation, you can do AT+VTS=1 - -


SMS

Command Description Return Result
AT+CNMI Set the new message remind, for example AT+CNMI=2,1, +CMTI:"SM",2 when set is on and message box is NOT full, message is stored at position 2
AT+CMGF Set the module message mode, set either at PDU(0) or text mode(1) OK -
AT+CSCS Set TE character set, set AT+CSCS="GSM" for english only message, or set AT+CSCS="UCS2" for other lanuage OK -
AT+CMGR read message, for exmple, AT+CMGR=1 to read message at position 1 - -
AT+CMGS send message, send 180 bytes at GSM mode, or 70 Chinese character at UCS2 mode, AT+CMGS="18576608994" will return ">" and then type message, then end up with hex value 1A( 0X1A, "CTRL+Z"), send 1B to cancel "ESC" and finally return: +CMGS:156, in which 156 has meaning.
AT+CMGS (e.g. Chinese SMS) set AT+CMGR=1; AT+CSMP=17,167,2,25; AT+CSCS="UCS2" now the message can be by Unicode, AT+CMGS="00310035003100320034003500330032003600370032" (number 15124532672) will return ">" and then type message 00530049004D00390030003000414E2D82F1658777ED4FE153D190016D4B8BD5, end with 1A -
AT+CMGD delete message, to delete message at postion 1: AT+CMGD=1 OK -
AT+CPMS inquiry or set message storage settings AT+CPMS? to check how many message can be stored maximally and how many message stored :+CPMS:"SM",1,50, means support 50 sms max and 1 sms are stored now
  • General read SMS steps
      AT+CMGF=1
      AT+CSCS="GSM"
      AT+CNMI=2,1 // set new message remind
      AT+CMGR=2 // read message at position 2
      AT+CMGD=2 // delete SMS at position 2
  • General send SMS steps
     AT+CSCS="GSM"
     AT+CMGF=1
     AT+CMGS="18576608994"
  • Send Chinese sms
    AT+CMGF=1
    AT+CSMP=17,167,2,25
    AT+CSCS="UCS2"
    AT+CMGS="00310035003100320034003500330032003600370032"

GSM Base Station Location