Hey Thom,
Interestingly during field tests today, I found out that the socket communication is only happening once. I mean that after it creates the socket then connect to server, it sends data and read the response from server only once and after that it just enters into a timeout loop. Would you guide me what is wrong here?
This is correct response:
7:41:24.579 → << OK
17:41:24.579 → HTTP/1.1 200 OK
17:41:24.579 → Server: nginx
17:41:24.579 → Date: Thu, 25 Feb 2021 16:41:24 GMT
17:41:24.579 → Content-Type: application/json
17:41:24.579 → Transfer-Encoding: chunked
17:41:24.579 → Connection: close
17:41:24.579 → Allow: GET, POST, HEAD, OPTIONS
17:41:24.579 → Vary: Origin, Cookie
17:41:24.579 → {“dip”: [{“status_code”: 201}], “diq”: [{“status_code”: 201}], “position”: [{“status_code”:201}], “sat”: [{“status_code”: 201}], “spp”: [{“status_code”: 201}], “spq”: [{“status_code”:201}]}
17:41:24.579 → 0
17:41:24.579 →
17:41:24.579 →
17:41:24.579 → >> AT
17:41:24.579 → << OK
17:41:24.579 → >> AT+USOCTL=0,11
17:41:24.579 → << +USOCTL: 0,11,1
17:41:24.579 → << OK
17:41:24.865 → >> AT
17:41:24.865 → << OK
17:41:24.903 → >> AT+USOCTL=0,11
17:41:24.903 → << +USOCTL: 0,11,1
17:41:24.903 → << OK
17:41:25.183 → >> AT
17:41:25.183 → << +UUSOCL: 0
17:41:25.183 → Unsolicited: Socket 0
17:41:25.183 → << OK
17:41:25.183 → >> AT+USOCL=0
17:41:25.183 → << +CME ERROR: Operation not allowed
17:41:25.217 → >> AT
17:41:25.217 → << OK
17:41:55.201 → Getting GPS fix.
Then these are the responses i get.
17:42:00.036 → Sending data to ubidots server.
17:42:00.036 → >> AT+USOCR=6,80
17:42:00.036 → << +CME ERROR: No connection to phone
17:44:12.044 → >> AT+USOCR=6,80
17:44:12.044 → << timed out
17:46:26.291 → >> AT+USOCR=6,80
17:46:26.291 → << timed out
and this continues every time i try to send data.