• Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Register
  • Login
MakerGram Logo

MakerGram

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups

Can't connect NodeMCU with MQTT

Arduino
3
17
1.7k
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.
  • salmanfaris
    salmanfaris @sivanath last edited by 6 Mar 2023, 18:59

    @sivanath Does the local pub and sub is working over CLI?

    S 1 Reply Last reply 27 Mar 2023, 09:33 Reply Quote 0
    • 21 days later
    • S
      sivanath @salmanfaris last edited by 27 Mar 2023, 09:33

      @salmanfaris It was working in CLI, but now it's showing multiple usages at the portmultiple usage.png

      swalahamani 1 Reply Last reply 29 Mar 2023, 18:45 Reply Quote 0
      • swalahamani
        swalahamani @sivanath last edited by swalahamani 29 Mar 2023, 18:46 29 Mar 2023, 18:45

        @sivanath

        It looks like mosquitto is trying to register both IPv4 and IPv6 on the same port.

        If IPv6 is not required for the application your use case, try changing the mosquitto.conf file as below for limiting it to ipv4:

        # Set to `ipv4` to force the listener to only use IPv4, or set to `ipv6` to
        # force the listener to only use IPv6. If you want support for both IPv4 and
        # IPv6, then do not use the socket_domain option.
        socket_domain ipv4
        

        Please please make sure the default port 1883 is not already in use by any other programs. If yes, you can either kill those programs (not recommended) or change the port in mosquitto.conf file:

        References: [1][2]

        S 1 Reply Last reply 30 Mar 2023, 07:46 Reply Quote 0
        • S
          sivanath @swalahamani last edited by sivanath 30 Mar 2023, 07:49 30 Mar 2023, 07:46

          @swalahamani @salmanfaris
          I changed my conf file and specified ipv4
          And this is the status of the port (from resource monitor):

          Image: mosquitto.exe	
          PID: 3732
          Address: IPv6 loopback
          Protocol: TCP
          Port: 1883
          Firewall Status: Allowed, not restricted
          
          

          It is listening to mosquito..

          swalahamani 1 Reply Last reply 30 Mar 2023, 07:49 Reply Quote 0
          • swalahamani
            swalahamani @sivanath last edited by 30 Mar 2023, 07:49

            @sivanath

            Is it working now?

            S 1 Reply Last reply 30 Mar 2023, 07:51 Reply Quote 0
            • S
              sivanath @swalahamani last edited by 30 Mar 2023, 07:51

              @swalahamani No Screenshot 2023-03-30 132054.png

              swalahamani 1 Reply Last reply 30 Mar 2023, 07:59 Reply Quote 0
              • swalahamani
                swalahamani @sivanath last edited by 30 Mar 2023, 07:59

                @sivanath
                Did you follow the steps which I mentioned previously?

                S 1 Reply Last reply 30 Mar 2023, 09:57 Reply Quote 0
                • S
                  sivanath @swalahamani last edited by 30 Mar 2023, 09:57

                  @swalahamani Yeah!!

                  swalahamani 1 Reply Last reply 31 Mar 2023, 04:37 Reply Quote 0
                  • swalahamani
                    swalahamani @sivanath last edited by swalahamani 31 Mar 2023, 04:38 31 Mar 2023, 04:37

                    @sivanath

                    Oh okay.

                    Please bring your device if you're coming for the upcoming MakerChat 0x13 tomorrow (IST). Either I and @salmanfaris or both of us will be there.

                    Or else we can set up a call sometime this weekend or the next week and sort it out.

                    Let me know.

                    S 1 Reply Last reply 31 Mar 2023, 04:52 Reply Quote 1
                    • S
                      sivanath @swalahamani last edited by 31 Mar 2023, 04:52

                      @swalahamani I may not be able to come tomorrow. I think we could set up a call. How can I contact you personally?

                      salmanfaris 1 Reply Last reply 5 Apr 2023, 09:17 Reply Quote 0
                      8 out of 17
                      • First post
                        8/17
                        Last post

                      Recent Posts

                      • @codelery Awesome. That's great news. Kudos to @rafitc99 . 🙌

                        @codelery Please keep us updated about your project, looking forward to seeing it in action 🤩

                        7 Jul 2023, 06:58 • read more
                      • C

                        @rafitc99 I changed the buffer and that solved the problem. Thanks a lot for coming to my rescue.

                        7 Jul 2023, 00:44 • read more
                      • C

                        @salmanfaris I did change the buffer size and everything is working perfectly. Thanks coming to my rescue.

                        7 Jul 2023, 00:41 • read more
                      • @codelery said in Help needed: Arduino Wireless Notice Board project:

                        I am using the hardware serial (pin 0 and 1 on Arduino Uno)

                        As @rafitc99 mentioned, you need to expand the Serila buffer, in the hardware serial also the Arduino board package implements a 64-byte ring buffer for send and receive on the hardware serial messages. So you need to change that to 256 as per your message length.

                        6 Jul 2023, 12:22 • read more
                      • C

                        @rafitc99 The thing is that I am not using the SoftwareSerial library in receiving the message from the first microcontroller. I am using the hardware serial (pin 0 and 1 on Arduino Uno)

                        6 Jul 2023, 01:45 • read more
                      By MakerGram | A XiStart Initiative | Built with ♥ NodeBB
                      Copyright © 2023 MakerGram, All rights reserved.
                      Privacy Policy | Terms & Conditions | Disclaimer | Code of Conduct