Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Mobile / Blackberry

Accessing the Internet from a Blackberry Simulator

5.00/5 (2 votes)
31 Dec 2011CPOL2 min read 23.9K  
How to access 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.”

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.

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″. This is because a port listening on a socket 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 worked in IT for a long time and know that you can see what processes are using certain ports with a simple command.

Pull up a command prompt window and type the command:

C:\> netstat -a -b

You will get output which shows the running processes and their ports. You’ll probably find an application which is using port 8080 already. All I did from there was kill that process using the Task Manager, and restarted MDS.

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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)