I'm using the ESP8266 (WROOM-02D) for MQTT over WIFI. I'm using AT commands for MQTT. I'm currently using ESP8266-IDF-AT_V2.2.1.0 firmware on the WROOM-02D. My broker has been configured to use both client and server certificates for authentication.
I flashed my certifactes to the module at the following addresses as per the partition table:
Code: Select all
0xF8000 - client_cert.bin
0xFA000 - client_key.bin
0xFC000 - client_ca.bin
0x106000 - mqtt_key.bin
0x104000 - mqtt_cert.bin
0x108000 - mqtt_ca.bin
Code: Select all
AT+CWMODE=1 // Station mode
AT+CWJAP="SSID","Password" // Connect to AP
AT+CIPMUX=0 // Single connection
AT+CIPSNTPCFG=1,8,"ntp1.aliyun.com" // Configure and enable SNTP
AT+CIPSNTPTIME? // Query the SNTP time
AT+CIPSSLCCONF=3,0,0 // Set the SSL clients (mutual authentication)
AT+MQTTUSERCFG=0,5,"ClientID","","",0,0,"" // MQTT user configuration
AT+MQTTCONNCFG=0,30,0,"topic","message",0,0 // MQTT connection configuration
AT+MQTTCONN=0,"BrokerAddress",BrokerPort,0 // Connect to the MQTT broker
Whenever I execute the command
Code: Select all
AT+MQTTCONN
When I set the scheme to 0 (TCP and no TLS), there is no issue.
I've tried several things and even different firmwares but cannot get it to work.
When looking at the AT command manual, the MQTT user configuration has a "path" parameter.
Code: Select all
AT+MQTTUSERCFG=<LinkID>,<scheme>,<"client_id">,<"username">,<"password">,<cert_key_ID>,<CA_ID>,<"path">