Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
GetAddress
-
hi,
today the cvs is a little bit broken.
in localDevice.java the getAddress calls the wrong constructor:
private byte[] getLocalIPAddress() throws UnknownHostException, SocketException
{
Enumeration<NetworkInterface> netInter = NetworkInterface.getNetworkInterfaces();
int n = 0;while (netInter.hasMoreElements()) { NetworkInterface ni = netInter.nextElement(); System.out.println("NetworkInterface " + n++ + ": " + ni.getDisplayName()); for (InetAddress iaddress : Collections.list(ni.getInetAddresses())) { System.out.println("CanonicalHostName: " + iaddress.getCanonicalHostName()); System.out.println("IP: " + iaddress.getHostAddress()); System.out.println("Loopback? " + iaddress.isLoopbackAddress()); System.out.println("SiteLocal? " + iaddress.isSiteLocalAddress()); System.out.println(); if (false == iaddress.isLoopbackAddress() && iaddress.isSiteLocalAddress()) return iaddress.getAddress(); } } return InetAddress.getLocalHost().getAddress(); } public Address getAddress() { try { return new Address(null, getLocalIPAddress(), messageControl.getPort()); } catch (UnknownHostException e) { // Should never happen, so just wrap in a RuntimeException throw new RuntimeException(e); } catch (SocketException e) { // Should never happen, so just wrap in a RuntimeException throw new RuntimeException(e); } }
in the class Address the networkNumber member has to of type Unsigned16.
correct all compiling errrors and you are ready to add yourself as listener in the notification objects.regards
robertyou can change that quickly.
-
Hi Robert,
Not sure what you are saying is broken since getLocalIPAddress is not in the CVS version of the class.
-
hi matt,
broken means that as local address 127.0.0.1 is returned. plus the bacnet port is being used as bacnet network number.
at least our app did not work anymore after updating from cvs. .now it should again after your latest fixes.best regards
robert