本文主要是介绍GSM模块调试笔录,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
简单验证几款无线产品tcp链接与服务器通信收发数据:都是串口调试,采用AT命令,文档已上传,在此记录下调试所用的命令顺序,调试结果:带+号的语句是收到的回应,AT+xxx是发出的命令 调试TCP连接正常收发数据正常。
用tcp连接服务器,要想得到服务器的回应需要特殊配置(不会)。
选用产品
集顺的ME3616
只需要连接串口,一次发出以下命令:
AT+ESOC=1,1,1 //创建TCP套接字
AT+ESOCON=0,8885,"219.144.130.27" //设置tcp链接的服务器地址以及端口
AT+ESOSEND=0,8,3131313131313131 //发送数据,只能发送十六进制ASCII格式数据
AT+ESOCL=0 //关闭socket链接
调试结果:
移柯L206
依然是串口通信,稍微复杂一点,一次执行:
AT+CGMR;+ISLKVRSCAN;+CGMI;+CSQ; AT+CPIN? AT+COPS? AT+CREG? AT+CGREG? AT+CSTT="CMNET" AT+CIICR AT+CIFSR AT+CIFSR AT+CIPRXGET=1 AT+CIPSTART="TCP","echo.u-blox.com",7 AT+CIPRXGET=2,36 AT+CIPSEND=36 123345555555555555555555432543254423 AT+CIPRXGET=2,1024 AT+CIPRXGET=2,1024 AT+CIPCLOSE AT+CIPACK AT+CIPSHUT AT+CPOWD=0
调试结果:
[16:45:00.327] rx:
[16:45:00.328] rx: RDY
[16:45:00.933] rx:
[16:45:00.933] rx: +CFUN: 1
[16:45:00.933] rx:
[16:45:00.933] rx: +EUSIM: 1
[16:45:01.588] rx:
[16:45:01.588] rx: +CPIN: READY
[16:45:02.314] rx:
[16:45:02.314] rx: Call Ready
[16:45:03.863] rx:
[16:45:03.863] rx: SMS Ready
[16:45:07.562] tx: AT
[16:45:07.578] rx: AT
[16:45:07.578] rx:
[16:45:07.578] rx: OK
[16:45:09.817] tx: AT+CGMR;+ISLKVRSCAN;+CGMI;+CSQ;
[16:45:09.868] rx: AT+CGMR;+ISLKVRSCAN;+CGMI;+CSQ;
[16:45:09.868] rx:
[16:45:09.868] rx: +CGMR: L206v01.01b13,2017/03/10 18:41
[16:45:09.868] rx:
[16:45:09.868] rx: OK
[16:45:09.868] rx:
[16:45:09.868] rx: +ISLKVRSCAN: L206v01.01b13.00
[16:45:09.868] rx:
[16:45:09.868] rx: LYNQ
[16:45:09.868] rx:
[16:45:09.868] rx: +CSQ: 30, 0
[16:45:09.868] rx:
[16:45:09.868] rx: OK
[16:45:11.775] tx: AT+CPIN?
[16:45:11.792] rx: AT+CPIN?
[16:45:11.792] rx:
[16:45:11.792] rx: +CPIN: READY
[16:45:11.792] rx:
[16:45:11.792] rx: OK
[16:45:12.917] tx: AT+COPS?
[16:45:12.931] rx: AT+COPS?
[16:45:12.931] rx:
[16:45:12.931] rx: +COPS: 0,0,"CHINA MOBILE"
[16:45:12.931] rx:
[16:45:12.931] rx: OK
[16:45:13.907] tx: AT+CREG?
[16:45:13.925] rx: AT+CREG?
[16:45:13.925] rx:
[16:45:13.925] rx: +CREG: 0,1
[16:45:13.925] rx:
[16:45:13.925] rx: OK
[16:45:15.232] tx: AT+CGREG?
[16:45:15.247] rx: AT+CGREG?
[16:45:15.247] rx:
[16:45:15.247] rx: +CGREG: 0,1
[16:45:15.247] rx:
[16:45:15.247] rx: OK
[16:45:18.304] tx: AT+CSTT="CMNET"
[16:45:18.322] rx: AT+CSTT="CMNET"
[16:45:18.322] rx:
[16:45:18.322] rx: OK
[16:45:41.671] tx: AT+CIICR
[16:45:41.691] rx: AT+CIICR
[16:45:42.372] rx:
[16:45:42.372] rx: 10.114.213.234
[16:45:42.372] rx:
[16:45:42.372] rx: OK
[16:45:46.554] tx: AT+CIFSR
[16:45:46.565] rx: AT+CIFSR
[16:45:46.565] rx:
[16:45:46.579] rx: 10.114.213.234
[16:45:46.579] rx:
[16:45:46.579] rx: OK
[16:45:54.638] tx: AT+CIPRXGET=1
[16:45:54.647] rx: AT+CIPRXGET=1
[16:45:54.647] rx:
[16:45:54.647] rx: OK
[16:45:57.545] tx: AT+CIPSTART="TCP","echo.u-blox.com",7
[16:45:57.573] rx: AT+CIPSTART="TCP","echo.u-blox.com",7
[16:46:00.256] rx:
[16:46:00.256] rx: OK
[16:46:00.256] rx:
[16:46:00.256] rx: CONNECT OK
[16:46:00.836] rx:
[16:46:00.836] rx: +RECEIVE,0,32:
[16:46:04.953] tx: AT+CIPRXGET=2,36
[16:46:04.967] rx: AT+CIPRXGET=2,36
[16:46:04.982] rx:
[16:46:04.982] rx: +CIPRXGET: 0,32,0
[16:46:04.982] rx: u-blox AG TCP/UDP test service
[16:46:04.982] rx:
[16:46:04.982] rx:
[16:46:04.982] rx: OK
[16:46:08.358] tx: AT+CIPSEND=36
[16:46:08.372] rx: AT+CIPSEND=36
[16:46:08.372] rx:
[16:46:08.372] rx: >
[16:46:14.830] tx: 123345555555555555555555432543254423
[16:46:14.850] rx:
[16:46:14.850] rx: SEND OK
[16:46:16.979] rx:
[16:46:16.979] rx: +RECEIVE,0,36:
[16:46:24.025] tx: AT+CIPRXGET=2,1024
[16:46:24.046] rx: AT+CIPRXGET=2,1024
[16:46:24.046] rx:
[16:46:24.046] rx: +CIPRXGET: 0,36,0
[16:46:24.046] rx: 123345555555555555555555432543254423
[16:46:24.046] rx:
[16:46:24.046] rx: OK
[16:46:40.807] tx: AT+CIPRXGET=2,1024
[16:46:40.832] rx: AT+CIPRXGET=2,1024
[16:46:40.832] rx:
[16:46:40.832] rx: ERROR
[16:46:47.822] tx: AT+CIPCLOSE
[16:46:47.834] rx: AT+CIPCLOSE
[16:46:47.834] rx:
[16:46:47.834] rx: CLO
[16:46:47.847] rx: SE OK
[16:46:50.884] tx: AT+CIPACK
[16:46:50.909] rx: AT+CIPACK
[16:46:50.909] rx:
[16:46:50.909] rx: +CIPACK: 36,36,0
[16:46:50.909] rx:
[16:46:50.909] rx: OK
[16:46:51.967] tx: AT+CIPSHUT
[16:46:51.979] rx: AT+CIPSHUT
[16:46:53.125] rx:
[16:46:53.125] rx: SHUT OK
[16:46:59.408] tx: AT+CPOWD=0
[16:46:59.429] rx: AT+CPOWD=0
[16:46:59.429] rx:
[16:46:59.429] rx: OK
[16:47:01.314] rx:
LBS定位:
AT+CPIN? AT+CREG? AT+CGATT? AT+CGATT=1 AT+CSTT="uninet" AT+CIICR AT+CIFSR AT+GTPOS
这篇关于GSM模块调试笔录的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!