Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2006

    Http connection works initially, hangs after a while - Nokia Series 60

    Hello all,

    I am having a strange problem using http connection on nokia series 60 phones - Nokia 6600,6670. I am developing an application that uses http connection to issue some HTTP POST requests to my server and get some xml data from there and display it on the mobile phone.

    As I launch my application, and try to connect it to the server, http connection works perfectly fine initially. But if I don't issue http requests for a while- say 5 minutes, gprs connection hangs. I have to exit the application and then relaunch the application, after that http connection works fine again for sometime.

    I initially thought its a phone problem, since the application was working perfectly on other phones - sony Ericsson, Motorola. But then I tried using a different wireless carrier on Nokia 6600 phone. I am based in India, earlier I was using Airtel and then I switched to Hutch. And with Hutch GPRS plan, I experienced no problems on Nokia Series 60 phones. But the Airtel GPRS plan, caused HTTP to hang after some time on Nokia Series 60 phones but the same Airtel GPRS data plan works perfectly on Sony-Ericsson or Motorola phones.

    Is it something to do with any GPRS settings on Nokia phones or a specific way to make HTTP requests?

    I am using the mechanism below to do HTTP requests:

    HttpConnection httpconnection = (HttpConnection) Connector.open(url);
    "Profile/MIDP-1.0, Configuration/CLDC-1.0");
    httpconnection.setRequestProperty("Connection", "close");

    // post data
    OutputStream outputstream = httpconnection.openDataOutputStream();
    byte []data = postData.getBytes();
    for(int i=0; i< data.length;i++){

    // read data
    InputStream is = new DataInputStream(httpconnection.openInputStream());
    int resCode = httpconnection.getResponseCode();
    networkData = new byte[1024];
    StringBuffer buffer = new StringBuffer();
    int length = 0;
    while ((length = is.read(networkData, 0, 1024)) != -1) {
    String str = new String(networkData, 0, length);

    System.out.println("Data " +buffer);

    // finally block to close streams and connection

    I have tried various combinations of doing HTTP requests, but nothing helps. It will be great if someone can provide some insight into it..


  2. #2
    Registered User
    Join Date
    Jul 2006

    Re: Http connection works initially, hangs after a while - Nokia Series 60

    Solution I have:
    Normally when you browser through your mobile ,you connect through Access Point or Access Point Name(APN).these normally connect to WAP sites and you browse through them.
    When you want to access your own server (or servlets) from the j2me MIDlet suite you have to have the Access Point Setting to internet access.This you have to get the settings from the service provider of the mobile connection you are using. I am in India and using Hutch so I activated HUTCH_WWW ie "HUTCH ACCESS" Service.

    If this seeting is done your Httpconnection will work fine.
    Hope people who face similar problem will find this helpful.

    If problem persists then please contact me at vw_india@hotmail.com

    Vishwajeet Wadhwa

  3. #3
    Registered User
    Join Date
    Oct 2006

    Re: Http connection works initially, hangs after a while - Nokia Series 60


    I have the same issue, Its working fine with the HUTCH, but when I change this to Airtel, BPL its not working, do u have any idea,

    Thanks & Regards


Similar Threads

  1. Nokia 7270 HTTP Connection
    By mshita in forum Mobile Java General
    Replies: 1
    Last Post: 2005-08-24, 19:42
  2. Socket connection hangs on 9500 but works well in the WTK 2.2 emulator
    By falconpl in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-07-30, 21:38
  3. Nokia 6600 , HTTP POST hangs
    By dany_flo in forum Mobile Java General
    Replies: 0
    Last Post: 2004-01-29, 13:17
  4. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  5. 7650 Http Connection Works! Source Code Example
    By sjwilks in forum Mobile Java General
    Replies: 3
    Last Post: 2003-02-10, 14:50

Posting Permissions

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