[Solved] GatewayESP8266MQTTClient from development tree does nothing



  • Hi,

    I'm using the Arduino 1.6.5 ide on 64bit Linux using/trying the esp8266 2.2.0, 2.1.0 and 2.0.0 board mananger versions.
    I used the mysensors DEV git branch of May 14th and compiled and flashed the GatewayESP8266MQTTClient.ino.
    The only adaptions I made were the network settings for static IP and the broker address.
    Compiling works fine and flashing to my Nodemcu 1.0 Devboard as well.
    But absolutely nothing happens: I don't see anything on my serial monitor (I tried several baud rates). I can't ping it (static address 192.168.144.245). It doesn't connect to my mosquitto broker. Absolutely nothing.
    So I took an identical Nodemcu and set it up: Again absolutely nothing.

    The first nodemcu worked fine with the 1.5 branch Esp8266Gateway.ino. So I flashed the second nodemcu as well with this ino to rule out hardware issues: Both work fine.
    I finally do a "sudo arp-scan --localnet" to check for the mac addresses on my network and now it turns out that it didn't get a static ip-adress, but a dhcp address being 192.168.144.13

    However: still nothing on the serial monitor or at the mosquitto broker (and the broker functions fine. I tested that)

    So I assume there is something wrong with the static ip settings in the DEV branch, but for the time being I can live with that.
    For the record, these are my IP settings:

    // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
    #define MY_IP_ADDRESS 192, 168, 144, 245
    
    // If using static ip you need to define Gateway and Subnet address as well
    #define MY_IP_GATEWAY_ADDRESS 192, 168, 144, 1
    #define MY_IP_SUBNET_ADDRESS 255, 255, 255, 0
    
    // MQTT broker ip address.  
    #define MY_CONTROLLER_IP_ADDRESS 192, 168, 144, 128
    

    My issues are the complete abundance of serial output and the not connecting to my broker.
    Can anyone please explain if I do something wrong? Or is this a straight bug in the DEV repository? (And I'm not talking about the static ip settings)



  • I saw a commit to the DEV repo so I did a git pull this morning, started arduino and recompiled and flashed.
    It's working. Immediately!

    The fixed ip-adress was there and the the serial monitor displayed nicely the debug and node messages.
    The mosquitto broker receives the info which I can see using the mosquitto_sub command.

    It beats me, as I can't imagine the yesterday evening commit fixed it, but I'm glad it works.
    For reference: This morning I used the 2.2.0 esp8266 board managers version.


 

309
Online

7.9k
Users

8.8k
Topics

93.8k
Posts