Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Cant't get MQTTGateway to work

Cant't get MQTTGateway to work

Scheduled Pinned Locked Moved Troubleshooting
12 Posts 3 Posters 3.7k Views 3 Watching
  • 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.
  • S Offline
    S Offline
    Soloam
    Hardware Contributor
    wrote on last edited by Soloam
    #1

    Hell, I've been testing a MQTTGateway in my Arduino UNO and I can't get it to work, I checked and double checked, and the again, all the connections, and all is ok!

    I have a HanRun HR911105A and I'm running with SOFTSPI on! This module is powerd by 5v and I also tested it with a separated power supply!

    When I plug my Arduino I get in the serial monitor:

    0;0;3;0;9;gateway started, id=0, parent=0, distance=0
    Ok!

    The lights in the Ethernet Module start to blink but if I do a ping to the IP, it returns "unreachable"!

    This is my config:
    #include <DigitalIO.h>
    #include <SPI.h>

    #include <MySigningNone.h>
    #include <MyTransportRFM69.h>
    #include <MyTransportNRF24.h>
    #include <MyHwATMega328.h>
    #include <MySigningAtsha204Soft.h>
    #include <MySigningAtsha204.h>

    #include <MySensor.h>
    #include <MsTimer2.h>
    #include <Ethernet.h>
    #include "MyMQTT.h"

    #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
    #define INCLUSION_MODE_PIN 3 // Digital pin used for inclusion mode button

    // * Use this for IBOARD modded to use standard MISO/MOSI/SCK, see note 1 above!
    /

    #define RADIO_CE_PIN 3 // radio chip enable
    #define RADIO_SPI_SS_PIN 8 // radio SPI serial select
    #define RADIO_ERROR_LED_PIN A2 // Error led pin
    #define RADIO_RX_LED_PIN A1 // Receive led pin
    #define RADIO_TX_LED_PIN A0 // the PCB, on board LED
    */

    // * Use this for default configured pro mini / nano etc :
    ///*

    #define RADIO_CE_PIN 5 // radio chip enable
    #define RADIO_SPI_SS_PIN 6 // radio SPI serial select
    #define RADIO_ERROR_LED_PIN 7 // Error led pin
    #define RADIO_RX_LED_PIN 8 // Receive led pin
    #define RADIO_TX_LED_PIN 9 // the PCB, on board LED*/

    #define TCP_PORT 1883 // Set your MQTT Broker Listening port.
    IPAddress TCP_IP ( 192, 168, 2, 30 ); // Configure your static ip-address here
    byte TCP_MAC[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

    Can any one help me? This is driving me crazy!

    Thank you

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hek
      Admin
      wrote on last edited by
      #2

      @Soloam said:

      HanRun HR911105A

      W5100?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Soloam
        Hardware Contributor
        wrote on last edited by
        #3

        Yes I think so! It's the one one the MySensor Store, the red one!

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hek
          Admin
          wrote on last edited by
          #4

          Could you just try the W5100 Gateway sketch in the dev-branch it should be ready to run without any reconfiguration.

          The 5100 if pretty power hungry, are you able to test it with a bench power supply while testing?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Soloam
            Hardware Contributor
            wrote on last edited by
            #5

            Hello @hek !

            I tested the W5100 Gateway sketch but nothing happens, I don't see nothing in the serial monitor and I can't ping the IP! I tested also without defining the IP, but no DHCP request is made to my router!

            I also tested like you suggested, with a external power supply just to the W5100, no success!

            =/

            Thank You

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Soloam
              Hardware Contributor
              wrote on last edited by Soloam
              #6

              This is so annoying! I tried this code:

              #include <SPI.h>
              #include <Ethernet.h>
              
              const int W5100_RESET_PIN = 8;
              
              byte mac[] = {
                0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
              };
              
              IPAddress MY_IP(192,168,1,177);
              
              void setup() {
                Serial.begin(9600);
                Serial.println();
                Serial.println(F("node starting..."));
                pinMode(W5100_RESET_PIN, OUTPUT);
                digitalWrite(W5100_RESET_PIN, LOW);
                delay(100);
                digitalWrite(W5100_RESET_PIN, HIGH);
                // give the Ethernet shield a second to initialize:
                delay(3000);
              
                Serial.print(F("static IP..."));
                Ethernet.begin(mac, IPAddress(MY_IP));
                
                Serial.print(F("local IP:"));
                Serial.println(Ethernet.localIP());
                Serial.println(F("node started."));
              }
              
              void loop() {
              
              }
              

              I found it online! Look at the IP (192.168.1,177)! This is the output from serial:

              node starting...
              static IP...local IP:232.64.0.0
              node started.
              

              If I run it again the IP changes! =/

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rollercontainer
                wrote on last edited by
                #7

                Seems, that your ip adresses dont match your network. What is the ip of your router? The first 3 numbers have to match in a normal home network...

                Are you aware how to do that?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Soloam
                  Hardware Contributor
                  wrote on last edited by
                  #8

                  The IP is in the range! I have several networks at my home, I tested it in all! In the case above the router IP is 192.168.1.1.

                  Can it be a defected network module? =/

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Soloam
                    Hardware Contributor
                    wrote on last edited by
                    #9

                    I ordered 2 new W1500 modules to test out! Now I need to wait for them to arrive!

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Soloam
                      Hardware Contributor
                      wrote on last edited by
                      #10

                      Hello, found a solution that solved my problem! You can use the topic https://forum.arduino.cc/index.php?topic=351477.msg2662072#msg2662072 as reference! I soldered the 100ohm as described and it worked 100%.

                      Thank you all

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        rollercontainer
                        wrote on last edited by
                        #11

                        Which total wire length is between the W5100 and the next active port (switch/router) ?

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          Soloam
                          Hardware Contributor
                          wrote on last edited by
                          #12

                          Wire Length? Way is this important? The problem was solved soldering te 2 resistors! The cable length is a normal small cable going to the router

                          1 Reply Last reply
                          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
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          9

                          Online

                          12.1k

                          Users

                          11.2k

                          Topics

                          113.4k

                          Posts


                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • MySensors
                          • OpenHardware.io
                          • Categories
                          • Recent
                          • Tags
                          • Popular