-
Notifications
You must be signed in to change notification settings - Fork 48
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
LDS adds backslash (\) character and .local when the hostname is represented by IP address #76
Comments
@z-krejsa: If I understand it correctly: Your OPC-UA Server is registering to the mDNS Server and not the LDS-ME Server. |
@z-krejsa Extra info: The port 4840 is reserved for the LDS-ME. So try not to used it for your own Server. |
Thanks for you fast response. I'll try to describe in more details my experience ... Our device is an embedded device with simple RTOS operating system, just one OPC UA server is running there. In that case the device don't need a LDS-ME server, just need to implement the mDNS Responder functionality as can be seen in the "Hosts without a LocalDiscoveryServer" chapter of the OPC UA standard. I did following investigation with the FQDN (Fully Qualified Domain Name) and hostname... When I use just hostname ("simocode001"), the resulted DiscoveryUrl is "opc.tcp://simocode001.local.:4840". But this DiscoveryUrl doesn't work, the additional "." (dot) after local is a problem. If I use the DiscoveryUrl without the dot, it works, the UAExpert OPC UA client is able to connect to the OPC UA server running on our embedded device. Do you know where's the problem? As I can see from the Wireshark logs, when there's not the final dot, our device responds to mDNS query, but it doesn't reply to dot finished string? What's correct ".local" or ".local."? As written in the OPC UA standard chapter 6.2.5, mDNS requires that the ‘local’ top level domain be appended to the domain names. The mDNS module from lwIP stack doesn't process the mDNS query with dot. The second test was with FQDN of "simocode001.siemens.com", the resulted DiscoveryUrl produced by the OPC Foundation LDS-ME server is "opc.tcp://simocode001\.siemens\.com.local.:4840". Why there are the added slashes? And why there's the ".local" at the end, even when it's the FQDN? Regarding the TCP port 4840 ... as I know it's a general port for OPC UA communication, not just for LDS-ME. It's a common port used in all the OPC UA servers which I know. So why should I use another port? |
@z-krejsa : Please read the closed issue: #67 Maybe it helps. For FQDN it should not append the .local. to the name. When LDS does the registration the FQDN has been tested and it worked properly. The usecase that you described (the registration is done by a different entity) needs to be tested locally to give an exact answer. Question: Can you ping the following from the machine where you have UaExpert ?: a) simocode001 b) simocode001.local c) simocode001.local. |
@z-krejsa This info might help: https://www.rfc-editor.org/rfc/rfc6762#section-3 |
@z-krejsa In OPC-UA Spec v1.04 Part 12 there is an example using FQDN. Event in this case, a "." is added in the MDNS message hotstname. See screenshot below: |
Our server sends responses to mDNS query, see the attached picture ...

As can be seen the name is represented by IP address. The LDS server receives and parses this response and adds it to the list of discovered servers.

When the OPC client (Unified Automation UA Expert) asks the LDS server for ServersOnNetwork, it returns our OPC UA server, but the DiscoveryUrl string in not correct. We would assume "opc.tcp://192.168.0.50:4840", but the created string is a little bit different with added '' and ".local" ... "opc.tcp://192\.168\.0\.50.local.:4840".
It seems to me like a problem in the LDS server, but I'm not 100% sure. Can you tell me, where's the source of the problem and how to fix it, please?
The text was updated successfully, but these errors were encountered: