🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    SIM7080 connect to Thingspeak -->Solved

    Scheduled Pinned Locked Moved Modules
    4 Posts 2 Posters 3.7k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      HappyUser
      last edited by HappyUser

      Any suggestions :
      I get a connection error after SMCONN despite having an IP address assigned to the SIM7080 module.
      Standard example works smoothly.
      Thanks

          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+SMCONN\r\n");
          readstr = device.waitMsg(5000);
          log(readstr);
      
      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        @HappyUser

        you most likely are missing parameters USERNAME and PASSWORD for a successful connection.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        H 1 Reply Last reply Reply Quote 0
        • H Offline
          HappyUser @felmue
          last edited by

          @felmue

          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 " );}
          
          1 Reply Last reply Reply Quote 0
          • felmueF Offline
            felmue
            last edited by

            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

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post