Skip to Content
-1

HCP-IOT POST using HTTP from a GSM MODULE?

My HTTP CODE -

URL: https://iotmmsp2000074374trial.hanatrial.ondemand.com/com.sap.iotservices.mms/v1/api/http/data/d000-e000-v000-i000-c000-e001\

Content-Type: application/json

Authorization: Bearer XXXXX......XXXXXXXXX

Cache-Control: no-cache

Postman-Token: 821a903d-1590-b90d-6516-d57681c2acef

{ "mode":"sync", "messageType":"XXXXXXXXXXXXXXX", "messages":[ { "timestamp": 11623333333, "temp": 32 } ] }


Now ->

While creating the HEADER for HTTP POST, how to use Authorization in the code?

I am unable to POST data.

https://arduino.stackexchange.com/questions/51263/how-to-construct-data-http-post-header-for-at-commands-using-arduino

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 29 at 07:13 PM

    Hello Sabarna Chatterjee,

    after talking to a colleague of mine, here are some remarks from him regarding your question:

    1. The IoT Service (both on Neo as well as on CF) need to be accessed via TLS. There is no guarantee that your Arduino + the SIM800 modem you use (you have mentioned it in your original question) are capable to do that.
    2. The Arduino MKR 1400 GSM has a modem that is capable to do the TLS part - so the Arduino MCU does not have to do it (it would also not be powerful enough / have enough RAM). We tested IoT Service Neo access with this Arduino [2]. For a library to use + in the library source code also AT command specifics - please have a look at [1]

    Please, also have a look at Arduino samples [2], [3] we have in the IoT StarterKit. Both are using WiFi, though.

    Regards, Anton

    [1] https://github.com/arduino-libraries/MKRGSM

    [2] https://github.com/SAP/iot-starterkit/blob/master/neo/hardware/Arduino-MKR1000/WiFiSSLClient_saphcp_POST.ino

    [3] https://github.com/SAP/iot-starterkit/blob/master/neo/hardware/ESP8266/Arduino/HTTPSRequest_HCP_POST.ino

    Add comment
    10|10000 characters needed characters exceeded