private static KNXNetworkLink connectBySerial(String serialPort) throws KNXException {
try {
RXTXVersion.getVersion();
return new KNXNetworkLinkFT12(serialPort, new TPSettings(true));
} catch(NoClassDefFoundError e) {
throw new KNXException("The serial FT1.2 KNX connection requires the RXTX libraries to be available, but they could not be found!");
} catch(KNXException knxe) {
if(knxe.getMessage().startsWith("can not open serial port")) {
StringBuilder sb = new StringBuilder("Available ports are:\n");