AT COMMAND for MQTT ( module SIM800A with Arduino )

Hi, my name is Hieu from Viet Nam. Can someone tell me how to use AT command to connect to Azure Central via MQTT protocol.

After the last post from the

Networking Protocol about the MQTT connect to web server with GPRS

.
I have done a little researched about it. I figured out that we need these values to connect to Azure
1.SCOPE_ID
2.DEVICE_ID
3.SHARE_ACCESS_KEY_ID
I have found those values and i use them to create a Connection String. But then the problem is how can i put that string into the AT command ? ( Sorry if this is a stupid question :slight_smile: cuz the MQTT is still new to me)

This is the way i tried to do: (Manual Way)

  • AT+CREG=1

  • AT+CGATT=1

  • AT+SAPBR=3,1,"CONTYPE","GPRS"

  • AT+SAPBR=3,1,"APN","v-internet"

Open bearer:

  • AT+SAPBR=1,1

Query Bearer:

  • AT+SAPBR=2,1

  • AT+HTTPINIT

I don't use HTTPSSL=1 after Querry cuz i want to run in order to check if there is any problem occur
Enable SSL:

  • AT+HTTPSSL=1

Set bearer profile identifier:

  • AT+HTTPPARA="CID",1

Connect to Azure
AT+CIPSTART="TCP","SCOPE_ID","DEVICE_ID","SHARE_ACCESS_KEY_ID"
[/list]

all the above is ok expect the connect to Azure. So can someone tell me what is my mistake is ? and how to put the string in the AT command ?
Thanks and please forgive me if this question or the code is stupid :slight_smile: