I have a device that establishes PPP connection (or incoming connection in terms of Windows) through null-modem cable and then communicates with PC using TCP sockets API.
The problem is that all works fine on WindowsXP but does not work on Windows7. As far as I understand there are some troubles with establishing PPP connection because it doesn't get to TCP socket connection.
Here is handshake procedure log (from communication cable properties in device manager) on WindowsXP:
10-27-2011 14:37:04.342 - Recv: CLIENT
10-27-2011 14:37:04.342 - Interpreted response: Ring
10-27-2011 14:37:04.357 - TSP(0000): LINEEVENT: LINE_NEWCALL
10-27-2011 14:37:04.357 - TSP(0000): LINEEVENT: LINECALLSTATE_OFFERING
10-27-2011 14:37:04.357 - TSP(0000): LINEEVENT: LINEDEVSTATE_RINGING(0x1)
10-27-2011 14:37:04.545 - Recv: CLIENT
10-27-2011 14:37:04.545 - Interpreted response: Ring
10-27-2011 14:37:04.545 - TSP(0000): LINEEVENT: LINEDEVSTATE_RINGING(0x1)
10-27-2011 14:37:04.545 - TSP(0000): Accepting Call
10-27-2011 14:37:04.545 - TSP(0000): LINEEVENT: LINECALLSTATE_ACCEPTED
10-27-2011 14:37:04.545 - TSP(0000): Answering Call
10-27-2011 14:37:04.545 - Answering the call.
10-27-2011 14:37:04.545 - Send: CLIENTSERVER
10-27-2011 14:37:04.545 - Connection established at 115200bps.
10-27-2011 14:37:04.545 - Error-control off or unknown.
10-27-2011 14:37:04.545 - Data compression off or unknown.
and on Windows7:
10-27-2011 13:27:30.447 - Recv: CLIENT
10-27-2011 13:27:30.447 - Interpreted response: Ring
10-27-2011 13:27:30.647 - Recv: CLIENT
10-27-2011 13:27:30.647 - Interpreted response: Ring
10-27-2011 13:27:30.847 - Recv: CLIENT
10-27-2011 13:27:30.847 - Interpreted response: Ring
10-27-2011 13:27:30.847 - Answering the call.
10-27-2011 13:27:30.857 - Send: CLIENTSERVER
10-27-2011 13:27:30.857 - Connection established at 115200bps.
10-27-2011 13:27:30.857 - Error-control off or unknown.
10-27-2011 13:27:30.857 - Data compression off or unknown.
10-27-2011 13:27:32.415 - Hanging up the modem.
10-27-2011 13:27:32.416 - Hardware hangup by lowering DTR.
10-27-2011 13:27:32.416 - 115200,8,N,1, ctsfl=1, rtsctl=2
10-27-2011 13:27:32.416 - Initializing modem.
10-27-2011 13:27:32.416 - Waiting for a call.
I was assuming that some needed Windows services were stopped but couldn't find which services exactly need to be started and at the first look the same services were started in both cases.
So, does anyone know what the problem is and how can I fix it?
The problem can be fixed by manually editing the rasphone.pbk file on the computer and changing the Type value to 3 (3=RASET_Direct (Direct serial or parallel connection.)) instead of 1 (1=RASET_Phone (Phone line, for example, modem, ISDN, X.25)). Apparently this is a bug in windows 7 that depends on the device.
The rasphone.pbk file can be found by opening up an explorer window and typing the following into the address bar:
%userprofile%\AppData\Roaming\Microsoft\Network\Connections\Pbk\
The rasphone.pbk file should be in that folder.