Accessing the Internet From a Blackberry Simulator

I had to work on a project recently which involved accessing a web page from a blackberry device. In order to know what it will look like exactly, I decided to write the page software on my machine, and use a Blackberry simulator from Research In Motion to pull up the page so I’ll know how it will look on the client phones.




Downloading the simulator was easy! You can get the Blackberry Simulator software here. But I ran into an issue: I couldn’t access the internet! All I would see when I opened the browser and tried to access a webpage was a “Requesting…” progress bar at the bottom. No internet access!

I would then receive the message “Unable to connect to the selected Mobile Data Service, please try again later.”

blackberry_nointernet

No Internet On The Simulator!

After a little bit of research I determined that what I needed is the “Blackberry Email and MDS Services Simulator.” You can download the MDS Services Simulator here. I downloaded and installed the simulator, but then I ran into another problem.

Error on the MDS Simulator

Error on the MDS Simulator

The internet on my blackberry simulator still was not working. I looked through the MDS output on the command prompt window, and I noticed an error: “java.net.BindException: Address Already In Use: JVM_Bind:8080″. Now, if you’ve read my sockets tutorial network primer, you know that a port can only be bound for listening once. So apparently I had another process on my PC which was bound to listen on port 8080.

So how can I tell which process was running on 8080? I stopped IIS, restarted MDS but I still got the error. I know from working in IT for so long, however, how I can tell what process is using what port.

Pull up a command prompt window and type the command:

C:\> netstat -a -b

You will get output like the image below. As you can see, there is a java process already using port 8080. All I did from there was kill that java process using the Task Manager, and restarted MDS.

java8080

Java.exe is LISTENING on port 8080.

Restarting MDS and the Blackberry Simulator after killing that java process made the blackberry simulator work. I was connecting to the internet just fine.

The simulator can hit the internet.

The simulator can hit the internet.


Follow Dave on Twitter
  1. ad says:

    and what if you are behind a corporate proxy?

  2. Dave Andrews says:

    Unfortunately I did not have a problem with that. When I got it working, it just used the network connection available on my computer. I would think that if you have a valid connection going, then it will just roll through that.

  3. Danny says:

    The way technology is going everything is out of date in weeks (at least that’s what it feels like!).

  4. Barron says:

    Dave thanks for documenting this! Such a big help.

  5. Riley Carter says:

    The Blackberry is the best gadget that i ever received as a gift from my best friend. It has nice features and the design looks very cool too.

  1. There are no trackbacks for this post yet.

Leave a Reply