Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent Connectivity with US Modem #1

Open
codepoet80 opened this issue Nov 26, 2015 · 3 comments
Open

Intermittent Connectivity with US Modem #1

codepoet80 opened this issue Nov 26, 2015 · 3 comments

Comments

@codepoet80
Copy link

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.

BadGoodConnectionLog.txt

Starlancer-RageQuit.txt

@codepoet80
Copy link
Author

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.

@Kazade Kazade reopened this Dec 13, 2015
@Kazade
Copy link
Owner

Kazade commented Dec 13, 2015

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?

@codepoet80
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants