Installing BlackBerry Simulator for Mobile Web Testing

| | Comments (21)

In order to accurately test mobile websites on a variety of devices, you either need to buy a bunch of phones (if you’re a big developer and can afford it), or go the cheap route and rely on device simulators from the manufacturers. In order to better understand how Cantoni.mobi looks and behaves, I’m going to install all the major simulators I can find and document the steps along the way.

To get rolling with the testing of BlackBerry devices, we’ll start at the BlackBerry Developer Program and find the page for BlackBerry Developer Tools.

There are two different software packages we’ll need. First is the Device Simulator:

Use BlackBerry Device Simulators to demonstrate and test how the BlackBerry® Device Software, screen, keyboard and trackwheel/trackball will work with your application. These simulators will also simulate behavior in various wireless network conditions.

Second is the MDS Services:

The BlackBerry Email and MDS Services Simulator Package can emulate certain aspects of the BlackBerry Enterprise Server. When used in conjunction with a BlackBerry Device Simulator, users can simulate browsing web content, sending and receiving email or application data traffic.

The MDS Services software is needed to simulate a network connection, which we’ll need for testing mobile browsing. Without it, your simulated BlackBerry has no network access.

Next we’ll proceed to downloading the latest Device Simulator. Each phone/carrier combination you want to test is a separate download. In my case I’m testing with the 8830 on Sprint and the 8300 without a carrier. Download these .exe files and run them, installing into the default folders.

Next we’ll need to download the Email and MDS Services Simulator package. This download required me to create a free registration with the BlackBerry developer program. (While installing this package, it warned me that I needed a newer Java development kit installed, but I deselected that prerequisite and continued on without it. If you do run into problems, you might in fact need a recent JDK.)

After the packages are installed, we can fire up the simulator:

  1. Bring up an Explorer window and navigate to the “Research in Motion” folder under Program Files
  2. Go into the “Email and MDS Services” folder, then the “MDS” folder, then double-click on run.bat
  3. Go back up and into the “Device Simulators” folder, then a device folder (like “8830-Sprint”), then double-click on the device batch file (like “8830-Sprint.bat”)

Wait a minute for the simulator to start running, then start using your new phone!

Some tips and tricks:

  • Bring up the simulator help content (F1) to get familiar with the UI and keyboard controls
  • Keep the LCD on (menu View | Keep LCD On)
  • Save or copy the screen as an image (Edit menu)
  • Zoom in (View | Zoom) or go full-screen (F11) for presentations

That last tip made me realize this simulator would be great for any sort of demo, hack, or presentation. Instead of fumbling with an ELMO, you can run your demo from this simulator on your laptop.

 

8830

21 Comments

Hello.
I followed your instructions to test but it seems that the MDS Service is not launched.

When i click on run.bat of MDS, I 've got a MS-DOS Command which disappears 1s after.
I just can see some java description but i can't see precisely what it talks about.

Do you have a notification that MDS is launched or something like that ?

Fads,

You need to upgrade your java.

This is very helpful indeed.

One additional thing to note though, if you've already installed Java, yet the MDS still doesn't find it, you may wanna edit the "run.bat" file to ensure that JAVA_HOME is pointing to the correct path of your JDK.

or you can add the line "set JAVA_HOME=C:\Program Files\Java\JDK", or the path where your JDK is located.

You'll know it works, when you run MDS, and the cmd window stays open showing log texts. You can then open your simulator to test.

Hello! Just been trying to get a Blackberry simulator up and running so I can see what my website looks like on it.
I've followed your instructions above, however the BB does not seem to be able to connect to the network. Is there a step I'm missing? Do I need to do some kind of configuration so that the BB knows to use the MDS server for internet access?

I have the simulator and MDS running fine. But is there a way to save the settings and any applications I am testing after I shut it down? When I fire it up the next day, I have to change the settings and add back in the apps I am testing.

Thanks! I followed your steps and things worked great!!

OK java is not runing
have the s2se version 5 install on computer
but

run,bat says
if ["%JAVA_HOME%"] == ["C:\Program Files\Java\JDK"] goto noJavaHomeSet

I try to edit the mds run.bat in vista program files (x86)

to
if ["%JAVA_HOME%"] == [""] goto noJavaHomeSet

and notepad save says can not create the c:\[program files (x86) Research In Motion .............run.bat file.
make sure that the path and file name are correct

OK is this a vista security thing


Thank you for the detailed instructions. I was pulling out my hair until I found your site.

If others are having problems or questions, here are some more details based on what I did as of today (Feb '09).

I downloaded and installed the GlassFish App Platform + JDK from Java. There was no need to use the start the server option at the end of installation.

I then followed the directions in the post above to first open the MDS Service (which opens up a command window) followed by the Device Simulator (which opens a 2nd command window and the simulator).

Hi

Useful link.........made my emulator work.

Thanks a lot

I have followed all of the steps above carefully and still do not have a connection for my simulator. Everything works fine except the browser.

Any suggestions are much appreciated.

I have (possibly) the same problem as Mike above. I start the MDS simulator, and I know it is running, becuase I can connect to localhost port 8080 using Internet Explorer and get a MDS status page back.

I can also start the BB device simulator. However, whenever I open the browser and navigate to a web page, it just says:

'Unable to connect to the selected Mobile Data Service.'

I've tried all kinds of web addresses, including localhost:80

Is there some magic extra step that I've missed?

Don't think it is a firewall issue because IE7 can connect fine, as described above. We don't use a proxy server.

The simulator help menu reports the following version details:

About - BlackBerry Smartphone Simulator
---------------------------------------
BlackBerry Smartphone Simulator 2.9.0.61
Special thanks to the wxWidgets, C++ Boost, and PortAudio projects.
© 1997-2008 Research In Motion Limited

Any suggestions greatly appreciated.


Similar to Mike and Stuart above, I also cannot access web pages via the simulator's browser.

However, the message I receive from the simulator is:

    HTTP Error 400: Bad Request
    The server could not understand the page request, or was unable to process it
    for some reason. Please try loading a different page.

I'm using BlackBerry Device Simulator 2.7.0.48 and BlackBerry Email and MDS Services Simulators 4.1.4.

Same here, no access to internet even though simulator; the msd server is running and I can connect to it through IE. Any idea what's up?

Thanks for the tutorial!

Chrelad

I got it working by removing all the *.dmp files from the simulator directory.

Hopefully this will help other people here :D

Chrelad

OH, my god! Chrelad you are truly a savior!

I pulled my hair out for this, and the solution is so simple!

Yup, guys, confirm it works after deleting the freaking dmp files.

I am working on porting an app to a Blackberry. I downloaded the JDE 4.7 and Sun J2SE 5 SDK as required by the JDE 4.7. That worked fine and I was able to create a simple app and debug it using the Blackberry simulator.

From this site I realized that I was missing another simulator, "Blackberry MDS Simulator", in order to gain network access to download audio or video files.

http://na.blackberry.com/eng/developers/resources/devtools.jsp

I was given the choice between "Blackberry MDS Services" and "Blackberry MDS Runtine". I choose "Blackberry MDS Services".

It requires MS SQL which I downloaded and configured.

The simulator downloads and the install proceeds until the MDS services simulator attempts to connect to the SQL database. The MDS install fails because it cannot connect to the database. According to the SQL log, the DB open fails:

2009-08-29 15:12:03.96 Logon Error: 18456, Severity: 14, State: 38.
2009-08-29 15:12:03.96 Logon Login failed for user 'sa'. Reason: Failed to open the explicitly specified database. [CLIENT: 127.0.0.1]

I am suspect that the DB has not been created with a schema. I cannot seem to find a DB set up script in any of the blackberry documentation.

Any thoughts?

Fixed. I can now browse from my simulated Blackberry, including when kicked off from my JDE.

I just needed to find "Email and MDS Services Simulator" rather than "Blackberry MDS Simulator" from
http://na.blackberry.com/eng/developers/resources/devtools.jsp

Craig

Mine seems to be working for some versions of blackberry but not with all.I leave my MDS running always while trying to work with different versions.So it has nothing to do with running the MDS Simulator.Can anyone help me with this?I spent nearly 4 hours now but not ablt to figure it out.

Greatly appreciate any of your help.

I get a msg "Unable to connect with MDS Service while trying with 8130 v4.5.77"

But perfectly working with 8330 v4.5.66 and many other models.

Removing .dmp files worked for me. It seems that the .dmp files are effectively configuration files. As I had started the simulator prior to starting the MDS emulator (at first) it created those files setup for a non-existent service. Deleting the dmp files, started MDS emulator and then the simulator (and letting it recreate the .dmp files) worked for me.

FINALLY, deleting .dmp files.

Why can't blackberry make a freaking simple website that allows us to actually figure out how to use their simulators.

talk about wasting a day on their crappy products.

Anyone know if mutiple BB simulators can run concurrently?

About

This is the personal website of Brian Cantoni. All opinions on this site are my own.

Contact email: brian at cantoni.org

Day job: Yahoo! Developer Network

Ligit Search

Creative Commons License
This weblog is licensed under a Creative Commons License.