×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    5

    Java Coding Problems with AT commands?

    .........
    protected void converse() throws IOException {
    String resp;// the modem response.
    // Send the reset command
    send("ATZ");
    expect("OK");
    send("ATDT" + number);
    expect("OK");
    try {
    Thread.sleep(5000);
    } catch (InterruptedException e) {
    // nothing to do
    }
    is.close();
    os.close();
    }
    }


    Cant seem to get it right to send sms through. ATD + number works but there is no ring tone on my phone and the receiver cannot hear.

    Further to that, I was wondering how AT+CMGS works for this code segment. I tried but then the response is always wrong. It works on Hyperterminal. My guess is that there are some hidden characters in it.

    Whats the character for Ctrl-Z when i need to send it as a String to the Serial Port?


    Thanks and Regards
    Niversphere.

  2. #2
    Registered User
    Join Date
    Jul 2006
    Posts
    5

    Re: Java Coding Problems with AT commands?

    I solved it regarding the sms problem.

    Thanks for viewing,.


    Cheers
    Niversphere

  3. #3
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: Java Coding Problems with AT commands?

    Niversphere, can you post a description how you solved the sms problem. Some others might be interested to see that.

    Hartti

  4. #4
    Registered User
    Join Date
    Jul 2006
    Posts
    5

    Re: Java Coding Problems with AT commands?

    ..........

    send("AT+CMGS=17\n");
    expect(">");
    send("0011000A915612345680000FF04D4F29C0E\n");
    expect("0011000A915612345680000FF04D4F29C0E\n");
    expect("+CMGS: 0\n");
    expect("OK");

    ....

    00 11 00 0A 91 5612345678 00 00 FF 04 D4F29C0E

    00 : use of the service center number stored in the phone
    11 : user data header
    00 : message reference number, phone decides
    0A: length of the phone number in this case , 5612345678 = 0A( 10 in decimal)
    5612345678: Phone number represented in semi-octet format.actually phonenum is 6521436587
    00: protocol identifier
    00: data coding scheme
    ..And there is no timestamp for my phone. In its place was the FF.
    04:The length of the PDU
    * note : When using the 7-bit data coding scheme, the user data length is the amount of characters(septets) and not the amount of octets.
    (That part got me confused for a while.)



    The character represented ctrl-z is . Had a hard time trying ^z and such.


    Cheers
    Niversphere.

  5. #5
    Registered User
    Join Date
    Apr 2007
    Posts
    12

    Re: Java Coding Problems with AT commands?

    use this line of code after ur message is sent

    send("\032\r");
    expect("OK");

    this should do.

Similar Threads

  1. Java API for AT Commands.
    By coolcheena in forum General Development Questions
    Replies: 0
    Last Post: 2004-01-20, 22:35
  2. Problems installing Nokia developers suite with JBuilder 8 Personal
    By maaberge in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2003-04-05, 00:42
  3. insert SMIL coding into java
    By Land96 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2002-08-26, 07:16
  4. insert SMIL coding into java
    By Land96 in forum General Messaging
    Replies: 0
    Last Post: 2002-08-24, 03:22
  5. Problems with running SDK Java examples
    By ask_expert in forum Mobile Java General
    Replies: 1
    Last Post: 2002-05-08, 16:40

Posting Permissions

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