Cant't get MQTTGateway to work
-
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
-
Yes I think so! It's the one one the MySensor Store, the red one!
-
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
-
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! =/
-
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?
-
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? =/
-
I ordered 2 new W1500 modules to test out! Now I need to wait for them to arrive!
-
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
-
Which total wire length is between the W5100 and the next active port (switch/router) ?
-
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
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