public void open() throws IOException
	{
		try
		{
			CommPortIdentifier pid = CommPortIdentifier.getPortIdentifier(comm);
			CommPort p = pid.open(this.getClass().getName(), 2000); //timeout of 2 milliseconds
			
			if (p instanceof SerialPort)
			{
				port = (SerialPort)p;
				
				//set up the port
				port.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
				
				port.enableReceiveTimeout(100);
				
				tx = port.getOutputStream();
				rx = port.getInputStream();
				
				//System.out.printf("avail1 %d\n", rx.available());
				
				//write P to put controller into program mode
				//and grab the response...this will allow us to continue if it is 
				//already in program mode
				tx.write('P');
				tx.flush();
				
				try
				{
					Thread.sleep(100);
				}
				catch (InterruptedException ie) {}
				
				System.out.printf("avail %d\n", rx.available());
				rx.skip(rx.available());
				byte[] firmware = this.getFirmwareVersion();
				if (firmware[0] != 0x01 && firmware[1] != 0x01)
				{
					throw new IOException("Firmware version is not v1.1");
				}
			}
			else
			{
				throw new IOException("Port is not a serial port: " + comm);
			}
		} 
		catch (PortInUseException piue)
		{
			throw new IOException("The port is in use.");
		}
		catch (NoSuchPortException nspe)
		{
			throw new IOException("Port not found:  "+ comm);
		}
		catch (UnsupportedCommOperationException ucoe)
		{
			throw new IOException("Serial Port cannot be set to the proper mode for RC communication.");
		}
	}