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 1.3k 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

    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


    19

    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