SIM7020E Can't post data through HTTP or MQTT


#1

I just bought SIM7020E breakout board from

I become able to register to NB-LTE network, but when I tried to post some data according to datasheet,
https://www.google.com/url?sa=t&source=web&rct=j&url=https://simcom.ee/documents/SIM7020/SIM7020%20Series_HTTP_Application_Note_V1.1.pdf&ved=2ahUKEwjw3u683fXfAhUMuRoKHd_qDh4QFjACegQIARAB&usg=AOvVaw2NgxmHG65q4koslye6yKim

I always get error message in step num(4).

My AT commands sequence to send data are as follows:


//1- To Create HTTP host instance

AT+CHTTPCREATE=“http://demo.thingsboard.io

//2- To connect to server

AT+CHTTPCON=0

//3- To allow to POST data

AT+CHTTPPARA=1

//4- Posting Data to certain topic in thingsboard cloud

AT+CHTTPSEND=0,1, " api/v1/ $Access_TOKEN /attributes " , " HTTPHEADER_in_hex " , “application/json” , " json_data_in_hex "

//5- Disconnect from cloud

//Disconnect from the Server

AT+CHTTPDISCON=0


Noting that:


json_data_in_hex =

{“Sens1” : “23” }

That is encoded in hex to be --> 7b2253656e733122203a2022323322207d

HTTPHEADER_in_hex =

Accept: /

Connection: Keep-Alive

That is encoded in hex to be --> 4163636570743a202a2f2a0d0a436f6e6e656374696f6e3a204b6565702d416c697665

So, Finally I`m running the command as:

AT+CHTTPSEND=0,1," api/v1/ $Access_TOKEN /attributes " , " 4163636570743a202a2f2a0d0a436f6e6e656374696f6e3a204b6565702d416c697665 " ,

" application/json " , " 7b2253656e733122203a2022323322207d "

and it gives me error !

I don`t know what is the wrong?

Also, when I tried use MQTT AT commands, I followed the manual to start mqtt service:

https://www.google.com/url?sa=t&source=web&rct=j&url=http://www.microchip.ua/simcom/LTE/SIM7020/AppNotes/SIM7020%20Series_MQTT_Application_Note_V1.1.pdf&ved=2ahUKEwi7yffu3fXfAhXFyYUKHdI7D80QFjAAegQIAxAB&usg=AOvVaw3RXqAFydwu1o2oV-JhWLBg

But always I got error in all mqtt commands.

I`d be grateful if someone could help me.


#2

Hi,
Please post proper URL. You have linked Google search results. Visit that page and get the link.

Errors can be for many reasons , unless you share the screenshot of the error and what and when exactly it happens we cant help much. If possible capture the AT command data in a terminal software and paste here.


#3

Dear RaviPujar,

Here is the same post with proper HTML links. I have got the HW and tested it before, but currently, I don`t have the HW device with me to retest and give you some screenshots of the Error.

However, The following steps are exactly the serial AT commands I used to send to SIM7020E.
As I mentioned before, when sending AT command in step(4), the SIM7020E responded with just ERROR, I believe its a problem with the syntax of AT command, it seems that the SIM7020E module doesnt even accept the AT command syntax.


I just bought SIM7020E breakout board from

I become able to register to NB-LTE network, but when I tried to post some data according to datasheet,

I always get error message in step num(4).

My AT commands sequence to send data are as follows:

//1- To Create HTTP host instance

AT+CHTTPCREATE=“ http://demo.thingsboard.io

//2- To connect to server

AT+CHTTPCON=0

//3- To allow to POST data

AT+CHTTPPARA=1

//4- Posting Data to certain topic in thingsboard cloud

AT+CHTTPSEND=0,1, " api/v1/ $Access_TOKEN /attributes " , " HTTPHEADER_in_hex " , “application/json” , " json_data_in_hex "

//5- Disconnect from cloud

//Disconnect from the Server

AT+CHTTPDISCON=0

Noting that:

json_data_in_hex =

{“Sens1” : “23” }

That is encoded in hex to be --> 7b2253656e733122203a2022323322207d

HTTPHEADER_in_hex =

Accept: /

Connection: Keep-Alive

That is encoded in hex to be --> 4163636570743a202a2f2a0d0a436f6e6e656374696f6e3a204b6565702d416c697665

So, Finally I`m running the command as:

AT+CHTTPSEND=0,1," api/v1/ $Access_TOKEN /attributes " , " 4163636570743a202a2f2a0d0a436f6e6e656374696f6e3a204b6565702d416c697665 " ,

" application/json " , " 7b2253656e733122203a2022323322207d "

and it gives me error !

I don`t know what is the wrong?

Also, when I tried use MQTT AT commands, I followed the manual to start mqtt service:
http://www.microchip.ua/simcom/LTE/SIM7020/AppNotes/SIM7020%20Series_MQTT_Application_Note_V1.1.pdf

But always I got error in all mqtt commands.

I`d be grateful if someone could help me.