cancel
Showing results for 
Search instead for 
Did you mean: 

HCP-IOT POST using HTTP from a GSM MODULE?

sabarna17
Contributor
0 Kudos

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-comm...

anton_levin
Advisor
Advisor
0 Kudos

Dear User, I see your are posting the same question from different accounts https://answers.sap.com/questions/470771/how-to-construct-data-http-post-header-for-at-comm.html

Please, delete one of the threads.

Regards, Anton (Moderator)

sabarna17
Contributor
0 Kudos

I have deleted that post.

.

Accepted Solutions (1)

Accepted Solutions (1)

anton_levin
Advisor
Advisor

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_...

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

sabarna17
Contributor
0 Kudos

Thanks Anton. Its better to change my direction. I will try using NODEMCU (ESP8266).

sabarna17
Contributor
0 Kudos

I have Used Node MCU and that's become very easy to connect the HCP from a real-time device. Thanks Anton.

Answers (0)