Advanced Device Discovery Protocol (ADDP)

From Digi Developer

Jump to: navigation, search


Contents

What is ADDP?

ADDP (Advanced Device Discovery Protocol) is a proprietary protocol developed by Digi International that allows devices on a local network to be found regardless of their network configuration.

How does it work?

ADDP uses a client/server model. The client is the application that is searching for devices. The server is the device that is being search for.

In the simplest terms, the client application sends out a specially formatted UDP broadcast packet on the network. ADDP servers listening for the packet, will receive it, and send an ADDP response back to the client. Once this process is complete, the client can then send configuration requests to the device. These can include things like network settings, and reboot requests.

Java Library

A subset of the protocol has been implemented in Java. You can find the jar file here: AddpLibrary(r2010).zip
The associated javadoc documentation can be found here: AddpJavadoc(r2010).zip

This library allows you to search synchronously, and asynchronously for devices on the network. You can then use it to reconfigure the device's network settings, or reboot the device.

Java Sample Application

A simple discovery sample application can be found here: AddpSample(r2010).zip

Basic Usage

First, instantiate the AddpClient object.

AddpClient addpClient = new AddpClient();

Next, call SearchForDevices() and check the return value. Then get the devices, and walk the hashtable.

if (addpClient.SearchForDevices()) {
   AddpDeviceList deviceList = addpClient.getDevices();
 
   Enumaration<AddpDevice> e = deviceList.elements();
   while(e.hasMoreElements()) {
      AddpDevice device = e.nextElement();
 
      // do something with the device here
      System.out.println(device.toString());
 
      // if device is not configured for DHCP, then turn it on and reboot.
      if (device.getDHCP() == 0) {
         addpClient.setDHCP(device, true, "dbps");
         addpClient.rebootDevice(device, "dbps");
      }
   } 
}
Personal tools
Wiki Editing