gpt4 book ai didi

http - 无法使用 sim808 模块从服务器获取数据

转载 作者:可可西里 更新时间:2023-11-01 17:23:01 25 4
gpt4 key购买 nike

我正在使用 FONA808 模块(利用 sim808 芯片)从网站检索数据。但是,我无法这样做。我检查了以下内容:

- GPRS connectivity : OK (AT+CGATT? returns ok)
- Properly configured APN (AT+CSTT="web2")
- Properly brings up wireless connection (AT+CIICR)
- Gets proper IP address (AT+CIFSR)

我使用以下命令序列进行 HTTP GET:

AT+HTTPINIT => OK
AT+HTTPSSL=1 => For SSL https access
AT+HTTPPARA="CID",1 =>OK
AT+HTTPPARA="URL","http://www.qbwireless.technology" ==>OK

问题来了

AT+HTTPACTION=0 (GET command)
returns
+HTTPACTION: 0,601,0 (meaning NETWORK problem).

我在 sim 上有数据可用,可以使用手机访问数据。

谁能帮我找出问题所在?谢谢

Here is the data log I have on the serial terminal:
at+csq
+CSQ: 9,0

OK
at+csq
+CSQ: 9,0

OK
at+cgatt?
+CGATT: 1

OK
at+cstt="web2"
OK
at+ciicr
OK
at+cifsr
100.115.48.8
at+cipstart="TCP","www.google.com","80"
OK

STATE: IP STATUS

CONNECT FAIL
at+cipstart="TCP","http://www.qbwireless.technology","80"
OK

STATE: IP STATUS

CONNECT FAIL
at+cmee=1
ERROR
at+cmee=1
ERROR
at+cmee=1
OK
at+
+CME ERROR: 100
at+cipstart="TCP","http://www.qbwireless.technology","80"
OK

STATE: IP STATUS

CONNECT FAIL
at+cipstart="TCP","116.228.221.51","80"
OK
at
OK
at+cgatt?
+CGATT: 1

OK
at+cifsr
100.115.48.8
at+cipclose
+CME ERROR: 100
at+cipclose
+CME ERROR: 100
at+cipclose
CLOSE OK
at+httpinit
OK
at+httpssl=1
OK
at+httpssl?
+HTTPSSL: 1

OK
at+httppara="CID",1
OK
at+httppara?
+HTTPPARA:
CID: 1
URL:
UA: SIMCOM_MODULE
PROIP: 0.0.0.0
PROPORT: 0
REDIR: 0
BREAK: 0
BREAKEND: 0
TIMEOUT: 120
CONTENT:
USERDATA:

OK
at+httppara="URL","http://www.qbwireless.technology"
+CME ERROR: 100
at+httppara="URL","http://www.qbwireless.technology"
OK
at+httppara?
+HTTPPARA:
CID: 1
URL: http://www.qbwireless.technology
UA: SIMCOM_MODULE
PROIP: 0.0.0.0
PROPORT: 0
REDIR: 0
BREAK: 0
BREAKEND: 0
TIMEOUT: 120
CONTENT:
USERDATA:

OK
at+httpaction=0
OK

+HTTPACTION: 0,601,0

最佳答案

我的问题已经解决了。实际上是以下命令:

- GPRS connectivity : OK (AT+CGATT? returns ok)
- Properly configured APN (AT+CSTT="web2")
- Properly brings up wireless connection (AT+CIICR)
- Gets proper IP address (AT+CIFSR)

用于为 TCP 连接而非 HTTP 设置 GPRS。

对于 HTTP,我使用了以下一组命令:

at+sapbr=3,1,"Contype","GPRS"
ERROR
at+cmee=1
OK
ata
+CME ERROR: 3
at+sapbr=3,1,"Contype","gprs"
OK
at+sapbr=3,1,"apn","web2"
OK
at+sapbr=1,1
+CME ERROR: 3
at+sapbr=1,1
OK
at+sapbr=2,1
+CME ERROR: 3
at+sapbr=2,1
+SAPBR: 1,1,"100.112.246.250"

OK
at+httpinit
+CME ERROR: 100
at+httpinit
OK
at+httppara="cid",1
OK
at+httpssl=1
OK
at+httppara="URL","www.sim.com"
OK
at+httppara?
+CME ERROR: 100
at+httppara?
+HTTPPARA:
CID: 1
URL: www.sim.com
UA: SIMCOM_MODULE
PROIP: 0.0.0.0
PROPORT: 0
REDIR: 0
BREAK: 0
BREAKEND: 0
TIMEOUT: 120
CONTENT:
USERDATA:

OK
at+httpaction=0
OK

+HTTPACTION: 0,603,0
at+httppara="URL","www.google.com"
+CME ERROR: 100
at+httppara="URL","www.google.com"
OK
at+httppara?
+HTTPPARA:
CID: 1
URL: www.google.com
UA: SIMCOM_MODULE
PROIP: 0.0.0.0
PROPORT: 0
REDIR: 0
BREAK: 0
BREAKEND: 0
TIMEOUT: 120
CONTENT:
USERDATA:

OK
at+httpaction=0
OK
at
OK
at+httpaction=0
OK

+HTTPACTION: 0,604,0
at+httpaction=0
OK

+HTTPACTION: 0,604,0

+HTTPACTION: 0,200,13245
at+httpread
+CME ERROR: 100
at+httpread
+HTTPREAD: 13245

它对我来说效果很好。祝你好运。

关于http - 无法使用 sim808 模块从服务器获取数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51266326/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com