dreampi
dreampi copied to clipboard
Intermittent Connectivity with US Modem
Discussed at length on AssemblerGames, but adding here for tracking. There seems to be timing issues when using a US Dreamcast modem that reduce the odds of a successful connection to about 1 in 3. Some games (Maximum Pool, 4x4 Evo, Starlancer) won't accept even a successful connection, and hang up immediately after connection (rage quit). Logs attached.
Resolved by expanding the response detection evaluation to include partial strings: "ER" instead of "ERROR" or "CO" instead of "CONNECT" since random new-line characters were seen in modem responses and screwing up the string comparison.
This is still an issue. 0.98 had code to strip newlines and buffered the output - I don't suppose you could print out the buffer variable when the timeout exception is thrown?
I'm not sure exactly which is the buffer variable, but I modified the end of send_command, thusly:
if (datetime.now() - start).total_seconds() > timeout: logger.info("Last string in buffer...") logger.info(line) raise IOError("There was a timeout while waiting for a response from the modem")
And get this output when a connection fails...
Last string in buffer... ATACO Something went wrong... Traceback (most recent call last): File "./dreampi.py", line 368, in main return process() File "./dreampi.py", line 345, in process modem.answer() File "./dreampi.py", line 247, in answer self.send_command("ATA") File "./dreampi.py", line 278, in send_command raise IOError("There was a timeout while waiting for a response from the modem") IOError: There was a timeout while waiting for a response from the modem
Another attempt looked like this:
Last string in buffer... ATAC Something went wrong... Traceback (most recent call last): File "./dreampi.py", line 368, in main return process() File "./dreampi.py", line 345, in process modem.answer() File "./dreampi.py", line 247, in answer self.send_command("ATA") File "./dreampi.py", line 278, in send_command raise IOError("There was a timeout while waiting for a response from the modem") IOError: There was a timeout while waiting for a response from the modem