}
if (first==1) {
CoapClient clientPing = new CoapClient(uri);
System.out.println("===============\nCC31\n---------------");
if (!clientPing.ping(2000)) {
System.out.println(uri + " does not respond to ping, exiting...");
System.exit(-1);
} else {
System.out.println(uri + " reponds to ping");