calimero-project / calimero-core

Core library for KNX network access and management
Other
128 stars 65 forks source link

remoteHost invalid argument #50

Closed egcodes closed 6 years ago

egcodes commented 6 years ago

It gives an error when I give the ip address like the comment.

  /**
     * Specifies the KNX server, either as host name or IP address, 
     * used for access to the KNX network. Replace the string with an actual host/address of yours. For example, if you know the IP address
     * of your KNXnet/IP server, use something like "192.168.1.20".
     */
    private static final String remoteHost = "192.168.100.98";

This example shows how to establish a KNX connection to a KNXnet/IP server. Try connecting to 192.168.100.98 ... Error connecting to 192.168.100.98: on connect to /192.168.100.98:3671: Invalid argument (sendto failed)

calimero-project commented 6 years ago

This is likely caused by trying to send over a different local network interface than what you expect, e.g., loopback interface.

In the introduction, there is another example called Create a KNX link (with more options) (CreateKnxLink2.java) which let's you specify the local IP, too. Maybe try that.