×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2004
    Location
    Turkey
    Posts
    16

    How to hang up phone call? Urgent for senior project!

    Hi i am establing a serial port connection from my PC to Nokia 6230 via COM4 and i am calling a number, during the call(whan the remote phone is ringing) i want to hang up the call but sending ATH command does not hang up the call! where i am wrong please help me with my project!

    Code:
    Code:
        public void call(String number,int milisecodstoclose)
        {
            try
            {
                String response = null;
                System.out.println("Calling..."); 
                System.out.println ("1: "+response);
                serialDriver.send("+++ATD"+number+";\r");
                Thread.sleep(200);
                response = serialDriver.getResponse();
                System.out.println ("2: "+response);
                Thread.sleep(milisecodstoclose);
                serialDriver.send("+++ATH\r");
                Thread.sleep(2000);
                response = serialDriver.getResponse();
                System.out.println("3: " + response);
                Thread.sleep(20000);
            }
            catch (Exception ex)
            {
                ex.printStackTrace();
            }
        }

    Output:
    1: OK
    2: OK
    3: OK

  2. #2
    Regular Contributor
    Join Date
    Nov 2004
    Posts
    153
    Hi,

    i tried these commands in symbian C++

    For Intializing--> _LIT8(x,"ATZ \x00D");

    For diailing ---> _LIT8(x1,"ATD04030795193; \x00A \x00D");

    For Hanging the call---> _LIT8(x2,"ATH \x00A \x00D");

    Try out if these commands help you in writing the similar code in java.

    Cheers,
    Sunil

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×