I am using the BG77 module to write GPS data to a Firestore database. To do this, I am writing to a proxy server, which then forwards the data I want to send to write to the database. I have tested my server locally and with Postman, and I have successfully written to the database using these methods, so I know the issue is not with the server or database. Here is the code I’ve been using to write:
AT+CEREG?
+CEREG: 0,5
OK
AT+QHTTPCFG="contextid",1
OK
AT+QHTTPURL=67,80
CONNECT
OK
AT+QHTTPPOST=90,80,80
CONNECT
OK
+QHTTPPOST: 0,200,232
Some more context:
-
I am trying to send this data with test coordinates in this JSON format, which is the format Firestore requires: {“fields”: {“location”: {“geoPointValue”: {“latitude”: 30.12345, “longitude”: -90.6789}}}}.
-
I get a 200 response code, meaning the data was sent successfully. However, when I check my database, there is nothing in the field I tried to write to. If there is something already existing in the field and I try to send this data from the BG77, the entire field gets erased, including the field itself.
-
I have tried to set the content type to application/JSON. To do this, I added
AT+QHTTPCFG="contenttype",4
right afterAT+QHTTPCFG="contextid",1
, but I get CME invalid parameter. However, content types 0-3 work.
If anyone has encountered this issue before or knows how to fix it, please let me know. I’ve exhausted all troubleshooting options that I can think of