这几天一直在调试无线Modem程序,把其中的关键部分记录下来做个备忘。
GPRS拨号过程
1.
To GPRS : +++ //确定GPRS模块在命令模式下
From GPRS: OK //
2.
To GPRS : ATH/r //挂机
From GPRS: OK
3. To GPRS : AT+IPR=57600/r //设置波特率
From GPRS: OK
4. To GPRS : ATZ/r //
Set all current parameters to user defined profile
From GPRS: OK
5. To GPRS : AT^SSYNC=1/r // The ^SSYNC command serves to configure the SYNC pin of the MC39i application interface.
From GPRS: OK
6. To GPRS : AT+CGDCONT=1, “IP“, “CMNET”/r //设置APN
From GPRS: OK
7. To GPRS :atdt*99***1#/r //拨号
From GPRS: OK
8. void PPP_Parse(void)中协商
GSM拨号过程
1. AT+CGMI/r //获取手机品牌
2. AT+CGMM/r ////获取手机型号
3. AT+CSCA?/r //获取手机短信中心号
4. 发送AT+CMGS={0}/r //{0}
表示长度
5. 发送PDU数据 //