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.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

Slave and virtual device on same system


  • Hi, I'm wondering if it's possible to have both a virtual device and a slave device on the same computer.

    I have a server setup with 2 physical network interfaces on the same network. I would like my virtual device to be tied to one network interface (say eth0) and my slave device, running periodic scans of the bacnet network runnong on the other device (eth1).

    I've tried setting up bacnet4j with the appropriate broadcast and IP address to try and force it to bind to a specific network interface. Every time I try this the code simply fails to do anything. That is, no errors are generated, but the software never receives any responses.

    So, is it possible to actually run two different bacnet4j processes on the same computer, with two different interfaces?

    Thanks,
    Jason


  • I can't say that i've tried this scenario, nor do i have resources available at the moment to do so. Have you verified that the the interfaces work individually, i.e. in the absence of the other?


  • The only scenario that does not work is specifying the broadcast and IP address when constructing the LocalDevice. If I do not specify the IP address it works fine.

    -Jason


  • Can you provide an example of how you are doing that?


  • Certainly.

    Taking the SlaveDeviceTest.java line 58

    If I do:

    
    LocalDevice localDevice = new LocalDevice(1968, "172.16.0.255"); // works
    
    
    
    LocalDevice localDevice = new LocalDevice(1968, "172.16.0.255", "172.16.0.4"); // does not work 
    
    

    For what it's worth, I understand the issue now. I'm running on Linux. On Linux, if you bind to a specific address you will not receive broadcast UDP messages unless you are running as root with a raw socket and SO_BINDTOINTERFACE set.

    The issue is discussed from a Java on Linux perspective here: http://www.java.net/node/695514 and from a Linux C perspective here: http://developerweb.net/viewtopic.php?id=5722.

    Thanks,
    Jason


  • Good to know.