Closed Ecancan closed 4 years ago
Could you uncomment the '#define DUMP_AT_COMMANDS' and post that log? You'll also need to install StreamDebugger if you don't have it.
Is there any way you can use a hardware serial port? They're usually much better than software serial. AltSoftSerial is another better option.
Wait... Initializing modem... AT
OK AT+CLTS=1
OK AT&W
OK AT+CFUN=0
+CPIN: READY
+CPIN: NOT READY
OK AT+CFUN=1,1
Call Ready
⸮⸮⸮⸮⸮R OK [7770] ### TinyGSM Version: 0.9.17 AT ⸮[7975] ### Unhandled: ⸮ AT
OK AT&FZ
OK ATE0 ATE0
OK AT+GMM
SIMCOM_SIM800L
OK [8177] ### Modem: SIMCOM SIM800L [8178] ### Modem: SIMCOM SIM800L AT+CPIN?
ERROR AT+CPIN?
RDY
+CFUN: 1
ERROR AT+CPIN?
ERROR AT+CPIN?
ERROR AT+CPIN?
+CPIN: READY
+CPIN: READY
OK ATI
SIM800 R14.18
OK Modem Info: SIM800 R14.18 AT+CPIN?
+CPIN: READY
OK [13377] ### Unhandled: AT+CPIN?
+CPIN: READY
OK [15388] ### Unhandled: AT+CPIN?
+CPIN: READY
OK [17399] ### Unhandled: AT+CPIN?
+CPIN: READY
OK [19410] ### Unhandled: AT+CPIN?
+CPIN: READY
OK [21421] ### Unhandled: Waiting for network...AT+CREG?
+CREG: 0,1
OK success AT+CREG?
+CREG: 0,1
OK Network connected Connecting to internetAT+CIPSHUT
SHUT OK AT+CGATT=0
OK AT+SAPBR=3,1,"Contype","GPRS"
OK AT+SAPBR=3,1,"APN","internet"
OK AT+SAPBR=3,1,"USER","wap"
OK AT+SAPBR=3,1,"PWD","500"
OK AT+CGDCONT=1,"IP","internet"
OK AT+CGACT=1,1
OK AT+SAPBR=1,1
OK AT+SAPBR=2,1
+SAPBR: 1,1,"10.207.190.147"
OK AT+CGATT=1
OK AT+CIPMUX=1
OK AT+CIPQSEND=1
OK AT+CIPRXGET=1
OK AT+CSTT="internet","wap","500"
OK AT+CIICR
OK AT+CIFSR;E0
10.207.190.147
OK AT+CDNSCFG="8.8.8.8","8.8.4.4"
OK success AT+CGATT?
+CGATT: 1
OK AT+CIFSR;E0
10.207.190.147
OK GPRS connected Performing HTTP GET request... AT+CIPCLOSE=1,1
ERROR AT+CIPSSL=0
OK AT+CIPSTART=1,"TCP","termobil.ecancan.com",80
OK
1, CONNECT OK AT+CIPSEND=1,3
GET DATA ACCEPT:1,3 AT+CIPSEND=1,1
DATA ACCEPT:1,1 AT+CIPSEND=1,8
/reports DATA ACCEPT:1,8 AT+CIPSEND=1,9
HTTP/1.1 DATA ACCEPT:1,9 AT+CIPSEND=1,2
DATA ACCEPT:1,2 AT+CIPSEND=1,6
Host:
DATA ACCEPT:1,6 AT+CIPSEND=1,20termobil.ecancan.com DATA ACCEPT:1,20 AT+CIPSEND=1,2
DATA ACCEPT:1,2 AT+CIPSEND=1,10
User-Agent DATA ACCEPT:1,10 AT+CIPSEND=1,2
:
DATA ACCEPT:1,2 AT+CIPSEND=1,13Arduino/2.2.0 DATA ACCEPT:1,13 AT+CIPSEND=1,2
DATA ACCEPT:1,2 AT+CIPSEND=1,10
Connection DATA ACCEPT:1,10 AT+CIPSEND=1,2
:
DATA ACCEPT:1,2 AT+CIPSEND=1,5close DATA ACCEPT:1,5 AT+CIPSEND=1,2
DATA ACCEPT:1,2 AT+CIPSEND=1,2
DATA ACCEPT:1,2 AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [29797] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","CONNECTED"
OK AT+CIPRXGET=4,1
+CIPRXGET: 1,1
+CIPRXGET: 4,1,338
OK [30960] ### Available: 1 on 1 AT+CIPRXGET=2,1,1
+CIPRXGET: 2,1,1,337 H OK [31982] ### Unhandled: AT+CIPRXGET=4,1
+CIPRXGET: 4,1,337
OK [32037] ### Available: 337 on 1 AT+CIPRXGET=2,1,337
+CIPRXGET: 2,1,337,0 TTP/1.1 200 OK Connection: close X-Powered-By: PHP/7.2.22 Set-Cookie: PSSDc1c6a83f0eb;a= xr:h o11820G aeor:otench sradePaanch nnTettlnhs=F8Cttet t n2S 1145GT e K[33061] ### Unhandled: AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [33115] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","REMOTE CLOSING"
OK AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [34283] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","REMOTE CLOSING"
OK AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [35465] ### Available: 0 on 1 AT+CIPSTATUS=1
Call Ready
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","REMOTE CLOSING"
OK AT+CIPRXGET=4,1
1, C⸮5⸮ +CIPRXGET: 4,1,0
OK [36635] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","CLOSED"
OK AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [37793] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","CLOSED"
OK AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [38950] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","CLOSED"
OK AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [40109] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","CLOSED"
OK AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [41266] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","CLOSED"
OK AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [42423] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","CLOSED"
OK AT+CIPRXGET=4,1
+CIPRXGET: 4,1,0
OK [43580] ### Available: 0 on 1 AT+CIPSTATUS=1
+CIPSTATUS: 1,0,"TCP","109.232.216.139","80","CLOSED"
OK
I'm using arduino nano. So I am using software serial.
I also encounter the following problem when I submit a request like this.
// Server details
const char server[] = "termobil.ecancan.com";
const char resource[] = "/reports/?securekey=xxxxxxxx&temp=40&hum=55.34&systemtime=0:0:0:2:36:18&device_token=xxxxxxxxxx&userkey=xxxxxx";
const int port = 80;
Result
Wait... Initializing modem... AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK AT
OK ATI
SIM800 R14.18
OK [14027] ### Unhandled: Modem Info: AT+CPIN?
+CPIN: READY
OK [15039] ### Unhandled: AT+CPIN?
+CPIN: READY
OK [17050] ### Unhandled: AT+CPIN?
+CPIN: READY
OK [19061] ### Unhandled: AT+CPIN?
+CPIN: READY
OK [21072] ### Unhandled: AT+CPIN?
+CPIN: READY
OK [23083] ### Unhandled: Waiting for network...AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK fail Waiting for network...AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK AT+CREG?
+CREG: 0,1
OK fail
It looks like a serial issue; the right commands are going back and forth, but they're not being understood. You can use AltSoftSerial on the Nano; it's likely to help.
Other things to try:
I'm going to close this issue. Please re-open it if you're still having issues.
ifdef DUMP_AT_COMMANDS #include
StreamDebugger debugger(SerialAT, SerialMon); TinyGsm modem(debugger); #else TinyGsm modem(SerialAT); #endif TinyGsmClient client(modem); HttpClient http(client, server, port);
It appears an error when i use the TinyGsm modem(SerialAT) line and sais that identifier "TinyGsm" is undefined but i don't know how to solve that. I have tried to solve it through the libraries but I always get that error
I used the example directly and just changed the site address and this is the result? What is the cause of this problem?
Code :
Result: