Skip to Content
-1

HCP-IOT POST using HTTP from a GSM MODULE?

Mar 29 at 07:12 AM

124

avatar image

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

10 |10000 characters needed characters left characters exceeded

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)

0

I have deleted that post.

.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Anton Levin
Mar 29 at 07:13 PM
1

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

0

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

0