*/
	public UrpPkg displayReciveInfoByte(final DatagramSocket socket,
			UrpPkg sendPkg,int timeout) {

		if (sendPkg.getCmdFlag() == Command.ACK_FLAG) {// ACK message need not
														// to wait feedback from
														// detector
			return null;
		}
		byte[] buffer = new byte[1024];
		DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
		logger.debug("waiting to receive data...");
		int urpRetry = timeout>100000?1:5;
		boolean found = true;
		boolean ack = false;
		while (urpRetry > 0) {
			try {
				socket.setSoTimeout(timeout);
				socket.receive(packet);
			} catch (IOException ex) {
				urpRetry--;
				logger.error("no data received \n" + ex + ", retry receive:"
						+ urpRetry);
				// ex.printStackTrace();
				continue;
			}

			byte data[] = packet.getData();
			InetAddress address = packet.getAddress();
			UrpPkg replyPkg = decodeFromDetector(data, data.length,
					address.getHostAddress(), packet.getPort());
			if (replyPkg.getCmdFlag() == 1) {// ack flag
				found = false;
				ack = true;
				logger.debug("got ACK Packet data, re-receive...");
				if (sendPkg.getSeqID() == replyPkg.getSeqID()) {
					found = true;
				}
				continue;
			}
			if (!found) {
				continue;
			}

			if (ack && found) { // got data and need ack reply
				UrpPkg ackpkg = new UrpPkg();
				ackpkg.setSeqID(replyPkg.getSeqID());
				ackpkg.setCmdFlag(Command.ACK_FLAG);
				// sent ack message => hi,detector,i got the data.
				send(address.getHostAddress(), packet.getPort(), ackpkg, false);
			}

			return replyPkg;
		}
		return null;

	}