diff --git a/providers/null/src/main/java/org/onosproject/provider/nil/CustomTopologySimulator.java b/providers/null/src/main/java/org/onosproject/provider/nil/CustomTopologySimulator.java
index e7a5788..8ed469e 100644
--- a/providers/null/src/main/java/org/onosproject/provider/nil/CustomTopologySimulator.java
+++ b/providers/null/src/main/java/org/onosproject/provider/nil/CustomTopologySimulator.java
@@ -85,6 +85,23 @@
     }
 
     /**
+     * Creates simulated device.
+     *
+     * @param id        device identifier
+     * @param name      device name
+     * @param type      device type
+     * @param hw        hardware revision
+     * @param sw        software revision
+     * @param portCount number of device ports
+     */
+    public void createDevice(DeviceId id, String name, Device.Type type,
+                             String hw, String sw, int portCount) {
+        int chassisId = Integer.parseInt(id.uri().getSchemeSpecificPart(), 16);
+        createDevice(id, chassisId, type, hw, sw, portCount);
+        nameToId.put(name, id);
+    }
+
+    /**
      * Creates a simulated host.
      *
      * @param hostId   host identifier
diff --git a/providers/null/src/main/java/org/onosproject/provider/nil/TopologySimulator.java b/providers/null/src/main/java/org/onosproject/provider/nil/TopologySimulator.java
index 62410a3..3a35971 100644
--- a/providers/null/src/main/java/org/onosproject/provider/nil/TopologySimulator.java
+++ b/providers/null/src/main/java/org/onosproject/provider/nil/TopologySimulator.java
@@ -204,9 +204,23 @@
      * @param portCount number of device ports
      */
     public void createDevice(DeviceId id, int chassisId, Device.Type type, int portCount) {
+        createDevice(id, chassisId, type, "0.1", "0.1.2", portCount);
+    }
+
+    /**
+     * Creates simulated device.
+     *
+     * @param id        device identifier
+     * @param chassisId chassis identifier number
+     * @param type      device type
+     * @param hw        hardware revision
+     * @param sw        software revision
+     * @param portCount number of device ports
+     */
+    public void createDevice(DeviceId id, int chassisId, Device.Type type,
+                             String hw, String sw, int portCount) {
         DeviceDescription desc =
-                new DefaultDeviceDescription(id.uri(), type,
-                                             "ONF", "0.1", "0.1", "1234",
+                new DefaultDeviceDescription(id.uri(), type, "ONF", hw, sw, "1234",
                                              new ChassisId(chassisId));
         deviceIds.add(id);
         mastershipAdminService.setRoleSync(localNode, id, MASTER);
diff --git a/providers/null/src/main/java/org/onosproject/provider/nil/cli/CreateNullDevice.java b/providers/null/src/main/java/org/onosproject/provider/nil/cli/CreateNullDevice.java
index dc1ff92..acb9d22 100644
--- a/providers/null/src/main/java/org/onosproject/provider/nil/cli/CreateNullDevice.java
+++ b/providers/null/src/main/java/org/onosproject/provider/nil/cli/CreateNullDevice.java
@@ -17,6 +17,7 @@
 
 import org.apache.karaf.shell.commands.Argument;
 import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
 import org.onlab.util.Tools;
 import org.onosproject.net.Device;
 import org.onosproject.net.DeviceId;
@@ -59,6 +60,15 @@
             required = false)
     String locType = GEO;
 
+    @Option(name = "-I", aliases = "--id", description = "Device identifier")
+    String id = null;
+
+    @Option(name = "-H", aliases = "--hw", description = "Hardware version")
+    String hw = "0.1";
+
+    @Option(name = "-S", aliases = "--sw", description = "Software version")
+    String sw = "0.1.2";
+
     @Override
     protected void execute() {
         NullProviders service = get(NullProviders.class);
@@ -70,13 +80,14 @@
         }
 
         CustomTopologySimulator sim = (CustomTopologySimulator) simulator;
-        DeviceId deviceId = sim.nextDeviceId();
+        DeviceId deviceId = id == null ? sim.nextDeviceId() : DeviceId.deviceId(id);
         BasicDeviceConfig cfg = cfgService.addConfig(deviceId, BasicDeviceConfig.class);
         cfg.name(name);
         setUiCoordinates(cfg, locType, latOrY, longOrX);
 
         Tools.delay(10);
-        sim.createDevice(deviceId, name, Device.Type.valueOf(type.toUpperCase()), portCount);
+        sim.createDevice(deviceId, name, Device.Type.valueOf(type.toUpperCase()),
+                         hw, sw, portCount);
     }
 
 }
