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. Bug Reports
  3. ESP8266 Gateway logic conflict MY_GATEWAY_CLIENT_MODE & MY_USE_UDP

ESP8266 Gateway logic conflict MY_GATEWAY_CLIENT_MODE & MY_USE_UDP

Scheduled Pinned Locked Moved Bug Reports
1 Posts 1 Posters 936 Views 1 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.
  • rb3rgR Offline
    rb3rgR Offline
    rb3rg
    wrote on last edited by
    #1

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


    11

    Online

    11.7k

    Users

    11.2k

    Topics

    113.1k

    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