AT Hangup Command
| Fri, 2006-03-17 18:22 | |
|
|
Folks, quick question. I have an application that makes a CSD connection between two phones. During the connection process, before both modems report CONNECT, I can issue a +++ and then an ATH to force the modem to hang up the call. Once both phones have connected and report a CONNECT 9600 message, then any attempts to send +++ and ATH to the modem is ingored be the modem and set to the other side of the connection.... I have included the necessary guard time as well as the \r\n characters, but it still just sends the characters over the pipe. Anybody have any advice on how to get the modem back into command mode and tell it to hang up the line? Thaks "If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein |






Forum posts: 45
// if we are connecting....
if( iConxState == EConnecting )
{
// put modem in command mode and hangup
#ifndef __WINS__
TRequestStatus status;
iComPort.Write(status, KP2pmModemCommandState);
User::WaitForRequest(status);
User::After(KP2pmWaitTime);
iComPort.Write(status, KP2pmModemReset);
User::WaitForRequest(status);
User::After(KP2pmWaitTime);
iComPort.Write(status, KP2pmModemHangup);
User::WaitForRequest(status);
#else
iConxState=EIdle;
WaitForConnection();
#endif
__LOGMSG(_L("CEng::Disconnect(EConnecting)"))
}
else
{
// in the connected state....this will disconnect the
// call and hangup the line... we are put in an idle state
// after this returns....
iCallManager->Cancel(); //... this calls iCall->HangUp() in the
// do cancel function of the call manager
// active object.
// so now lets go back to waiting for a connection
iConxState=EIdle;
WaitForConnection();
}
"If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein