def setup_modem(self): # we use Modem here only for reading the modem information, not for parsing. # reading the bytes from serial (after initial connect) is not done using Modem but overridden here modem = Modem(self.config.device, self.config.rate, None) self.serial = modem.dev self.modem_uid = modem.uid modem.stop_reading() # so we can read the serial stream ourself