Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. rb3rg
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by rb3rg

    • RE: Can someone confirm UDP gateway is working in 2.0.0?

      Yes, I can confirm its working..
      in the GatewayESP8266 make sure to change from this:

      #if defined(MY_USE_UDP)
        #include <WiFiUdp.h>
      #else
        #include <ESP8266WiFi.h>
      #endif
      

      to

        #include <WiFiUdp.h>
        #include <ESP8266WiFi.h>
      

      You have to have both libraries instead of just one (wiFiUdp.h)
      For case sensitive systems (Linux, OS X) also you have to have the correct upper/lower case in the library name.. it must be:

      #include <WiFiUdp.h> 
      

      and NOT:

      #include <WiFiUDP.h> 
      

      as in the the example mysensors file.

      posted in Development
      rb3rg
      rb3rg
    • ESP8266 Gateway logic conflict MY_GATEWAY_CLIENT_MODE & MY_USE_UDP

      Scenario: GatewayESP8266 with UDP

      If you clone the development version from github and try to compile the GatewayESP8266 with MY_USE_UDP it will fall over a bunch of compilation errors.
      The reason is found in the MySensors.h around line 153, GATEWAY - TRANSPORT

      #if (defined(MY_CONTROLLER_IP_ADDRESS) || defined(MY_CONTROLLER_URL_ADDRESS))
      	#define MY_GATEWAY_CLIENT_MODE
      #endif
      #if defined(MY_USE_UDP) && !defined(MY_GATEWAY_CLIENT_MODE)
      	#error You must specify MY_CONTROLLER_IP_ADDRESS or MY_CONTROLLER_URL_ADDRESS for UDP
      #endif
      

      Once you define MY_USE_UDP you will also want to define MY_CONTROLLER_IP_ADDRESS to send the packages to your controller,
      However as you see in the first line if MY_CONTROLLER_IP_ADDRESS is defined then MY_GATEWAY_CLIENT_MODE will be auto defined and this
      will conflict with UDP use.

      I've fixed it changing to:

      #if (defined(MY_CONTROLLER_IP_ADDRESS) || defined(MY_CONTROLLER_URL_ADDRESS)) && !defined(MY_USE_UDP)
      	#define MY_GATEWAY_CLIENT_MODE
      #endif
      #if defined(MY_USE_UDP) && (!defined(MY_CONTROLLER_IP_ADDRESS) && !defined(MY_CONTROLLER_URL_ADDRESS))
      	#error You must specify MY_CONTROLLER_IP_ADDRESS or MY_CONTROLLER_URL_ADDRESS for UDP
      #endif
      
      posted in Bug Reports
      rb3rg
      rb3rg