BlackBerry Smartphone Simulator

  • About the BlackBerry Smartphone Simulator
  • Starting the BlackBerry Smartphone Simulator
  • Using the BlackBerry Smartphone Simulator graphical user interface
  • Using the BlackBerry Smartphone Simulator input controls
  • Using the BlackBerry Smartphone Simulator to perform common tasks
  • Using the advanced BlackBerry Smartphone Simulator features
  • Simulating device operating conditions
  • Testing BlackBerry applications with the BlackBerry Smartphone Simulator

Copyright © 2008 Research In Motion Limited | Support | BlackBerry


About the BlackBerry Smartphone Simulator

The BlackBerry Smartphone Simulator enables you to run BlackBerry device applications on your computer.

The BlackBerry Smartphone Simulator includes the BlackBerry device applications that are typically available on BlackBerry devices and enables you to load and test your own applications. You can simulate and test various connectivity and state changes using the BlackBerry Smartphone Simulator. When you use the BlackBerry Smartphone Simulator to perform testing, you might need to simulate additional BlackBerry services. The BlackBerry MDS Simulator and the BlackBerry email server simulator are available for this purpose.

See "Simulating the BlackBerry MDS Connection Service" for more information.

See "Testing messaging applications" on page 33 for more information.


Set BlackBerry device profiles

By default, after you specify the BlackBerry device model, the BlackBerry Smartphone Simulator runs using the configuration options that are typical for that BlackBerry device. However, you can manually set or change many of the configuration options, such as the screen size, the communication port numbers, and the locale.

Configuration method

Description

From the BlackBerry Integrated Development Environment (BlackBerry IDE)

You can configure many of the simulator options from the BlackBerry IDE interface and save them as a new device simulator profile. See the BlackBerry Integrated Development Environment Online Help for more information about setting and saving BlackBerry Smartphone Simulator options using the BlackBerry IDE.

From the command prompt

You can use command prompt options to set how the BlackBerry Smartphone Simulator operates. At the command prompt, type fledge /help.

Set BlackBerry device profiles using the BlackBerry Smartphone Simulator launcher

  1. In the BlackBerry Smartphone Simulator directory, double-click the fledgelauncher.exe file.
  2. In the Launch Simulator, perform the following actions:

    Task

    Steps

    Create a new profile.

    1. In the drop-down list, select Create a new simulator profile.
    2. In the Software version drop-down list, select the software version.
    3. In the Handheld model drop-down list, select the BlackBerry device you want to use.
    4. In the Profile name field, type a name for this profile.
    5. Click Configure.
    6. In the Edit simulator profile dialog box, on the Hardware tab, specify the hardware settings for this BlackBerry Smartphone Simulator.
    7. On the Network tab, specify the network settings.
    8. Onthe Advanced tab, specify advanced settings such as LCD timeout, and add command line arguments for the BlackBerry Smartphone Simulator.
    9. Click OK.

    Edit an existing profile.

    1. In the drop-down list, select Manage existing simulator profiles.
    2. In the Profile list, select the profile you want to edit.
    3. Click Edit.
    4. In the Edit simulator profile dialog box, change the settings.
    5. Click OK.

    Copy an existing profile.

    1. In the drop-down list, select Manage existing simulator profiles.
    2. In the Profile list, select the profile you want to copy.
    3. Click Copy.

    Rename an existing profile.

    1. In the drop-down list, select Manage existing simulator profiles.
    2. In the Profile list, select the profile you want to rename.
    3. Click Rename.
    4. Type a new name.
    5. Press ENTER.

    Delete an existing profile.

    1. In the dropdown list, select Manage existing simulator profiles.
    2. In the Profile list, select the profile you want to delete.
    3. Click Delete.


Starting the BlackBerry Smartphone Simulator

The BlackBerry® Smartphone Simulator is available either as a part of the BlackBerry® Java® Development Environment or as a standalone installation of the BlackBerry simulator package. Visit www.blackberry.com/developers for more information about downloading the BlackBerry Smartphone Simulator.


Start the BlackBerry Smartphone Simulator from the BlackBerry Smartphone Simulator launcher

  1. In the BlackBerry Smartphone Simulator directory, launch fledgelauncher.exe.
  2. In the drop-down list, select Launch a simulator.
  3. In the Profile list, select the profile.
  4. Click Go.


Start the BlackBerry Smartphone Simulator from the BlackBerry JDE

  • On the taskbar, click Start > Programs > Research In Motion > BlackBerry JDE 4.6.x > Device Simulator


Start the BlackBerry Smartphone Simulator from a Simulator Package

  • On the taskbar, click Start > Programs > Research In Motion > BlackBerry Smartphone Simulators 4.3.x > Device Simulators 4.3.x > <device_name>.


Start the BlackBerry Smartphone Simulator from the command prompt

  • At the command prompt, type:

fledge /handheld=<model_number>

Start the BlackBerry Smartphone Simulator and open a web page

  • At the command prompt, type:

fledge /handheld=<model_number> /app-param=url: <URL> /app=jvm.dll

Redirect debug messages to a specifed file

  • At the command prompt, type:

fledge /handheld=<model_number> /app-param=JvmDebugFile:<file_name>


Using the BlackBerry Smartphone Simulator graphical user interface

Copyright © 2008 Research In Motion Limited | Support | BlackBerry


Viewing or hiding the BlackBerry device image

By default, the BlackBerry® Smartphone Simulator displays the BlackBerry device image. You can hide the BlackBerry device image so that only the LCD screen is visible.

Hide the BlackBerry device image

  • On the View menu, click LCD Only.


View the BlackBerry device image in full-screen mode

Full-screen mode allows you to maximize the view of the BlackBerry® Smartphone Simulator. You can view either the full BlackBerry device image or only the LCD image in full-screen mode. Since the BlackBerry Smartphone Simulator only uses integral multiples of the simulated LCD's resolution, different screen resolution settings may result in full-screen images that cover a larger percentage of the computer screen.

  • On the View menu, click Full Screen.

Access menu options in Full-Screen mode

You can access the menu items on the BlackBerry® Smartphone Simulator's menu items by moving the mouse to the top of the computer screen. The menu appears when the cursor is near the top of the computer screen.

Exit Full-screen mode

  • On the View menu, click Full Screen.

If you are viewing the LCD screen in full-screen mode, the LCD screen stretches to its optimal zoom-level and is padded with a black background. If you view the BlackBerry® device image in full-screen mode, the BlackBerry device image is centered and is padded with a white background.


Change the size of the BlackBerry device image

  1. On the View menu, click Zoom.
  2. Click a percentage.

    Note: The percentage value determines the pixel-to-pixel ratio between the simulated LCD screen and the computer screen. For example, at 200 percent zoom level, 4 pixels on the monitor display 1 pixel of the simulated LCD screen.

Smooth the pixels on the magnified BlackBerry device image

To smooth the pixelated, magnified BlackBerry device image,

  • On the View menu, click Smooth Magnified LCD.


Capture screen shots

The BlackBerry® Smartphone Simulator can save an image of the BlackBerry that you simulate device including the LCD screen, or the LCD screen only.

Save a screen shot

  • On the Edit menu, click Save Device Snapshot or Save LCD Snapshot.

By default, the BlackBerry® Smartphone Simulator saves the screen shot as the most suitable file type for the content of the image. The BlackBerry Smartphone Simulator saves a screen shot of the BlackBerry device image as a .jpg file, and a screen shot of the LCD as a .png file. You can override the default if you click Browse and set a different file type in the Save as type field.

Copy a screen shot to the clipboard

  • On the Edit menu, click Copy Device Snapshot or Copy LCD Snapshot.


Using the BlackBerry Smartphone Simulator input controls

Copyright © 2008 Research In Motion Limited | Support | BlackBerry


Simulate the trackwheel and keys

Use the BlackBerry® Smartphone Simulator trackwheel to simulate using the trackwheel on a BlackBerry device.

Note: Not all BlackBerry devices have all the keys listed

  • To navigate between fields, icons, and menu items, roll the trackwheel.
  • To set a field or select a menu item, click the trackwheel.

The BlackBerry Smartphone Simulator assigns BlackBerry Wireless Handheldfunctionality to the following computer keyboard and mouse procedures:

Task

Keyboard steps

Mouse steps

Roll the trackwheel.

Press the UP ARROW or DOWN ARROW key.

Roll the mouse wheel button.

Click the trackwheel.

Press the LEFT ARROW key.

Click the mouse wheel button.

Press the Escape key.

Press ESC or the RIGHT ARROW key.

Click the right mouse button.

Turn on BlackBerry device backlighting.

Press PAGE DOWN.

Click the Power button on the BlackBerry Smartphone Simulator keyboard.

Press the Symbol key.

Press DELETE.

Click the Symbol key on the BlackBerry Smartphone Simulator keyboard.

Press the Alt key.

Press CTRL.

Click the Alt key on the BlackBerry Smartphone Simulator keyboard.

Press the BlackBerry device keys.

Press the keys on your computer keyboard.

Click the keys on the BlackBerry Smartphone Simulator keyboard.

Press the phone/PTT
(Push-to-TalkTM) button.

Press PAGE UP.

-

If you press a key on your computer keyboard that does not have directly correspond to a key on the BlackBerry device (such as the number or symbol keys), the BlackBerry Smartphone Simulator inserts the character as it appears on the computer keyboard.
Copyright © 2008 Research In Motion Limited | Support | BlackBerry


Simulate the trackball

Simulate convenience keys® device simulator trackball to simulate using the trackball on a BlackBerry device.

Use the BlackBerry® Smartphone Simulator trackball to simulate using the trackball on a BlackBerry device.

  • To navigate between fields, icons, and menu items, roll the trackball.
  • To select a field or a menu item, click the trackball.

BlackBerry Smartphone Simulators for BlackBerry devices that support the trackball assign the BlackBerry Wireless Handheldkeyboard and mouse actions to the following BlackBerry Wireless Handheldfunctionality

Task

Keyboard steps

Mouse steps with trackball mode on

Mouse steps with trackball mode off

Turn trackball mode on or off.

Press F12.

  1. On the Edit menu, click Map Middle Mouse Button > Toggle Trackball Mode.
  2. Click the middle mouse button.
  1. On the Edit menu, click Map Middle Mouse Button > Toggle Trackball Mode.
  2. Click the middle mouse button.

Click the trackball.

Press F9.

Click the left mouse button.

Click the middle mouse button on the trackball.

Roll the trackball.

Press the arrow keys.

Move the mouse.

Click and drag the mouse on the trackball.

Press the Escape button.

Press ESC.

Click the right mouse button.

Click the right mouse button on the trackball.

:

Note: Rolling the mouse wheel generates trackwheel rolls not trackball rolls. Although the BlackBerry Smartphone Simulator will appear to be receiving trackball rolls, it is actually a trackwheel event.


Simulate convenience keys

Some BlackBerry Smartphones contain additional keys that are not present on other BlackBerry models. The BlackBerry Smartphone Simulator assigns the device keys to the following computer keyboard procedures:

Active Key

Steps

Front Convenience key

Press Insert.

Side Convenience key

Press PAGE UP.

Currency symbol key (BlackBerry 8700 0nly)

Press F5.

Speaker phone key (BlackBerry 8700 0nly)

Press F6.


Simulate multi-function keys

Active Key

Steps

Menu key

Press Insert.

Right Side Convenience key

Press \.

Left Side Convenience key

Press PAGE UP.

Volume Up key

Press F8

Volume Down key

Press F7.


Assign a key to the Escape key

BlackBerry® Smartphone Simulators for BlackBerry devices that do not support the trackball enable you to map the cursor key to the Escape key.

  1. On the Edit menu, click Map Cursor Key to Escape.
  2. Select Left or Right.


Using the BlackBerry Smartphone Simulator to perform common tasks

Copyright © 2008 Research In Motion Limited | Support | BlackBerry


Simulate adding an address book contact

  1. Open Address Book.
  2. On the Address Book menu, click New Address.
  3. Type contact information in the appropriate fields.
  4. Open the menu.
  5. Click Save.


Simulate adding a calendar entry

  1. Open Calendar.
  2. In the Calendar menu, click New.
  3. Type appointment information in the appropriate fields the New Appointment screen.
  4. Open the menu.
  5. Click Save.


Simulate composing an email

  1. Open Messages.
  2. In the Messages menu, click Compose Email.
  3. In the To field, type an email address.
  4. Set the Cc, Subject, and Body fields.
  5. Open the menu.
  6. Click Save Draft.

The BlackBerry® email server simulator is required to simulate sending an email message. See "Simulating sending and receiving messages" on page 33 for more information.


Simulate an incoming phone call

  1. On the Simulate menu, click Incoming Voice Call.
  2. In the New Incoming Call dialog box, for the originating phone number, type a new phone number or the phone number of an existing contact.
  3. Set one of the following Caller ID options:

    Option

    Description

    Allowed

    The BlackBerry® device can display the phone number of the originating phone.

    Private

    The phone number of the originating phone is blocked and not available for display on the BlackBerry device.

    Unknown

    The BlackBerry device cannot determine the phone number of the originating phone.

  4. To place the phone call to the BlackBerry Smartphone Simulator, click Create Call.
  5. Click Answer or Ignore.
  6. End the call by performing one of the following actions:

    Task

    Steps

    Simulate the termination of the call by the originating phone.

    Click Disconnect.

    Simulate a network failure.

    Set a reason for failure. Click Fail.


Simulate an outgoing phone call

  1. Open Call Log.
  2. In the Call Log menu, click Call From Address Book.
  3. In the Call field, type a new phone number or set a contact.
  4. Press the Enter key.
  5. Open the menu.
  6. Click Continue.
  7. In the Call to dialog box, perform one of the following actions:
    • Click Answer.
    • To simulate a failed connection, set a reason for failure. Click Fail.


Simulate Voice Activated Dialing

You must have a computer microphone connected to simulate Voice Activated Dialing.

  1. Click the VoiceActivatedDialing icon.
  2. When prompted, perform one of the following actions:

    Task

    Steps

    Make a phone call.

    1. Say "Call" and a contact name or number.
    2. When the BlackBerry® Smartphone Simulator prompts you to verify the phone number, perform one of the following actions:
      • Set the correct phone number from the list and click the trackball.
      • Say "Yes" when the BlackBerry Smartphone Simulator reads the correct phone number. Say "No" when the BlackBerry Smartphone Simulator reads an incorrect phone number. Say "Repeat" to hear the phone number again. Say "Cancel" if the correct phone number does not appear in the list.

    Check status of the device.

    Say "Check" and say one of the following:

    • "Battery"
    • "Coverage"
    • "My Phone Number"
    • "Signal strength"
    • "Status"
    Note: When you say "Check Status" the BlackBerry Smartphone Simulator displays the status of battery, coverage, and signal strength.

    Turn voice prompts on or off.

    If prompts are turned on:

    Say "Turn prompts off".

    If prompts are turned off:

    Say "Turn prompts on".


Using the advanced BlackBerry Smartphone Simulator features

Copyright © 2008 Research In Motion Limited | Support | BlackBerry


Simulate sending an SMS text message

You can use the BlackBerry® Smartphone Simulator to simulate sending an SMS text message to a server side application. Verify that you have installed the BlackBerry Java Development Environment.

  1. Click the Call Log icon.
  2. Type the destination phone number for the SMS text message.
  3. Open the menu.
  4. Click SMS <number>.
  5. Type your message.
  6. Open the menu.
  7. Click Send.


Simulate taking a picture with a webcam

Before you begin: Make sure your webcam is connected and functioning properly. If the Blackberry Smartphone Simulator does not detect a connected webcam, a prompt appears and you can select a picture file from your hard drive.

  1. Click the Camera icon.
  2. If prompted, to save pictures to the media card on the BlackBerry Smartphone Simulator , click Yes. To save pictures to the BlackBerry Smartphone Simulator device memory, click No.
  3. To take a picture, click the trackball.
  4. Perform one of the following actions:

    Task

    Steps

    Take another picture.

    Click Take Another Picture.

    Set the picture as the caller ID picture.

    1. Click Set As.
    2. Click Set As Caller ID.
    3. In the Username field, type the user name.
    4. In the Domain field, type the domain.
    5. In the Password field, type the password.
    6. Click OK.

    Set the picture as your Home screen background.

    1. Click Set As.
    2. Click Set As Home Screen Image.

    Rename the picture.

    1. Click Rename Picture.
    2. In the Name field, type a new name.
    3. Click OK.

    Delete the picture.

    1. Click Delete Picture.
    2. Click Delete to confirm.

    Send the picture in an email message.

    1. Click Send Picture.
    2. Click Send As Email.
    3. Compose the email message.
      See "Simulate composing an email" for more information.


Simulate viewing a picture

When an application switches to camera viewfinder mode, the viewfinder displays the picture that you select using the Camera Image menu item. The viewfinder displays the file selector if no picture has been selected before. For best results, select an image of equal or greater resolution than the camera's maximum resolution of 1280 by 1024. If you select a picture with a higher resolution or different aspect ratio than the camera, the Camera application displays only the center of the picture.

  1. On the Simulation menu, click Camera Image.
  2. Select a .jpg file to view.

    Note: The last picture that you select becomes the default picture that is displayed the next time you start the Smartphone Simulator.


Simulate recording a video with a webcam

Before you begin: Make sure your webcam is connected and functioning properly. If the Blackberry Smartphone Simulator does not detect a connected webcam, a prompt appears and you can select a jpeg file from your hard drive. You can then click on the LCD an drag the image around to record the movements as a video.

  1. Click the Video Camera icon.
  2. If prompted, to save videos to the media card on the BlackBerry Smartphone Simulator , click Yes. To save pictures to the BlackBerry Smartphone Simulator device memory, click No.
  3. To start recording a video, click the trackball.
  4. To stop recording, click the trackball.


Simulate viewing a save video

  1. Click the Video Camera icon.
  2. Click the Menu key.
  3. Click View Videos.


Set video recording options

  1. Click the Video Camera icon.
  2. Click the Menu key.
  3. Click Options.
  4. Perform any of the following actions:

    Task

    Steps

    Set the video light.

    Specify the Video Light option.

    Set the color effect

    Specify the Color Effect option.

    Set the video resolution.

    Specify the Video Format action.


Simulate GPS coordinate changes with the BlackBerry device

You can simulate movement between fixed GPS locations, create and save several locations along a route. Once you save the route, run the simulation.

Locations

A location represents one endpoint of a path. A route can contain one or more paths. The BlackBerry® Smartphone Simulator emulates movement between locations on a route across one or more paths. You can create and save multiple locations that you can simulate.

Create a GPS location

  1. On the Simulate menu, click GPS Location.
  2. In the Location section, click Add.
  3. In the Name field, type a name.
  4. In the Latitude and Longitude fields, type a latitude and longitude.
  5. In the Altitude field, type an altitude.

    Note: The BlackBerry® Smartphone Simulator specifies the altitude in metres above (or below) the WGS84 ellipsoid. Visit http://w3sli.wcape.gov.za/Surveys/Mapping/wgs84.htm for more information.

  6. In the Satellites field, type the number of satellites that are visible from that location.
  7. Click Save.

Change the simulated location

  • In the Location drop down list, click a different location.

    Note: The valid range for latitude is -90 to 90. The valid range for longitude is -180 to 180.

Change a GPS location

  1. On the Simulate menu, click GPS Location.
  2. In the Location drop-down list, select a location.
  3. Click Edit and change the values in the appropriate fields.

    Note: Renaming a location will cause routes that contain that location to fail.

  4. Click Save.

Delete a GPS location

  1. On the Simulate menu, click GPS Location.
  2. In the Location drop-down list, click a location to delete.
  3. Click Delete.

Routes

To simulate movement between different GPS locations, set up a route with one or more paths. Each path represents a straight line between two adjacent locations. Each path contains information about the rate of speed used to travel between the path start and end locations.

Note: You can use the following rates of speed: metres per second (m/s), kilometres per hour (km/h), metres per hour (m/h), and feet per second (f/s). The speed limit in terms of metres per second is 655 m/s, with respective limits set for other rates.

Create a GPS route

  1. On the Simulate menu, click GPS Location.
  2. In the Route section, click Add.
  3. In the Create New Route dialog-box, perform one of the following actions:

    Task

    Steps

    Create a route using existing locations.

    1. Click existing locations.
    2. Type a name for the new route.
    3. Select the starting location of the route.
    4. Type a speed value and set the rate of speed for the path.
    5. Click Insert to insert this location into the route.
    6. To add additional locations to the route, repeat steps 3 through 5.
    7. Save the route.

    Create a route using a data file.

    1. Click data from a file.
    2. From the Import Route dialog-box, select a data file.
    3. Type a name for the data file.
    4. Save the route.

    Create a route using random data.

    1. Select Create route using random route generator.
    2. Click OK.
    3. In the new dialog, specify the route name, the number of legs, the duration of the route (in seconds), as well as a start and end location. If you generated the route successfully, the New Route dialog displays the route information that you typed in step 3.

Change a GPS route

  1. On the Simulate menu, click GPS Location.
  2. Set a route to change.
  3. Perform one or more of the following procedures:

    Task

    Steps

    Change the route name.

    In the Name field, type a new name for the route.

    Add a location to the route.

    1. Click Insert.
    2. In the Start Location drop-down list, click a location.
    3. Type a speed value and set the rate of speed for the path.

    Change a location.

    1. In the text box, under the Name field, set the location you want to change.
    2. In the Start Location drop-down list, click the location you want to change to.
    3. Type a speed value and set the rate of speed for the path.

    Remove a location.

    1. From the text box, under the Name field, set a location.
    2. Click Delete.
  4. Click Save.

Delete a GPS route

  1. On the Simulate menu, click GPS Location.
  2. In the Route drop-down list, click a route to delete.
  3. Click Delete.

Simulate a route

Route simulation uses the Haversine formula to calculate the changing GPS coordinates and updates the location, the direction, and the coordinates every second.

  1. On the Simulate menu, click GPS Location.
  2. Perform one of the following actions:

    Task

    Steps

    Play a route.

    In the Route section, click the Play (right arrow) icon.

    Stop a route.

    In the Route section, click the Stop (black square) icon.

    Tip: To restart the route, stop the simulation. Press the Play Route button.


Simulate a Bluetooth GPS receiver

A GPS receiver is a device that receives GPS information and transmits it to the BlackBerry® device through a Bluetooth® connection. To simulate a BlackBerry device that is close enough to a Bluetooth GPS receiver to receive data from the receiver, perform the following actions:

  1. On the Simulate menu, click GPS Location.
  2. Set Bluetooth GPS Receiver In Range.

    Note: Devices must be running applications with JSR179 in order for this functionality to work properly.


Simulating device operating conditions

Copyright © 2008 Research In Motion Limited | Support | BlackBerry


Simulate headset connections

Simulate headset connection

Task

Steps

Connect a single button headset.

  1. On the Simulate menu, click Headset Connected.
  2. In the Headset dialog box, select the One button headset inserted option.

Click the button on a single button headset.

In the Headset dialog box, click Click.

Connect a multibutton headset.

  1. On the Simulate menu, click Headset Connected.
  2. In the Headset dialog box, select the Multibutton headset inserted option.

Click a button on a multibutton headset.

Under the Multibutton headset inserted option, click one of buttons.

Disconnect the headset.

  1. On the Simulate menu, click Headset Connected.
  2. In the Headset dialog box, select the No headset option.

s

Copyright © 2008 Research In Motion Limited | Support | BlackBerry


Simulate holster conditions

When the BlackBerry® device is in the holster, the screen display turns off. By default, the BlackBerry device uses different notifications when in the holster.

Holster or unholster the BlackBerry Smartphone

  • On the Simulate menu, click In Holster.


Simulate a flipped device

When the BlackBerry® 8220 Smartphone is flipped, the screen display turns off. The BlackBerry device uses the flip screen to display notifications.

Flip the BlackBerry Smartphone screen

  • On the Simulate menu, click Flipped.


Simulate battery levels

Set the battery level

  1. On the Simulate menu, click Battery Properties.
  2. Set one of the following options:

    Option

    Description

    Full

    The battery level is sufficient for BlackBerry® device and network use.

    Low

    The BlackBerry device alerts the user, but remains turned on and can still use the network.

    Very Low

    The BlackBerry device cannot access the network, but the BlackBerry Wireless Handheldremains turned on.

    Camera flash is disabled.

    Dead

    The BlackBerry Wireless Handheldturns off immediately.

    Note: If you select this option, the BlackBerry Smartphone Simulator shuts down.

    Other

    This option enables you to specify the battery level as a percentage.


Simulate removing a SIM card

The BlackBerry® Smartphone Simulator for BlackBerry devices with SIM cards allow you to simulate the absence of a SIM card. By default, BlackBerry Smartphone Simulators simulate the SIM card being present.

  • At the command prompt, type the following command when you start the device:

fledge /handheld=<model_number> /no-sim-present


Simulate network coverage

The BlackBerry® Smartphone Simulator can simulate various states of network coverage, from a strong signal to a very weak signal. The BlackBerry Smartphone Simulator can also simulate a loss of network coverage.

Set the network signal strength

  1. On the Simulate menu, click Network Properties.
  2. Select the network you want to simulate from the Networks list.
  3. If you want to edit the network properties, click Edit and type new values. Click OK.
  4. Select or clear the In coverage check box.
  5. Move the Signal strength (RSSI) slide bar to set a value. The signal strength can be between -120 dBm and -40dBm.

Add a new network

  1. On the Simulate menu, click Network Properties.
  2. Click Add.
  3. Type the network properties in the dialog.
  4. Click OK.


Simulate supplementary services

A number of supplementary services, such as call forwarding or call waiting, might be available on a BlackBerry device. You can simulate the availability of these services. The BlackBerry® Smartphone Simulator is set up with all supplementary services by default.

Enable or disable a supplementary service

  1. On the Simulate menu, click Provision Supplementary Services.
  2. In the Supplementary Services Provisioned dialog box, enable or disable services.


Simulate flash memory

For each flash session, the BlackBerry® Smartphone Simulator creates several files named <session_name>*.dmp. Each .dmp file corresponds to a different region of flash memory. By default, the session name represents the model number of the BlackBerry Wireless Handheldthat you are simulating. For example, the flash session files for a BlackBerry 7100 series device simulator have names such as 7100-fs.dmp, 7100-nv.dmp, and 7100-as.dmp.

When the BlackBerry Smartphone Simulator starts, it loads the flash memory for the device profile; if no flash memory files exist, the BlackBerry Smartphone Simulator creates new files. When the BlackBerry Smartphone Simulator exits, it saves flash memory contents to the .dmp files.

The BlackBerry Smartphone Simulator saves changes to flash memory as you make them. To keep changes from overwriting the original file system, use the /load-filesystem=<session-name>-fs.dmp option. The file system will be saved to <session-name>-fs.dmp.

When you reset the flash memory, the BlackBerry Smartphone Simulator removes application data and clears the .dmp files for the session.

Note: To specify a unique session name, use the /session command prompt option.

Simulate resetting the flash memory

  1. Close the BlackBerry® Smartphone Simulator.
  2. Restart the BlackBerry Smartphone Simulator using the /clear-flash command prompt option. For example, type the following:

fledge /handheld=7730 /serial-port=2 /comm=serial /clear-flash

Note: See BlackBerry Integrated Development Environment Online Help for more information on how to set this option using the BlackBerry Integrated Development Environment.


Simulate a media card

The BlackBerry® Smartphone Simulator loads and saves the media card image to <session_name>*.sdcard in the working directory, unless you have set the /sdcard=<path> option. When the BlackBerry Smartphone Simulator starts, it loads the media card image for the BlackBerry device profile. If no image exists or you have specified /clear-sdcard, the BlackBerry Smartphone Simulator creates a new media card image when the BlackBerry Smartphone Simulator starts. The size of the media card image is 32MB, unless you specify otherwise using /sdcard-size=<size>.

Note: You must clear the existing card image using /clear-sdcard to create a new card with the specified size. If a media card image exists, its size will be retained even if you specify a different size using the /sdcard-size command.

The BlackBerry Smartphone Simulator inserts the media card when the BlackBerry Smartphone Simulator unless you specify /no-sdcard-inserted.

Simulate changing the media card

  1. On the Simulate menu, click Change SD Card.
  2. Click Open Battery Door.
  3. Perform one of the following actions:

    Task

    Steps

    Specify a new media card.

    In the Current SD Card list, specify a new microSD card from the list. To specify no card, select None.

    Add a media card to the Current SD Card list from a file.

    1. Click Add From File.
    2. Navigate to the location of the media card image file.
    3. Click the media card image file.
    4. Click Open.

    Create a new media card.

    1. In the Size (MB) field, specify the size (in MB) of the new media card.
    2. Click Create.
    3. Navigate to the location where you want to save the media card image.
    4. Click Save.

    Delete a media card

    1. In the Current SD Card list, click the media card.
    2. Click Delete.
  4. Click Close Battery Door.
  5. Click Close.


Simulate a computer connection

Use the BlackBerry® Smartphone Simulator to simulate a serial or USB connection between the BlackBerry Wireless Handheldand the BlackBerry Desktop Software. Typically, you simulate a serial port connection for BlackBerry devices that use a cradle, and a USB connection for BlackBerry devices that do not use a cradle.

After you set this option, you can perform any of the BlackBerry Desktop Manager operations, such as loading applications onto the BlackBerry device that you simulate.

Simulate a USB connection to the computer

  1. In the BlackBerry® Desktop Manager window, on the Options menu, click Connection Settings.
  2. In the Connection drop-down list, click USB.
  3. Click Simulation.
  4. To connect or disconnect the USB cable, set the USB cable connected option.

    Note: Simulating a USB cable connection enables you to connect the BlackBerry Smartphone Simulator to the BlackBerry Desktop Manager. This option is only available for BlackBerry device models that do not use a cradle. By default, the USB cable is not connected.


Simulate BlackBerry Enterprise Server API and IT Policies

To test applications that use BlackBerry® Enterprise Server Extension API, applied IT policies, email and browser messaging, HTTP/TCP connections, or push functionality, use the BlackBerry Smartphone Simulator to connect to an account on a BlackBerry Enterprise Server.

Note: The BlackBerry Smartphone Simulator requires the BlackBerry Enterprise Server, BlackBerry Desktop Manager and BlackBerry Device Manager must be version 4.0 or later.


Use the BlackBerry Smartphone Simulator in secure mode

By default, the BlackBerry® Smartphone Simulator does not check for required code signatures and it does not prompt you before connecting to the network. Before you deploy your application, test it in secure mode using the BlackBerry Smartphone Simulator.

Note: When you enable BlackBerry Smartphone Simulator security, you cannot use the .cod files that come with the BlackBerry Smartphone Simulator. You must use the .cod files that are installed on the actual BlackBerry device. To obtain the appropriate .cod files, copy BlackBerry device .cod files from your computer to the BlackBerry Smartphone Simulator installation folder.

(By default the installation folder exists in the following location: C:\Program Files\Common Files\Research In Motion\Shared\Loader Files\Handheld\Java)

Enable secure mode

  • Set the /secure option when you start the BlackBerry® Smartphone Simulator. For example type the following command:

fledge /handheld=7730 /secure


View the event log

The event log window displays information about events that occur between a simulated BlackBerry® device and its environment. The BlackBerry Smartphone Simulator logs event messages for events including when you simulate playing audio files, placing a phone call, and blinking the LED screen.

  • From the Tools menu, click Show Event Log.


Testing BlackBerry applications with the BlackBerry Smartphone Simulator

Copyright © 2008 Research In Motion Limited | Support | BlackBerry


Testing GPS applications using the BlackBerry Smartphone Simulator

You may test GPS applications using the BlackBerry® Smartphone Simulator. A GPS application on the BlackBerry Smartphone Simulator can access GPS data such as the direction, the speed, and the number of visible satellites (satellites provide GPS information). The GPS application the BlackBerry Smartphone Simulator and should function the same as when the GPS application runs on a BlackBerry device.

The currently simulated location determines the number of satellites that are visible. When you create a new location, the value you specify in the Visible satellites field becomes the default value for that field.


Testing MIDlets using the BlackBerry Smartphone Simulator

If the MIDlet is contained in .jad and .jar files, you need to convert these files to a .cod file before loading the .cod file to the BlackBerry® Smartphone Simulator. You can use the BlackBerry MDS Simulator to convert the .jad and .jar files to a .cod file.

  1. Place the .jad and .jar files on a web server.
  2. Start the BlackBerry MDS Simulator.
  3. Start the BlackBerry Smartphone Simulator.
  4. On the BlackBerry Smartphone Simulator screen, click the Browser icon.
  5. Use the browser to navigate to the location of the application .jad file.
  6. Download the .jad file to the BlackBerry Smartphone Simulator.

The BlackBerry Smartphone Simulator will automatically load the .cod file on start up.

See the BlackBerry Java Development Environment Development Guide for more information about converting .jad and .jar files.


Testing applications that require an HTTP connection

  • Simulating the BlackBerry MDS Connection Service
  • Configuring the BlackBerry MDS simulator


Simulating the BlackBerry MDS Connection Service

The BlackBerry MDS simulator is designed to simulate the BlackBerry MDS Connection Service component of the BlackBerry Enterprise Server. Using the BlackBerry Smartphone Simulator with the BlackBerry MDS simulator enables you to test network, push, and browser applications that are designed for use with a BlackBerry Enterprise Server. If you are testing applications that require an HTTP connection, you will require the BlackBerry Smartphone Simulator and the BlackBerry MDS simulator. The BlackBerry MDS simulator is available for download from the BlackBerry Developer Zone web site at http://www.blackberry.com/developers.


Starting the BlackBerry MDS Simulator

  • On the taskbar, click Start > Programs > Research In Motion > BlackBerry Email and MDS Services Simulators > MDS.


Testing that the BlackBerry MDS Simulator is running

  1. Start the BlackBerry Smartphone Simulator.
  2. In the BlackBerry Smartphone Simulator, open the BlackBerry Browser.
  3. Open the menu.
  4. Click Go To.
  5. Type http://www.blackberry.com/go/mobile/.
  6. Click OK.
    7. If the BlackBerry home page appears, the BlackBerry MDS simulator is working.
    If the browser cannot connect to the BlackBerry MDS simulator, verify that you started the BlackBerry MDS simulator.
    See Mobile Data Service Simulator does not launch for possible causes of the BlackBerry MDS Simulator not starting correctly and their resolutions.

Connect the BlackBerry Smartphone Simulator to BlackBerry Enterprise Server or a BlackBerry MDS simulator on the same computer

Due to a security enhancement in the MDS Connection Service, you must use the fully qualified computer name or IP address to establish a connection between a BlackBerry Smartphone Simulator and a BlackBerry Enterprise Server or a BlackBerry MDS Simulator that is installed on the same computer as the BlackBerry Smartphone Simulator.

Related topics
  • Using test scripts


Configuring the BlackBerry MDS simulator

The default values for the BlackBerry MDS simulator parameters are appropriate in most cases; however, you can change parameters to set the following features:

  • logging
  • HTTP support
  • HTTPS support
  • push support
  • email-to-PIN mappings.

    Note: In a production environment, the BlackBerry Enterprise Server system administrator sets the BlackBerry MDS Connection Service parameters using the BlackBerry device management software. Contact your system administrator for more information.


Set the BlackBerry MDS simulator properties

  1. In a text editor, open the rimpublic.property file from the Program Files\Research In Motion\BlackBerry Email and MDS Services Simulators 4.1.2\MDS\config\ folder.
  2. Configure the file settings as necessary.
  3. Restart the BlackBerry MDS simulator.


Logging

Property

Description

Default

Logging.file.log.level

Specify the type of information to record, if you enable logging:

  • 1 - logs information about events only, such as connection service start or stop
  • 2 - logs events and errors
  • 3 - logs events, errors, and warnings
  • 4 - logs events, errors, warnings and debug messages

4

Logging.console.log.level

Specify the type of information that appears in the console, if you enable logging. See the description for the Logging.level property.

4

application.handler.http.logging

Set to TRUE or FALSE to enable or disable HTTP standard logging (HTTP headers only).

FALSE

application.handler.http. logging.verbose

Set to TRUE or FALSE to enable or disable HTTP debug logging (HTTP data as well as headers). Set this parameter to TRUE only when necessary to debug a specific problem.

FALSE


HTTP properties

Property

Description

Default

application.handler.http.
CookieSupport

To enable the connection service to store cookies on behalf of the BlackBerry device, set this property to TRUE. To store cookies on the BlackBerry device, set this property to FALSE.

TRUE

application.handler.http.
AuthenticationSupport

Set to TRUE or FALSE to enable or disable storage of user authentication information.

TRUE

application.handler.http.
AuthenticationTimeout

If HTTP authentication is set to TRUE, specify the length of time (in milliseconds) before the authentication information becomes invalid. This timer resets whenever the user requests authentication information for a particular domain.

3600000

application.handler.http.device.
connection.timeout

Specify the length of time (in milliseconds) before a BlackBerry device connection attempt expires.

140000

application.handler.http.server.
connection.timeout

Specify the length of time (in milliseconds) before a server connection attempt expires.

150000

http.proxyHost

This is the HTTP proxy host name.

n/a

http.proxyPort

This is the HTTP proxy port number. This is also used by Sun implementations of HTTP URL connections.

n/a


HTTPS properties

Property

Description

Default

application.handler.https.
allowUntrustedServer

To enable the connection service to connect to untrusted servers, set this property to TRUE. To restrict access to trusted servers only, set this property to FALSE. A server is trusted if its certificate is installed on the BlackBerry MDS Server host machine.

FALSE

Parameter

Description

Default

application.handler.ldap.DEFAULT_SERVER

Specifies the default LDAP directory server to which to send LDAP queries

localhost

application.handler.ldap.DEFAULT_PORT

Specifies the default port to which BlackBerry MDS Services should send LDAP queries

389

application.handler.ldap.DEFAULT_QUERY

Specifies a default LDAP query

-

application.handler.ldap.DEFAULT_LIMIT

Specifies a default limit for the number of concurrent LDAP queries that BlackBerry MDS Services supports

20

application.handler.ldap.COMPRESSION

Specifies whether or not BlackBerry MDS Services supports compression of LDAP queries

TRUE

application.handler.ldap.logging

Specifies whether or not BlackBerry MDS Services logs all LDAP queries

FALSE

UDP.receive.port

Specifies the port on which to listen to receive UDP packets

19781

UDP.send.default.port

Specifies the default port on which to send UDP packets

19780

UDP.send.default.host

This parameter specifies the default host to which to send UDP packets.

This must be set to localhost.

localhost


Push support

Note: Do not change push application connection service properties.

Property

Description

Default

WebServer.listen.host

This property defines the computer on which the connection service listens for HTTP POST requests from push applications.

localhost

WebServer.listen.port

This property defines the port number on which the connection service listens for HTTP POST requests from push applications.

8080


Test push applications using the BlackBerry Smartphone Simulator

Configure the BlackBerry MDS Simulator to allow reliable push connections

To test reliable push applications, add information to the rimpublic.properties file.

  1. Open the rimpublic.property file.
  2. Add the following line to the file:
    3. push.application.reliable.ports=<####>,where <####> represents the port on which the BlackBerry device application listens for a push request.

    Note: The BlackBerry MDS Simulator supports pushing to multiple recipients using multiple email addresses or PIN numbers.

Assign the BlackBerry Smartphone Simulator PIN to the push application's email address

In a production environment, the BlackBerry Enterprise Server automatically maps user internet messaging addresses to the personal identification number (PIN) of their BlackBerry devices. Using the BlackBerry Smartphone Simulator, you can simulate the mapping between internet messaging addresses and PINs.

Note: You only need to set internet messaging address to PIN mappings if you are testing a push application. See the BlackBerry Application Developer Guide Volume 1: Fundamentals for more information.

  1. Open the rimpublic.property file.
  2. In the [Simulator] section, add or change entries.
    3. Entries have the following format:
    Simulator.<PIN>=<host>:<port>, <email_address>
    For example, the following entry assigns PIN 2100000a to email address user2100000a@pushme.com:
    Simulator.2100000a=localhost:81, user2100000a@pushme.com
  3. Change the email address so that when a push application sends data to the email address, pushed data is sent to the address of the specified BlackBerry Smartphone Simulator.

    Note: The default PIN for the BlackBerry Smartphone Simulator is 2100000a. You can change this setting using the /pin command prompt option.

Change the BlackBerry Smartphone Simulator PIN

  1. In the BlackBerry IDE, on the Edit menu, click Preferences.
  2. Click the Simulator tab.
  3. Click the General tab.
  4. In the PIN field, type the new PIN.

The port must match the value set in the IPPP.push.listen.tcp.port parameter. The default is 81.


Testing messaging applications

  • Simulating sending and receiving messages


Simulating sending and receiving messages

The BlackBerry email server simulator is designed to send and receive messages between the BlackBerry device simulator and either a messaging application, such as Microsoft® Outlook®, or POP3 and SMTP servers. You do not require a BlackBerry Enterprise Server. The BlackBerry email server simulator is available for download from the BlackBerry Developer Zone web site at http://www.blackberry.com/developers.


Set up a POP3 and SMTP server connection with the ESS

  1. On the taskbar, click Start > Programs > Research In Motion > BlackBerry Email and MDS Services Simulators 4.1.2 > ESS.
  2. In the Email Server Simulator window, ensure the Connected mode option radio button is selected.
  3. In the Outgoing field, type the host name of the SMTP server that your email account uses.
  4. In the Incoming field, type the host name of the POP3 server that your email account uses.
  5. In the User name field, type the user name with which to connect to your email account.
  6. In the Password field, type the password with which to connect to your email account.
  7. In the Poll inbox field, specify how often, in seconds, the email server simulator checks your inbox for new messages.
  8. In the Name field, type the name to display in outgoing messages.
  9. In the Email field, type the email address to display in outgoing messages.
  10. In the PIN field, type the personal information number (PIN) that the BlackBerry device simulator uses. By default, the PIN is 0x2100000A.


Sending and receiving messages using the BlackBerry device simulator

The following instructions assume you have access to a BlackBerry device simulator. The BlackBerry device simulator and accompanying documentation are available for download from the RIM BlackBerry developer web site.

Send a message using the BlackBerry device simulator

  1. Start the email server simulator.
  2. In the Email Server Simulator window, ensure the Standalone mode option radio button is selected.
  3. Click Launch.
  4. Start the BlackBerry device simulator.
  5. Navigate to the Messages icon.
  6. Open the Messages Application.
  7. Open the menu.
  8. Click Compose Email.
  9. In the To field, type an email address.
  10. Fill in the Cc, Subject, and Body fields.
  11. Open the menu.
  12. Click Send.

Receive a message using the BlackBerry device simulator

  1. Start the email server simulator.
  2. In the Email Server Simulator window, ensure the Standalone mode option radio button is selected.
  3. Click Launch.
  4. Start the BlackBerry device simulator. See "Starting the BlackBerry device simulator" on page 8 for more information.
  5. When the BlackBerry device simulator receives an email, open the Messages application.


Testing BlackBerry Enterprise Server APIs and IT policies

  • Using the BlackBerry Enterprise Server


Using the BlackBerry Enterprise Server

The BlackBerry Smartphone Simulator can connect to an account on the BlackBerry Enterprise Server. If you have access to a BlackBerry Enterprise Server, you can simulate all the functionality that is available when connecting a BlackBerry device to a BlackBerry Enterprise Server. Use this option to simulate use of the BlackBerry Enterprise Server Extension Application Programming Interface (API), and applied IT policies. This option requires knowledge of BlackBerry Enterprise Server administration, and introduces network dependency to testing. You will not require a BlackBerry MDS simulator or an email server simulator.


Testing a BlackBerry Smartphone Simulator with a BlackBerry Enterprise Server

  1. From the BlackBerry Java Development Environment (BlackBerry JDE) or from the start menu, run the BlackBerry Smartphone Simulator.
  2. On the Home screen, click the Turn Wireless Off icon.
  3. From the taskbar, click Start > Programs > BlackBerry > Desktop Manager.
  4. From the BlackBerry Smartphone Simulator taskbar, perform one of the following actions:
    • Click Simulate > USB Connected.
    • Click Simulate > Serial Connected.
  5. Click YES.
  6. Follow the instructions to generate a new encryption key.
  7. In the Initial Plug-in: Verifying Applications dialog box, click cancel.

When the initial synchronization with the computer is complete, the enterprise activation starts. You will then be able to simulate use of the BlackBerry Enterprise Server Extension API, applied IT policies, email traffic, browser traffic, HTTP/TCP connections, BlackBerry Application Mobility Suite, and push functionality.

Related topics
  • Simulating the BlackBerry MDS Connection Service
  • Using test scripts


BlackBerry Smartphone Simulator controller

  • Controlling the BlackBerry Smartphone Simulator through the command prompt
  • Using test scripts


Controlling the BlackBerry Smartphone Simulator through the command prompt

The BlackBerry Smartphone Simulator controller is a command prompt tool that is used to programatically control the BlackBerry Smartphone Simulator. Use the BlackBerry Smartphone Simulator controller commands to instruct the BlackBerry Smartphone Simulator to perform the following actions:

Action

Description

Issue device commands.

Issue commands manipulating the BlackBerry Smartphone Simulator (for example, close the BlackBerry Smartphone Simulator, hide the BlackBerry Smartphone Simulator window).

Generate external events.

Simulate events generated externally from the BlackBerry device (for example, an incoming phone call, moving between GPS locations).


Start the BlackBerry Smartphone Simulator controller

BlackBerry Smartphone Simulator controller commands have the following format:

fledgecontroller /session={name} [/execute={command}] [/timeout={time-in-seconds}] [/get-sessions]

Invocation Method

Example

Description

/execute

fledgecontroller
/session=7290
/execute=BatteryLevel(5)

The BlackBerry Smartphone Simulator controller issues the BatteryLevel(5) command to the BlackBerry Smartphone Simulator for the BlackBerry 7290 series of wireless handehelds and exits.

Standard input

fledgecontroller
/session=7290

...

...

BatteryLevel(5)

If you do not use the /execute command, the BlackBerry Smartphone Simulator controller sends commands from standard input to the BlackBerry Smartphone Simulator. You must manually exit the BlackBerry Smartphone Simulator controller session.


Issue commands to the BlackBerry Smartphone Simulator

The BlackBerry Smartphone Simulator interface reflects the commands you type. The following instructions assume that you have the BlackBerry Java Development Environment (BlackBerry JDE) installed on your computer.

  1. At the command prompt, type an instruction for moving to the bin directory of your BlackBerry JDE installation:

cd \Program Files\Research In Motion\BlackBerry JDE 4.2.0\bin

  1. Start the BlackBerry Smartphone Simulator. For example, at the command prompt, type the following:

fledge /handheld=7290

  1. Connect the BlackBerry Smartphone Simulator controller to a running BlackBerry Smartphone Simulator:

fledgecontroller /session=7290

  1. Type a BlackBerry Smartphone Simulator controller command (one per line). For example, at the command prompt type the following:

BatteryLevel(5)

Related topics
  • Exit the BlackBerry Smartphone Simulator controller session
  • View available commands
  • Test events through a script


Exit the BlackBerry Smartphone Simulator controller session

Perform one of the following actions:

Action

Description

End the session connection.

Perform one of the following actions:

  • At the command prompt, type quit.
  • Press CTRL+Z.

End the session and close the BlackBerry Smartphone Simulator.

At the command prompt, type exit.

Related topics
  • Issue commands to the BlackBerry Smartphone Simulator
  • View available commands
  • Test events through a script


View available commands

To view a list of commands for controlling the BlackBerry Smartphone Simulator, perform one of the following actions:

  • From the BlackBerry Smartphone Simulator, on the Help menu, click Controller Command Help.
  • In a simulator controller session, at the command prompt, type help.

    Note: For more information on running the BlackBerry Smartphone Simulator controller, type FledgeController /help.

See "Appendix: BlackBerry Smartphone Simulator controller commands" for more information.

Related topics
  • Issue commands to the BlackBerry Smartphone Simulator
  • Exit the BlackBerry Smartphone Simulator controller session
  • Test events through a script


Using test scripts

The BlackBerry Smartphone Simulator controller command prompt tool can be utilized within scripts for automated tests. When events inside the BlackBerry Smartphone Simulator occur, the BlackBerry Smartphone Simulator controller prints out messages. This is designed to enable you to test events that normally would only be perceived visually or audibly.

Note: Tools that automate GUI tests are not required.


Test events through a script

  1. Create a command file. For example, in a text file called PhoneTest.txt, type the following instructions:
    2. Pause(45)
    RemoteCallCreation("555-1234")
    Pause(2)
    ThumbwheelPress
    ThumbwheelRelease
    Pause(10)
    KeyPress(ESCAPE)
    Pause(2)
    KeyRelease(ESCAPE)
    Exit
  2. Save the command file in the same directory of your BlackBerry installation:
    3. cd \Program Files\Research In Motion\BlackBerry JDE 4.2.0\bin
  3. Create a .bat file with instructions for starting the BlackBerry Smartphone Simulator and creating a session. For example, in a file called PhoneTest.bat, type the following instruction:
    4. start fledge.exe /c fledge-settings.conf /handheld=7290 /session=test
  4. In the .bat file, write instructions for connecting the BlackBerry Smartphone Simulator controller to the session, inputting data from the command file and directing output to a text file. (In this example, the name of the output file is out.txt). For example:
    5. FledgeController.exe /session=test < PhoneTest.txt > out.txt

    Note: .bat instructions in the example assume that you create the .bat file in the same location as the fledge.exe file. If you save the .bat file to a different location, include path location information for fledge.exe and fledgeController.exe in the .bat file.

  5. Save the .bat file in the bin directory of your BlackBerry installation:
    6. cd \Program Files\Research In Motion\BlackBerry JDE 4.2.0\bin
  6. At a command prompt, move to the bin directory of your BlackBerry installation. For example, type:
    7. cd \Program Files\Research In Motion\BlackBerry JDE 4.2.0\bin
  7. Start the .bat file. For example type:
    8. PhoneTest.bat

The BlackBerry Smartphone Simulator controller starts and issues commands to the BlackBerry Smartphone Simulator. After all commands in the command file are issued, the BlackBerry Smartphone Simulator closes and messages are written to the text file. In the current example, out.txt contains the following messages:

    FledgeController.exe /session=test < PhoneTest.txt > out.txt
    Connecting to Fledge session "test"... connected.
    Buzzer: alert started
    Buzzer: alert stopped
    Audio: alert started
    Audio: alert stopped
    Disconnected


Appendix: BlackBerry Smartphone Simulator controller commands

  • BlackBerry Smartphone Simulator controller commands


BlackBerry Smartphone Simulator controller commands

To control the BlackBerry Smartphone Simulator controller from a command prompt, use the fledge controller commands. For a list of the latest fledge controller commands, from the command prompt, type fledge.exe /controller-help.


BlackBerry simulator commands

Use application commands to control the behaviour and appearance of the BlackBerry Smartphone Simulator application.

Action

Application command

Parameter

Display help on BlackBerry Smartphone Simulator controller commands.

Help

Pause the BlackBerry Smartphone Simulator controller for the given time.

Pause (int time)

time: Type the the number of seconds to pause the BlackBerry Smartphone Simulator controller.

Exit the BlackBerry Smartphone Simulator.

Exit (bool save-flash)

save-flash: The default value of true saves your changes to simulated flash memory before closing the BlackBerry Smartphone Simulator.

Terminate the BlackBerry Smartphone Simulator process.

Kill

Type this command to clean up without saving simulated flash memory. If the clean up process fails, the process is terminated.

Reset the simulator.

Reset

Get the ID of the BlackBerry Smartphone Simulator process.

GetPid

View or hide the main window.

WindowShow (bool show = true)

show: The default value of true displays the main window. To hide the main window, set this parameter to false.

Move the main BlackBerry Smartphone Simulator window to the foreground.

WindowRaise

Windows will usually block this command unless the application with focus calls the AllowSetForegroundWindow API.

Move the main BlackBerry Smartphone Simulator window behind all other windows.

WindowLower

Allow another application to obtain the foreground window focus from the BlackBerry Smartphone Simulator.

AllowFocusChange

Load a Java™ application in .cod format.

LoadCod (Path filename)

filename: Type the full path to the .cod file of the application.


Location commands

Use environment commands to control the surrounding environment of teh BlackBerry® device

Action

Environment command

Parameter

Change the GPS location of the BlackBerry device.

Location (double latitude, double longitude, short altitude = 0)

  • latitude: Type a latitude value between 89.99 and -90.00 degrees.
  • longitude: Type a longitude value between 179.99 and -180.00 degrees.
  • altitude: Type an altitude in metres above (or below if negative) the WGS84 ellipsoid. By default, this parameter is set to 0.

.


Keyboard and event commands

Use input commands to generate keyboard and input BlackBerry® device events.

Action

Input command

Parameter

Press a key.

KeyPress (key-types key)

key: Type the key that you wish to use for a press key event.

Release a key.

KeyRelease (key-types key)

key: Type the key that you wish to use for a release key event.

Enter a character string into the applications (even if characters contained in the string do not correspond to keys on the BlackBerry device).

StringInjection (string string)

string: Type the character string to enter into the application.

Press a pre-translated key.

PreTranslatedKeyPress (char key)

key: Type the key that you wish to use for a press pre-translated key event.

Release a pre-translated key.

PreTranslatedKeyRelease (char key)

key: Type the key that you wish to use for a release pre-translated key event.

Press the trackwheel.

ThumbwheelPress

Release the trackwheel.

ThumbwheelRelease

Roll the trackwheel.

ThumbwheelRoll (int movement)

movement: Type the number of clicks to roll the thumbwheel. Type positive values to indicate downward rolls and type negative value to indicate upward rolls.

Press the trackball.

TrackballPress

Release the trackball.

TrackballRelease

Roll the trackball.

TrackballRoll (int x-delta, int y-delta)

x-delta: Type the number of clicks to roll the trackball in the left or right direction. Type positive values to indicate right rolls and type negative values to indicate left rolls.

y-delta: Type the number of clicks to roll the trackball in the up or down direction. Type positive values to indicate upward rolls and type negative values to indicate downward rolls.


Data and phone commands

Use network commands to generate data and phone events.

Action

Network command

Parameter

Set network coverage level.

NetworkCoverage (int RSSI)

RSSI: Type the dB level, with -40 being strong and -256 being out of coverage.

Simulate a remote phone that answers a call placed from the BlackBerry® device.

RemoteCallAnswer

Place a new call from a remote phone to the BlackBerry device.

RemoteCallCreation (string number, presentation-indicator-types presentation-indicator = PI_ALLOWED)

  • number: Type the phone number that you want to call.
  • presentation-indicator: Type a value to control the display of the caller ID. By default, this parameter is set to the constant PI_ALLOWED.

Hang up a remote phone.

RemoteCallDisconnection (string number)

number: Type the phone number to disconnect from.

Generate a call failure.

RemoteCallFailure (string number, reason-types reason)

  • number: Type the phone number to use for the remote call failure simulation.
  • reason: Type a reason for the remote call failure.

Provision a supplementary service.

SupplementaryServiceProvisioning (service-types service, bool provisioned)

  • service: Type the supplementary service type to simulate.
  • provisioned - Set this parameter to true to make the service appear provisioned. Set this parameter to false to make the service appear not provisioned.


BlackBerry device accessory commands

Use peripheral commands to generate BlackBerry® device peripheral events.

Action

Peripheral command

Parameter

Set the charge level of the battery.

BatteryLevel (int level)

level: Type the charge level of the battery.

Set battery charging on or off.

BatteryCharge (bool charging)

charging: Type true to simulate battery charging. Set this parameter to false to simulate the battery not charging.

Connect or disconnect the external headset.

HeadsetConnection (bool connected)

connected: Type true to simulate a connection to the external headset. If you type false, a connection to the external headset is not simulated.

Press or release the button on the external headset.

HeadsetClick (bool pressed)

  • pressed - When this parameter is set to true, the button appears pressed; when it is set to false, the button does not appear pressed.

Holster or unholster the BlackBerry device.

Holster (bool holstered)

  • holstered - When this parameter is set to true, the BlackBerry device is in the holster; when it is set to false, the BlackBerry device is not in the holster.

Insert or remove the SIM card.

SimInsertion (bool inserted)

  • inserted - When this parameter is set to true, the SIM card is inserted; when it is set to false, the SIM card is not inserted.