#ifndef _ME3000_H
|
#define _ME3000_H
|
#include <string.h>
|
#include <stdio.h>
|
//==ÆÕָͨÁî===========================================================
|
#define ATA "ATA" //Ó¦´ðÀ´µç
|
#define ATD "ATD" //ºô½Ð
|
#define ADD "+++" //´ÓÊý¾ÝģʽÇл»µ½ÃüÁîģʽ
|
#define ATO "ATO" //´ÓÃüÁîģʽÇл»µ½Êý¾Ýģʽ
|
#define AT_CRC "AT+CRC=" //RINGÌáʾÀ´µçÀàÐÍ=0 ²»ÏÔʾ =1 ÓïÒô =2 GPRS·þÎñ =3 ´«Õæ
|
#define AT_CGMR "AT+CGMR" //»ñÈ¡²úÆ·°æ±¾ºÅ
|
#define AT_ZVERS "AT+ZVERS" //²éѯÈí¼þ°æ±¾ºÅ
|
#define AT_ZPWROFF "AT+ZPWROFF" //Ä£¿é¹Ø»ú
|
#define AT_CCLK "AT+CCLK?" //²éÑ¯ÍøÂçʱ¼ä
|
#define AT_SCLK "AT+CCLK=" //ÉèÖÃÍøÂçʱ¼ä
|
#define AT_CMGD "AT+CMGD=" //ɾ³ýµ¥Ìõ¶ÌÐÅ
|
|
#define AT_CMGL "AT+CMGL=\"ALL\"" //¶ÁÈ«²¿¶ÌÐÅÁбí
|
#define AT_IPR "AT+IPR=" //ÉèÖò¨ÌØÂÊ
|
#define AT_SW "AT&W" //±£´æÉèÖÃ
|
//==ÆÕָͨÁî================================================================================
|
#define ATE0 "ATE0" //²»ÏÔʾÊäÈëÃüÁî
|
#define ATE1 "ATE1" //ÏÔʾÊäÈëÃüÁî
|
#define AT_TSIMINS "AT*TSIMINS?" //¼ì²éSIM¿¨
|
#define AT_CSQ "AT+CSQ" //²éѯÐźÅÇ¿¶È
|
#define AT_CPIN "AT+CPIN?" //·µ»ØREADY£¬É豸ÆäËû¹¦ÄܲſÉÒÔʹÓÃ
|
|
//===TCP/IP Ïà¹ØÖ¸Áî==========================================
|
#define AT_CGDCONT "AT+CGDCONT=1,\"IP\",\"" //ÉèÖÃAPN£¬¹úÄÚGPRS Ó¦ÉèÖÃΪCMNET£¬µ«WAP Á¬½ÓÉèÖÃΪCMWAP
|
#define AT_CGACT "AT+CGACT=1,1" //¼¤»îPDPÉèÖÃ
|
#define AT_CGATT "AT+CGATT=1" //ÉèÖÃGPRSÒµÎñ
|
#define AT_ZPNUM "AT+ZPNUM=\"" //ÉèÖÃAPN,Óû§Ãû,ÃÜÂë
|
|
#define AT_ZPPPOPEN "AT+ZPPPOPEN" //´ò¿ªGPRSÁ¬½Ó
|
#define AT_ZPPPCLOSE "AT+ZPPPCLOSE" //¹Ø±ÕGPRSÁ¬½Ó
|
#define AT_ZPPPSTATUS "AT+ZPPPSTATUS" //²éѯGPRSÁ¬½Ó״̬
|
#define AT_ZIPGETIP "AT+ZIPGETIP" //²éѯµ±Ç°IPµØÖ·
|
|
#define AT_ZIPSETUP "AT+ZIPSETUP=1," //½¨Á¢·þÎñÆ÷Á¬½Ó-TCP
|
#define AT_ZIPSEND "AT+ZIPSEND=1," //ÏòÄ¿±êµØÖ··¢ËÍÊý¾Ý-TCP
|
#define AT_ZIPCLOSE "AT+ZIPCLOSE=1" //¹Ø±ÕGPRSÁ¬½Ó-TCP
|
#define AT_ZIPSTATUS "AT+ZIPSTATUS=1" //²éѯTCPÁ¬½Ó״̬
|
|
#define AT_ZIPSETUPU "AT+ZIPSETUPU=1," //½¨Á¢UDP·þÎñÆ÷Á¬½Ó
|
#define AT_ZIPSENDU "AT+ZIPSENDU=1," //ÏòUDP·þÎñÆ÷·¢ËÍÊý¾Ý
|
#define AT_ZIPSTATUSU "AT+ZIPSTATUSU=1" //²éѯUDPÁ¬½Ó״̬
|
#define AT_ZIPCLOSEU "AT+ZIPCLOSEU=1" //¹Ø±ÕUDPÁ¬½Ó
|
|
//===¶ÌÐÅÏà¹ØÉèÖÃÖ¸Áî ======================
|
#define AT_CMGF "AT+CMGF=1" //ÉèÖÃSMS ΪÎı¾Ä£Ê½
|
#define AT_CNMI "AT+CNMI=3,2,0,0,0" //À´¶ÌÐźóÖ±½ÓÏÔʾ
|
#define AT_CMGS "AT+CMGS=\"" //·¢ËͶÌÐÅ
|
#define AT_CMGR "AT+CMGR=" //¶Á¶ÌÐÅ
|
//==¶ÌÐŹؼü×Ö
|
#define CMT "+CMT:" //Ìáʾ½ÓÊÕµ½¶ÌÐÅ£¬´æ´¢Î»ÖýôËæÆäºó
|
#define CMGR "+CMGR:\"REC UNREAD\"," //¶Á¶ÌÐŵĹؼü×Ö,ºóÃæ½ôËæÊÖ»úºÅ
|
#define CMGS "+CMGS:1" //·¢ËͶÌÐŻظ´±êÖ¾
|
//===========================================================================================
|
#define TX_ATE0 0X01
|
#define TX_ATE1 0X02
|
#define TX_TSIMINS 0X03
|
#define TX_CSQ 0X04
|
#define TX_CPIN 0X05
|
#define TX_CMGF 0X06
|
#define TX_CNMI 0X07
|
#define TX_CGDCONT 0X08
|
#define TX_CGACT 0X09
|
#define TX_ZPNUM 0X0a
|
#define TX_ZPPPOPEN 0X0b
|
#define TX_ZIPSETUP 0X0c
|
#define TX_ZPPPCLOSE 0X0d
|
#define TX_ZIPSEND_AT 0X0e
|
#define TX_ZIPSEND_DAT 0X0f
|
#define TX_ZPPPSTATUS 0X10
|
|
#define GSM_OPEN 0X11
|
#define GSM_DATA 0X12
|
#define CMD_DEFAULT 0X13
|
//===================================================================
|
|
//Ìí¼Ó
|
#define TX_CMEE 0X30
|
#define AT_CMEE "AT+CMEE=2"
|
|
#define TX_CREG 0X31
|
#define AT_CREG "AT+CREG?"
|
#define CREG "+CREG:"
|
//==¹Ø¼ü×Ö============================================================
|
#define OK "OK"
|
#define READY "CPIN: READY"
|
#define ZVERS "+ZVERS:"
|
#define CRING "+CRING:"
|
#define TSIMINS "*TSIMINS:"
|
#define CPIN "+CPIN:"
|
#define CMEE "+CMEE:"
|
#define CSQ "+CSQ:"
|
#define CCLK "+CCLK:"
|
#define CFUN "+CFUN: 1"
|
#define ZPPPOPEN "+ZPPPOPEN:CONNECTED"
|
#define ZPPPCLOSE "+ZPPPCLOSE:OK"
|
#define ZPPPCLOSEK "+ZPPPCLOSE:"
|
#define ZIPSETUP "+ZIPSETUP:CONNECTED"
|
#define INPUT ">"
|
#define ZIPSEND "+ZIPSEND:"
|
#define ZPPPSTATUS "+ZPPPSTATUS:"
|
#define ZIPGETIP "+ZIPGETIP:"
|
#define ZIPSTATUS "+ZIPSTATUS:"
|
|
#define ZIPSETUPU "+ZIPSETUPU:CONNECTED"
|
#define ZIPSENDU "+ZIPSENDU:"
|
#define ZIPSTATUSU "+ZIPSTATUSU:"
|
|
#define ZIPCLOSEU "ZIPCLOSEU: 1"
|
#define ZIPCLOSE "ZIPCLOSE: 1"
|
|
#define CONNECT "CONNECTED"
|
#define ESTABLISH "ESTABLISHED"
|
//==Êý¾Ý´«Ê乨¼ü×Ö
|
#define DISCONNECT "DISCONNECTED" //Á¬½ÓÖжϹؼü×Ö
|
#define ZIPRECV "+ZIPRECV:1," //Ìáʾµ±Ç°TCP½ÓÊÕµ½Êý¾Ý
|
#define ZIPRECVU "+ZIPRECVU:1," //Ìáʾµ±Ç°UDP½ÓÊÕµ½Êý¾Ý
|
|
#endif
|