-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable mDNS integration? (IDFGH-14828) #104
Comments
Hi, (the below is related to esp-modbus v2.x.x) |
Hi, thx for reply. I already use esp-mdns in the project for something else, I would like the modbus stack not to perform independent mdns configuration because I want to customize it accordingly. In addition, the modbus stack in the mdns context needs a pointer to the interface, which is not convenient and providing a NULL value causes a crash. The only solution I have found at the moment is to move from managed_components to components of the esp-modbus directory and comment out target_compile_definitions(${COMPONENT_LIB} PUBLIC -DMB_MDNS_IS_INCLUDED) which is not very elegant. |
Hi,
The mdns functionality designed to be transparent for esp-modbus. So, you need to disable the mdns for esp-modbus but want to use in your project? I can consider some update for this but need to understand the issue in your project better.
Could you describe the issue in more details with the logs? We can talk about possible solution then. Thanks. |
Hi @alisitsyn, so I wanted to disable everything related to mDNS in the library, because in our project espressif-mdns is already integrated and used for example to advertise the http service. So it is not a problem for us to add modbus advertising there too. Moreover, our project requires that the modbus service can be stopped and its port changed using configuration without restarting the system, so the service must be dynamically added and deleted from mDNS, therefore it is better to support mDNS externally (in our project). BTW (we use the modbus library in slave tcp mode) the tcp socket accepting connections is not closed by deinit/delete duncrionI don’t remember name, which prevents it from being restarted becouse port is in use. |
Hi @esp-dev, Thank you for update. This explains your project better and some investigation and refactoring is planned to provide better way for mDNS integration in the esp-modbus. I am going to do this once possible. For now my proposal is the simple change in the esp-modbus library as a kconfig option which would allow to explicitly disable/enable esp-modbus - mDNS integration. Will this solve the issue in your project? |
Checklist
Issue or Suggestion Description
Hi,
I have a question regarding mDNS integration, how to disable it (in esp-modbus) if I already configure DNS in my part of the code?
The text was updated successfully, but these errors were encountered: