Adjustments to ZigbeeTest and Python files to use just 1 port for shooting Zigbee...
[iot2.git] / benchmarks / other / ZigbeeTest / ZigbeeTest_multipurpose.java
index a9298cd..8265f6b 100644 (file)
@@ -28,10 +28,13 @@ public class ZigbeeTest_multipurpose implements SmartthingsSensorCallback {
         message += "port: " + "5957\n";  // port number
         message += "device_address_long: " + DEVIDE_MAC_ADDRESS + "\n";
         DatagramPacket sendPacket = new DatagramPacket(message.getBytes(), message.getBytes().length, InetAddress.getByName("192.168.2.227"), 5005);
-        DatagramSocket socket = new DatagramSocket(11111);
+        //DatagramSocket socket = new DatagramSocket(11111);
+               DatagramSocket socket = new DatagramSocket(12345);
         socket.setSendBufferSize(4096);
         socket.setReceiveBufferSize(4096);
         socket.send(sendPacket);
+               socket.setReuseAddress(true);
+        socket.close();
 
         IoTDeviceAddress zigUdpAddr  = new IoTDeviceAddress("192.168.2.227", 5957, 5005,false,false);
         IoTZigbeeAddress zigAddrLong = new IoTZigbeeAddress(DEVIDE_MAC_ADDRESS);