SIM7080 connect to Thingspeak -->Solved
-
Any suggestions :
I get a connection error after SMCONN despite having an IP address assigned to the SIM7080 module.
Standard example works smoothly.
Thanksdevice.sendMsg("AT+CNACT=0,1\r\n"); readstr = device.waitMsg(200); log(readstr); device.sendMsg("AT+CNACT?\r\n"); readstr = device.waitMsg(200); log(readstr); //device.sendMsg("AT+SMCONF=\"URL\",\"broker.emqx.io\",\"1883\"\r\n"); device.sendMsg("AT+SMCONF=\"URL\",\"mqtt3.thingspeak.com\",\"1883\"\r\n"); // mqtt:// mqtt3.thingspeak.com readstr = device.waitMsg(1000); log(readstr); device.sendMsg("AT+SMCONF=\"KEEPTIME\",60\r\n"); readstr = device.waitMsg(1000); log(readstr); device.sendMsg("AT+SMCONF=\"CLEANSS\",1\r\n"); readstr = device.waitMsg(1000); log(readstr); //device.sendMsg("AT+SMCONF=\"CLIENTID\",\"simmqtt\"\r\n"); device.sendMsg("AT+SMCONF=\"CLIENTID\",\"*************\"\r\n"); readstr = device.waitMsg(1000); log(readstr); device.sendMsg("AT+SMCONN\r\n"); readstr = device.waitMsg(5000); log(readstr);
-
you most likely are missing parameters
USERNAME
andPASSWORD
for a successful connection.Thanks
Felix -
Thank you and indeed. The works :
device.sendMsg("AT+CNACT=0,1\r\n");
readstr = device.waitMsg(200);
log(readstr);device.sendMsg("AT+CNACT?\r\n"); readstr = device.waitMsg(200); log(readstr); //device.sendMsg("AT+SMCONF=\"URL\",\"broker.emqx.io\",\"1883\"\r\n"); device.sendMsg("AT+SMCONF=\"URL\",\"mqtt3.thingspeak.com\",\"1883\"\r\n"); // mqtt:// mqtt3.thingspeak.com readstr = device.waitMsg(1000); log(readstr); device.sendMsg("AT+SMCONF=\"KEEPTIME\",60\r\n"); readstr = device.waitMsg(1000); log(readstr); device.sendMsg("AT+SMCONF=\"CLEANSS\",1\r\n"); readstr = device.waitMsg(1000); log(readstr); //device.sendMsg("AT+SMCONF=\"CLIENTID\",\"simmqtt\"\r\n"); device.sendMsg("AT+SMCONF=\"CLIENTID\",\"&&&&&&&&\"\r\n"); readstr = device.waitMsg(1000); log(readstr); device.sendMsg("AT+SMCONF=\"USERNAME\",\"&&&&&&&\"\r\n"); readstr = device.waitMsg(1000); log(readstr); device.sendMsg("AT+SMCONF=\"PASSWORD\",\"&&&&\"\r\n"); readstr = device.waitMsg(1000); log(readstr); device.sendMsg("AT+SMCONN\r\n"); readstr = device.waitMsg(5000); log(readstr); if(readstr.indexOf("ERROR") == -1) { Serial.println("We have a MQTT connection"); break; } else {Serial.println("SMCONN ERROR " );}
-
Hello @HappyUser
I am glad to read that it works for you now and that you are again a happy user. And thank you for reporting back.
Thanks
Felix