GUI-O Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    mosquitto broker

    Scheduled Pinned Locked Moved
    Comments & Feedback
    2
    6
    705
    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.
    • D
      DenesL
      last edited by

      Hi!
      I have setup a mosquitto 2.0.15 broker on Win11 and pub/sub from other PCs works fine but when I try to connect with gui-o I get:

      1676564413: New connection from 10.0.0.11:42662 on port 61000.
      1676564413: Client <unknown> disconnected due to malformed packet.
      

      Any hints appreciated.

      Thanks,
      Denes

      D 1 Reply Last reply Reply Quote 0
      • D
        DenesL @DenesL
        last edited by

        @DenesL Hi!
        The error is with WiFi.

        With Standalone IoT, it does connect and adding a device creates the 2 UUIDs described in the manual (with or without user and/or client id).

        Regards,
        Denes

        K 1 Reply Last reply Reply Quote 0
        • K
          kl3m3n @DenesL
          last edited by

          @DenesL Hi.

          My suggestions was to check the broker configuration and to try connection without TLS, but it seems you've found the solution already.

          @DenesL said in mosquitto broker:

          The error is with WiFi.

          Could you please elaborate on this a bit more? It might help somebody else in the future 🙂

          @DenesL said in mosquitto broker:

          With Standalone IoT, it does connect and adding a device creates the 2 UUIDs described in the manual (with or without user and/or client id).

          How did you try connecting with GUI-O before using Standalone IoT?

          Thanks.
          Best regards,
          kl3m3n

          D 1 Reply Last reply Reply Quote 0
          • D
            DenesL @kl3m3n
            last edited by

            @kl3m3n Hi!
            This is my first time playing with mosquitto so I started it with a simple one listener, no security, log everything setup, so mosquitto.conf contains:

            allow_anonymous true
            connection_messages true
            listener 61000
            log_dest file C:/Program Files/mosquitto/log.txt
            log_type all
            per_listener_settings false
            socket_domain ipv4
            

            Since I had already configured gui-o to connect to the gui-o designer over Ethernet on port 61000 I tried to connect to mosquitto using the same settings and that's when the error pops up:

            1676564413: New connection from 10.0.0.11:42662 on port 61000.
            1676564413: Client <unknown> disconnected due to malformed packet.
            

            Even after going over the manual several times I am still not sure why it happens, there is no more detail in the log file.
            What is the protocol detail for an Ethernet connection?.

            Then I tried with the Standalone IoT aka Add IoT (Create device).
            After entering the same mosquitto server & port it connects and creates both UUID topics, even without having SSL (?), with or without specifying a user and/or client id.
            So I should be able to simulate an IoT device just by having a mosquitto client as a master pub, as in Fig.8 in the manual.
            More to come.

            Regards,
            Denes

            K 1 Reply Last reply Reply Quote 0
            • K
              kl3m3n @DenesL
              last edited by

              @DenesL Hi!

              I understand now. Thank you for explaining.

              MQTT is an "Application layer" protocol built on top of TCP layer. The MQTT packets are defined by the standard, so when you are using GUI-O Ethernet connection (TCP only) the packets are naturally not "compatible".

              GUI-O IoT connection uses MQTT, so this works... The good thing about MQTT is the fact that the broker itself is concerned with security. It can deny (or allow) clients without encryption (TLS). GUI-O will work with or without TLS based on broker configuration (though I recommend TLS, of course - this is also the default GUI-O configuration).

              Your conf says:

              allow_anonymous true
              

              so you do not need to specify user name. Also GUI-O application creates (behind the scenes) a unique client id, if none is specified...

              Best regards,
              kl3m3n

              D 1 Reply Last reply Reply Quote 0
              • D
                DenesL @kl3m3n
                last edited by

                @kl3m3n Hi!
                Thanks, that makes sense.

                Regarding Ethernet connection, does it follow the steps outlined in Fig.7 Direct device pairing procedure of the manual?. Is that how it connects to the designer tool too?.

                Regards,
                Denes

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post