Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6318691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:40:12+00:00 2026-05-24T15:40:12+00:00

I have some code to connect to the internet, it works fine in the

  • 0

I have some code to connect to the internet, it works fine in the simulator
but when I try it on a real device, I always get a 400 http response code
(the response body says “Connection timed out”)

I’m using JRE 5
and using Blackberry 9000 on OS version 5 for both the real device and the simulator.

It is activated according to Advanced Options > Enterprise Activation
Is there something else I need to change on the real device to make it work?

I slowly whittled down my code to get to the root of the issue
and I’m down to this code:

package mypackage;

import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;

import net.rim.device.api.io.transport.TransportInfo;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.container.MainScreen;

public class MyApp extends UiApplication {
    public static void main(String[] args) {
        MyApp theApp = new MyApp();
        theApp.enterEventDispatcher();
    }

    public MyApp() {
        pushScreen(new SimpleScreen());
    }
}

class SimpleScreen extends MainScreen {
    public SimpleScreen() {
        this.setTitle("Hello");
        ConnectionThread ct = new ConnectionThread();
        ct.start();
    }
}

class ConnectionThread extends Thread {
    private static String url = "http://www.wikipedia.org/";
    public void run() {

        System.out.println(" -- ConnectionThread.run()");
        System.out.println(" ---- MDS hasSufficientCoverage? " + TransportInfo.hasSufficientCoverage(TransportInfo.TRANSPORT_MDS));
        try {
            HttpConnection httpConn;
            httpConn = (HttpConnection) Connector.open(url);

            final int iResponseCode = httpConn.getResponseCode();
            UiApplication.getUiApplication().invokeLater(new Runnable() {
                public void run() {
                    Dialog.alert("Response code: " + Integer.toString(iResponseCode));
                }
            });

        } catch (Exception e) {
            System.err.println("Caught IOException: " + e.getMessage());
        }

        System.out.println(" -- /ConnectionThread.run()");
    }
}

==============================================

// EDIT:
I’m pretty sure its a device config issue now, I just the Network Diagnostic Tool and it also returns a 400 HTTP Response with the message “connect timed out”.

==============================================

//EDIT #2:
I just tried options->mobile network->diagnostics test
Here are the results:

ICMP Ping Echo: No
------
Blackberry Registration: Yes
Connected to Blackberry: Yes
Blackberry PIN-PIN: Yes
------
Server Name: <my enterprise server>
Email Address: <my email>
Connected to <my email>: Yes

Then I tried options->mobile network->tools->ping

and pinged google and wikipedia and both say A network error occurred

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T15:40:13+00:00Added an answer on May 24, 2026 at 3:40 pm

    I asked the BES Admin and he says its Docomo issue.. and he has taken it up with them.

    Basically there’s no code problem (as far as I can tell)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.