Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Cosmos DB with AT commands by using SIM868e

Status
Not open for further replies.

abusaeedmirza

Newbie
Newbie level 3
Joined
Oct 9, 2020
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
30
Hi,
i am using sim868e module in my application. I want to insert items in Azure cosmos db by using AT commands. I could not find any sample code for AT commands for Azure cosmos db.
Can anyone help in this regards,
 

I am using SIM868e to communicate with Azure cosmos Db for my application. i am trying to use http GET for container from my Azure cosmos db. But i am not able to do it. I am using AT commands. Below are the AT command lines and responses:
Code:
AT
OK
AT+SAPBR=3,1,"Contype","GPRS"
OK
AT+SAPBR=3,1,APN,"internet"
OK
AT+SAPBR=1,1
OK
AT+SAPBR=2,1
+SAPBR: 1,1,"100.83.233.231"
AT+HTTPINIT
OK
AT+HTTPSSL=1
OK
AT+HTTPPARA=CID,"1"
OK
AT+HTTPPARA="URL","https://wm-testdb.documents.azure.com/dbs/WM/colls"
OK
AT+HTTPPARA="CONTENT","application/json"
OK
AT+HTTPPARA="USERDATA","Authorization:type=master&ver=1.0&sig=P5COttmodM6hiXd8FKklz7CqSYl49BZu51YOmbP9LcPdZSPM02mWUh7o7uhKw9PniUoWc8RP249ueg5Gmqb7rA==\r\nx-ms-version:2018-12-31\r\nx-ms-date:Thu, 30 Jun 2022 13:05:09 GMT"
OK
AT+HTTPACTION=0
OK
+HTTPACTION: 0,401,425
AT+HTTPREAD
+HTTPREAD: 425
{"code":"Unauthorized","message":"The input authorization token can't serve the request. The wrong key is being used or the expected payload is not built as per the protocol. For more info: https://ak
I am using primary key "Read only Keys" in authorization and real time for "x-ms-date:"

HARDWARE:

I am using SIM868e module which is connected with Hardware Serial2 of ESP32-wroom-32U and i am using arduino's serial monitor to send AT command lines to sim868e from ESP32.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top