Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2005

    HTTP Connection issue

    I have a Midlet connecting to a server using a http url. And it gives me a symbian error -33. The midlet is running on a 6600 device.

    A part of the code has been given below.

    public HttpConnection setupGetConnection(String url)throws IOException


    HttpConnection c = null;

    Log.println("c.setup starting "+c);

    c = (HttpConnection)Connector.open(url,Connector.READ,false);

    Log.println("c.setup opened "+c);

    // Set the request method and headers


    c.setRequestProperty( "User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0");



    c.setRequestProperty( "Connection","close");

    Log.println("c.setup complete "+c);

    return c;


    public void registerId() throws Exception


    HttpConnection c = null;

    InputStream is = null;

    DataInputStream dis = null;

    OutputStream os = null;

    int rc;

    c = setupGetConnection(REGISTERID_URL);

    Log.println("registerId() connected: " + c);

    // Getting the response code will open the connection,

    // send the request, and read the HTTP response headers.

    // The headers are stored until requested.

    rc = c.getResponseCode();

    The application hangs at the last line shown and subsequently returns a -33 error.

    Here is what has been done to troubleshoot the problem.

    1. Using the nokia browser i have been able to access the specified URL. Thus we know that the GPRS connection is working.
    2. I have had the same application (using sockets connection to send and receive messages) working just fine.
    3. Yet the http connection does not work properly now but used to work fine previously with a diffrent set of network settings.

    The servlet code has been given below, it only returns a string like 42

    System.out.println("RegisterIdServlet.doGet() reqUrl: "
    String host = request.getRemoteHost();
    System.out.println("RegisterIdServlet.doGet() host: "+host);
    String userId = remoteStub.registerId();
    System.out.println("RegisterIdServlet.doGet()() userid: "+userId);
    PrintStream out = new PrintStream(response.getOutputStream());

    Any help would be appreciated. I cannot think of how to proceed from this point onwards becuse this seems to be an impossible situation to get stuck in.


    Akhil Srinivasan

  2. #2
    Regular Contributor
    Join Date
    Aug 2005

    Re: HTTP Connection issue

    HI! I'm new in symbian, and I found your post very informative.. would you mind if you help or teach me...

    I have a simple question about how to connect to the internet..

    You see, I need to send a simple message to a website and also receive message from a website... how can i accomplish this things? By the way, I need to use GPRS connections...


  3. #3
    Registered User
    Join Date
    Sep 2005

    Re: HTTP Connection issue

    SymbianOS error -33 is a timeout. As far as I can tell it means you do not have a route to the specified internet resource.

    I am having a similar issue. I cannot make a connection to my web server from my simple Java test app on a 6600. I am a US T-Mobile customer using T-Zones.

    I tried using a socket connection instead of an HTTPConnection but that didn't work either. Still get a timeout. And I've tried the other Access Points that are configured on my phone (MMS) with the same result.

    My thinking now is that my T-Zones web access does not allow me access to internet resources outside their "allowed" ones. This seems odd (since I used T-Zones in the download manager to download my app from my web site; and its a page on the same web site I can't access from Java) but possible.

    So now I am trying to get set up on a different plan with T-Mobile, one that allows full Internet access. But T-Mobile is telling me I can't sign up for an all-data plan on the 6600!! This is all so unbelievably frustrating.

    In any case, you might try other Access Points -- or another carrier!!

Similar Threads

  1. Close HTTp Connection in N6230i
    By cars2004 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-06-24, 09:29
  2. 6820 http connection issue
    By jennydeng in forum Mobile Java General
    Replies: 0
    Last Post: 2004-09-30, 03:44
  3. HTTP connection on 6310i, 7650, 9210 and in sony-ericsson p800
    By mika1982 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2003-07-24, 16:44
  4. HTTP Connection issue on 7650
    By colinarmstrong in forum Mobile Java General
    Replies: 18
    Last Post: 2003-04-18, 20:54
  5. 6310i http connection issue
    By cmscs in forum Mobile Java General
    Replies: 1
    Last Post: 2003-02-06, 21:06

Posting Permissions

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