AT Hangup Command

Login to reply to this topic.
Fri, 2006-03-17 18:22
Joined: 2005-05-19
Forum posts: 45
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


Mon, 2006-03-20 21:45
Joined: 2005-05-19
Forum posts: 45
Re: AT Hangup Command
Okay... so I think I figured out my problem.... before the two modems have completed the connection process, the RCall::HangUp() function does not appear to work on the 6600... but I can sent a direct AT command (ATH) and hangup the call.  After the modems have connected completely, the AT command does not work...as it is looked at as data and sent over the line...but the RCall::HangUp() function WILL work at this point, so.. here is the code that does work.... for both situations...

   // 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

  • Login to reply to this topic.