Gemalto is now part of the Thales Group, find out more.

You are here

BGS2T - Post data to UBIDOTS server (HTTP Post with header and body) | Thales IoT Developer Community

May 6, 2019 - 4:15pm, 3522 views

Hi there,
I'm trying to post data to the "Ubidots" IOT platform with a BGS2T ****m.
The Ubidots API documentation can be found here: https://ubidots.com/docs/hw/#send-data)
At the moment I can post data using apitester.com as shown below: (The token has been crossed out)
BGS2T Api tester Ubidots post
I assume (and please correct me if I am wrong) that hcProp is the equivalent of "request header" and hcContent is the equivalent of "post data".
I am sending the following AT commands using Teraterm. The token number has been replaced by ____.
The command that is underlined in bold is giving an error, the ****m "does not like" the extra quotation marks.
AT
AT^SCFG="Tcp/WithURCs","on"
AT^SICS=1,"conType","GPRS0"
AT^SISS=1,"srvType","http"
AT^SISS=1,"conId","1"
AT^SISS=1,"address","http://industrial.api.ubidots.com/api/devices/cellular-****m-1/?token=__..."
AT^SISS=1,"hcContLen","0"
AT^SISS=1,"hcContent","{"temperature": 10}"
AT^SISS=1,"hcProp","Content-Type: application/json"
AT^SISO=1
AT^SISR=1,500
AT^SISC=1
Can you please advise if my assumption of the "Header=hcProp" and "Post data=hcContent" is correct and how to allow for quotations marks in the hcContent field. (If I am implementing the http post correctly)
Thank you!