def open(self):
try:<EOL><INDENT>self.device.open()<EOL><DEDENT>except ConnectTimeoutError as cte:<EOL><INDENT>raise ConnectionException(cte.msg)<EOL><DEDENT>self.device.timeout = self.timeout<EOL>self.device._conn._session.transport.set_keepalive(self.keepalive)<EOL>if hasattr(self.device, "<STR_LIT>"):<EOL><INDENT>del self.device.cu<EOL><DEDENT>self.device.bind(cu=Config)<EOL>if not self.lock_disable and self.session_config_lock:<EOL><INDENT>self._lock()<EOL><DEDENT>
Open the connection with the device.