We have BACnet implemented in a .NET core application running in Docker.
BACnet runs on port 47808 on the host machine. So when I want to discover devices I use the IP of the host machine. But when I do that, it returns an error. When I check the IP and port with NMap (from within the Docker container), it shows that the port is available with service "BACnet" behind it.`
I recieve the following error:
{
"ClassName": "System.Net.Sockets.SocketException",
"Message": "Cannot assign requested address",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": " at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)\n at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)\n at System.Net.Sockets.Socket.Bind(EndPoint localEP)\n at System.IO.BACnet.BacnetIpUdpProtocolTransport.Open()\n at System.IO.BACnet.BacnetIpUdpProtocolTransport.Start()\n at System.IO.BACnet.BacnetClient.Start()\n at AgentCore.Services.BACnetDiscoveryService.Discover() in /app/AgentCore/Services/BACnetDiscoveryService.cs:line 41\n at AgentApi.Controllers.DevicesController.Get() in /app/AgentApi/Controllers/DevicesController.cs:line 30",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": -2147467259,
"Source": "System.Net.Sockets",
"WatsonBuckets": null,
"NativeErrorCode": 99
}
Can someone enlighten me and point me in the right direction? Or is it just not possible with the library to use another ipaddress than 0.0.0.0?
We have BACnet implemented in a .NET core application running in Docker. BACnet runs on port 47808 on the host machine. So when I want to discover devices I use the IP of the host machine. But when I do that, it returns an error. When I check the IP and port with NMap (from within the Docker container), it shows that the port is available with service "BACnet" behind it.`
I recieve the following error:
Can someone enlighten me and point me in the right direction? Or is it just not possible with the library to use another ipaddress than 0.0.0.0?