diff --git a/bundles/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/device/connector/DSMRSerialConnector.java b/bundles/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/device/connector/DSMRSerialConnector.java index 16e1743057440..62462583438f3 100644 --- a/bundles/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/device/connector/DSMRSerialConnector.java +++ b/bundles/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/device/connector/DSMRSerialConnector.java @@ -155,8 +155,16 @@ public void open(DSMRSerialSettings portSettings) { serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); - serialPort.enableReceiveThreshold(SERIAL_TIMEOUT_MILLISECONDS); - serialPort.enableReceiveTimeout(SERIAL_TIMEOUT_MILLISECONDS); + try { + serialPort.enableReceiveThreshold(SERIAL_TIMEOUT_MILLISECONDS); + } catch (UnsupportedCommOperationException e) { + logger.debug("Enable receive threshold is unsupported"); + } + try { + serialPort.enableReceiveTimeout(SERIAL_TIMEOUT_MILLISECONDS); + } catch (UnsupportedCommOperationException e) { + logger.debug("Enable receive timeout is unsupported"); + } // The binding is ready, let the meter know we want to receive values serialPort.setRTS(true); if (!serialPortReference.compareAndSet(oldSerialPort, serialPort)) {