Sorry about the red box, but we really need you to update your browser. Read this excellent article if you're wondering why we are no longer supporting this browser version. Go to Browse Happy for browser suggestions and how to update.

Installing and configuring simulators to support the BBM SDK

To test your BlackBerry Messenger connected app, you must install and configure the BlackBerry MDS Simulator and the BlackBerry Smartphone Simulator with settings that enable communication between the BlackBerry MDS Simulator and two instances of the BlackBerry Smartphone Simulator.

Set up Java environment variables

Before you begin: Verify that you are running the 32-bit version of the Java SE Development Kit (JDK).
  1. In Windows, open the Environment Variables dialog.
  2. Set the JAVA_HOME environment variable to the directory where you installed the the JDK, for example: C:\Program Files\Java\jdk1.6.0_24. In 64-bit Windows, the default path is C:\Program Files(x86)\Java\jdk1.6.0_24.
  3. In the PATH environment variable, add %JAVA_HOME%\bin; to the beginning of the string.
  4. Click OK to save and close the Environment Variables dialog.
  5. Verify that your environment variables are set correctly.
    1. Open a command prompt.
    2. Type java -version and verify that the Java version is the same as the version that you set in the environment variable:
      java version "1.6.0_24"
      Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
      Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
      

Set up an unlimited strength encryption policy

Before you begin: Verify that you are running the 32-bit version of the Java SE Development Kit (JDK).

You must live in an eligible country to enable this functionality.

  1. Download the jce_policy-6.zip file from the Oracle website at http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html.
  2. Extract the contents of the jce_policy-6.zip file to your computer.
  3. In the directory of the system JDK (for example, C:\Program Files\Java\jre1.6.0_24\jre\lib\security), replace the files local_policy.jar and US_export_policy.jar in the security folder. For more information, see Set up Java environment variables

Install and run the BlackBerry MDS Simulator

Before you begin: Complete the task, Set up an unlimited strength encryption policy.
  1. In the folder where you extracted the BlackBerry Messenger SDK, open the MDS simulator folder.
  2. Extract the contents of the MDSv3.5.3.zip file.
  3. Open the sdk > mds folder.
  4. Double-click run.bat to launch the BlackBerry MDS Simulator.
After you finish:

If you are running the BlackBerry MDS Simulator and the BlackBerry Smartphone Simulator on separate computers, in the rimpublic.property file (by default, located in C:\Program Files\Research In Motion\BlackBerry JDE 6.0.0\MDS\config), change the UDP.send.host value to the IP address of the computer running the BlackBerry MDS Simulator.

Install the BlackBerry Smartphone Simulator package

  1. In the folder where you extracted the BlackBerry Messenger SDK file, open the BlackBerry smartphone simulator folder.
  2. Double-click the BlackBerry_Simulators_<version>_<model>.exe file.
  3. Complete the instructions on the screen. After you finish installing the BlackBerry Smartphone Simulator package, two .bat files, sim1.bat and sim2.bat , are available in the folder in which you installed the BlackBerry Smartphone Simulator package. These .bat files launch two instances of the BlackBerry Smartphone Simulator. These instances communicate with each other over the BlackBerry Messenger platform using the BlackBerry MDS Simulator running on the same computer. To learn how to run the BlackBerry Smartphone Simulator instances and the BlackBerry MDS Simulator on separate computers, see Configuring the BlackBerry Smartphone Simulator.

Configuring the BlackBerry Smartphone Simulator

If you want to run the BlackBerry Smartphone Simulator without launching the two .bat files that are bundled with the BlackBerry Messenger SDK .zip file, you can create your own .bat files that specify the following parameters to support the BlackBerry Messenger SDK.

Parameter

Description

app-param=regDestIP

This parameter specifies the IP address of the computer running the BlackBerry MDS Simulator. If the BlackBerry MDS Simulator is running on the same computer as the BlackBerry Smartphone Simulator, specify 127.0.0.1.

app-param=regDestPort

This parameter should specify the default port, 19781. If you use a different value, make sure it is the same for every instance of the BlackBerry Smartphone Simulator.

app-param=DisableSyncServiceRecord

This parameter must be specified to make PIN-to-PIN communication between devices possible. If you have run the BlackBerry Smartphone Simulator without specifying this parameter in the past, in the BlackBerry Java Plug-in for Eclipse, click BlackBerry > Clean Simulator to delete the file system and remove the SYNC service record from the previous instance.

session

The session number must be unique for each instance of the simulator.

app-param=regSrcPort

The port number must be unique for each instance of the simulator.

pin

This parameter must be 0x2100000 or greater and unique for each instance of the simulator.

Example

The following example demonstrates how to run two instances of the BlackBerry Smartphone Simulator using the same instance of the BlackBerry MDS Simulator. Create a .bat file with the following contents to launch each custom BlackBerry Smartphone Simulator instance:

Simulator 1 .bat file contents:

@echo off
fledge.exe /app=Jvm.dll /handheld=9800 /session=Sim1 /app-param=JvmAlxConfigFile:9800.xml /data-port=0x4d44 /data-port=0x4d4e /pin=0x2100000A /app-param=regVersion=3 /app-param=regDestIP=127.0.0.1 /app-param=regDestPort=19781 /app-param=regSrcPort=19780 /app-param=DisableSyncServiceRecord

Simulator 2 .bat file contents:

@echo off
fledge.exe /app=Jvm.dll /handheld=9800 /session=Sim2 /app-param=JvmAlxConfigFile:9800.xml /data-port=0x4d44 /data-port=0x4d4e /pin=0x2100000B /app-param=regVersion=3 /app-param=regDestIP=127.0.0.1 /app-param=regDestPort=19781 /app-param=regSrcPort=19782 /app-param=DisableSyncServiceRecord