private static void initPhidget(RFIDPhidget rfid) {
		rfid.addAttachListener(new AttachListener() {
			@Override
			public void attached(AttachEvent ae) {
				try {
					((RFIDPhidget) ae.getSource()).setAntennaOn(true);
					((RFIDPhidget) ae.getSource()).setLEDOn(false);
				} catch (PhidgetException ex) {
				}
				System.out.println("attachment of " + ae);
			}
		});

		rfid.addDetachListener(new DetachListener() {
			@Override
			public void detached(DetachEvent ae) {
				System.out.println("detachment of " + ae);
			}
		});

		rfid.addErrorListener(new ErrorListener() {
			@Override
			public void error(ErrorEvent ee) {
				System.err.println("error event for " + ee);
			}
		});

		rfid.addTagGainListener(new TagGainListener() {
			@Override
			public void tagGained(TagGainEvent oe) {

				Vector<String> params = new Vector<>();
				params.add(SENSOR_ID);
				params.add("");
				params.add(EVENT_TAG_GAINED + " " + oe.getValue());
				try {
					if (server == null) {
						System.out
								.println("Server not yet ready, trying again..");
						Thread.sleep(500);
						if (server == null) {
							System.err.println("Server is gone!!");
							System.exit(0);
						}
					}
					server.execute("SensorPort.notify", params);
				} catch (Exception e) {
					System.err.println("XMLRPC Error:" + e.getMessage());
				}

				System.out.println("RFIDSensor: Tag Gained: " + oe.getValue()
						+ " (Proto:" + oe.getProtocol() + ")");
				try {
					blink(((RFIDPhidget) oe.getSource()));

				} catch (PhidgetException | InterruptedException e) {
					System.err.println(e);
				}
			}

			/**
			 * Executes a blink pattern
			 * 
			 * @param rfid
			 *            current RFID Phidget
			 * @throws PhidgetException
			 * @throws InterruptedException
			 */
			private void blink(RFIDPhidget rfid) throws PhidgetException,
					InterruptedException {
				rfid.setLEDOn(true);
				Thread.sleep(200);
				rfid.setLEDOn(false);
				Thread.sleep(100);
				rfid.setLEDOn(true);
			}

		});
		rfid.addTagLossListener(new TagLossListener() {
			@Override
			public void tagLost(TagLossEvent oe) {
				Vector<String> params = new Vector<>();
				params.add(SENSOR_ID);
				params.add("");
				params.add(EVENT_TAG_LOST + " " + oe.getValue());
				try {
					server.execute("SensorPort.notify", params);
				} catch (XmlRpcException | IOException e) {
					System.err.println("XMLRPC Error:" + e.getMessage());
				}

				try {
					((RFIDPhidget) oe.getSource()).setLEDOn(false);
				} catch (PhidgetException e) {
				}
				System.out.println("RFIDSensor: Tag Lost: " + oe.getValue()
						+ " (Proto:" + oe.getProtocol() + ")");
				System.out.println();
			}
		});

		rfid.addOutputChangeListener(new OutputChangeListener() {
			@Override
			public void outputChanged(OutputChangeEvent oe) {
				System.out.println(oe);
			}
		});
	}