我正在使用一个使用开源Java库(Calimero)的Android应用程序.当我尝试通过WiFi连接到KNXnet/IP路由器时,我的代码会引发错误.
这里的问题代码:
private static KNXNetworkLinkIP connect(InetSocketAddress isaLocalEP, InetSocketAddress isaRemoteEP)
{
KNXNetworkLinkIP netLinkIp = null;
int serviceMode = KNXNetworkLinkIP.TUNNEL; // tunnel to IP router
boolean useNAT = true; // NAT not used for PC true or false , but needed for emulator = true
KNXMediumSettings tpSettings = new TPSettings(true); // TP1 medium
try
{
// Output the local end point address
if (m_debugOutput == true)
{
System.out.println("..Tunneling, NAT ignored, TP1 medium");
// Should be the PC's VPN address
System.out.print("..Local EP:");
System.out.println(isaLocalEP.getHostName() …Run Code Online (Sandbox Code Playgroud)