我正在使用 Telit 的 GL865-DUAL GPRS 模块。 我正在尝试使用我的位置变量设置对网站的 HTTP POST 请求。 我能够与提供商建立一个有效的 GPRS 连接(获得 ip 地址)但是在命令后它出错了, 这是我的命令集:
"AT" //response: OK //build in delay of 5 seconds
Delay after each AT command set to 400miliseconds
"AT+CGMR //response: 16.00.152 OK
"AT#QSS?" //response: #QSS:0,1 OK
"AT#QSS=?" // response #QSS: (0-2) OK
"AT+CMEE=1" //response: OK
"AT+CMEE?" // response: +CMEE: 1
"AT+CPIN?" // response: +CPIN: READY OK
"AT+COPS?" // response: +COPS: 0,0,"PROXIMUS" OK
"AT+CSQ" // response: +CSQ: 20
"AT+cgatt=1" // response: OK
"AT+CGDCONT=1, \"IP\",\"internet.proximus.be\"" // response: OK // double quotes in c are expressed as \"
"AT+CGDCONT?" // response: +CGDCONT: 1,"IP","internet.proximus.be","",0,0 OK
"AT#SGACT?" // response: #SGACT: 1,0 OK
"AT#SCFG=?" //#SCFG: (1-6,(0-5),(0-1500),(0-65535),(10-1200),(0-255) OK
"AT#SCFG=1,1,300,90,600,50" // response: OK
"AT#SGACT?" //response: #SGACT: 1,0
"AT#SGACT = 1,1" //response: #SGACT: 178,144.233.116 OK
"AT#HTTPCFG=1,\"https://www.google.be/\",80,0,,,0,120,1" // response: OK
"AT#HTTPSND=1,0,\"search?q=yo\",4,\"1:charset=ISO-8859-1\"test" // response: CME Error 4
我做错了什么,是否可以举一个有效的例子? 注意:SIM 卡不需要 Pin,我的情况不需要 APN 用户和密码。
以下文档可能会有所帮助:
http://www.gaw.ru/pdf/DIA_Telecom/80000ST10028_Easy%20GPRS%20User%20Guide_r1.pdf
http://www4.telit.com/module/infopool/download.php?id=542
非常感谢!
最佳答案
尝试删除 https://和结尾的/。 #HTTPCFG 要求主机名或 IP 地址,而不是 url。
关于post - GPRS 模块 AT 命令 HTTP Post 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24168373/