Would you like to tell us how we are doing?

You bet No thanks

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.

Testing NFC applications

Testing NFC applications on the BlackBerry Smartphone Simulator

Some BlackBerry smartphones are equipped for NFC. BlackBerry smartphones that support NFC can read a smart tag, a smart accessory or other NFC-enabled devices. NFC technology is designed to transfer small amounts of data over a short distance. The BlackBerry Smartphone Simulator simulates only insecure passive communication.

You can use smart tags to:
  • Provide a URL where a user can retrieve more information about an advertisement on a smart poster, such as a movie or a coupon
  • Provide pairing information for a Bluetooth accessory
  • Provide identification information for a smart dock

To test an NFC application using the BlackBerry Smartphone Simulator, you also need the tools in the Open NFC package, available from SourceForge. The two tools, the NFC Simulator application and the Connection Center application, run on the same computer as the BlackBerry Smartphone Simulator.

You can download the package for the NFC Controller Simulator program from SourceForge at http://sourceforge.net/projects/open-nfc/files. If you are developing for BlackBerry Device Software 7.0, download the Core or PC edition of the NFC Controller Simulator version 4.2.3.

Setting up the NFC Controller Simulator

Run the NFC Controller Simulator application, from SourceForge, on your computer. You can use it to send signals as though it were an NFC card or token and test your BlackBerry smartphone application.

The NFC Controller Simulator program must run on the same computer as the BlackBerry Smartphone Simulator. You can download the package for the NFC Controller Simulator program from SourceForge at http://sourceforge.net/projects/open-nfc/files.

To install the NFC Controller Simulator application on your computer, see the instructions with the NFC Controller Simulator program.

Set the NFC parameters

Some of the NFC parameters can be set within the BlackBerry Smartphone Simulator. You must set the others at the command prompt.
  1. On the Simulate menu, click NFC Options.
  2. Perform either of the following tasks:

    Task

    Steps

    Initialize NFC for the NFC Controller Simulator rather than a test board, whenever the BlackBerry Smartphone Simulator starts. This is identical to using the /nfcc-using-sim parameter at the command prompt.

    Select the Use NFC Simulator, check box.

    Specify location of the NFC Controller Simulator.

    Entering a URI using this option does not take effect until the next time the BlackBerry Smartphone Simulator starts. Until it restarts, setting this option prevents all NFC communication between the BlackBerry Smartphone Simulator and the NFC Controller.

    In the text box under NFC Controller URI, enter the URI for the NFC Simulator.

  3. On the Simulate menu, click Initialize NFC.

Command prompt parameters related to NFC

Parameters

Description

/ump=<path_to_UMD_DLL>

This parameter loads the NFC User Mode Driver when the BlackBerry Smartphone Simulator starts. This option is only necessary if your installation of the Java programming language has no NFC support.

/nfcc-uri=<URI_string>

This parameter loads the URI that points to a NFC simulator program or the evaluation board. The default value points to an evaluation board. You can set the value of the URI on the BlackBerry Smartphone Simulator.

/nfcc-using-sim=<Boolean>

This parameter defines whether you are using an NFC simulator application. By default, it is set to false, but when using an NFC simulator application, this value should be set to true. You can set this value on the BlackBerry Smartphone Simulator.

Test an NFC application

Before you begin: You must install and run the components of the NFC Simulator package.

If you run the BlackBerry Smartphone Simulator from a batch file, remember that any % characters in the URL string must have an additional % sign, so a string such as /nfcc-uri=NFC%20Device%20%231 becomes /nfcc-uri-NFC%%20Device%%20%%231 in the batch file.

  1. Start the Connection Center.
  2. Start the NFC Controller Simulator.
  3. On older versions of the NFC Controller Simulator, on the NFC Device #1 menu, click Start.
  4. In the Connection Center, on the Global tab, click Service List to display a dialog box with a list of services.
  5. In the Connection Center, under NFC Controller (NFC HAL), right-click NFC Device #1 (on older versions of the application, the entry is called NFC Simulator).
  6. In the Connection Center, click Copy service URI.
  7. At the command prompt, start the BlackBerry Smartphone Simulator with the additional parameters /nfcc-using-sim=true and /nfcc-uri=<copied_URI_string>. If the URI contains spaces, enclose the entire URI in double quotation marks.
  8. If you use the /nfcc-uri command prompt parameter, skip to step 9. In the BlackBerry Smartphone Simulator, on the Simulate menu, click Initialize NFC. The NFC Controller Simulator presents a dialog box showing a set of protocols and another dialog box showing the defined objects.
  9. In the NFC Controller Simulator, in the NFC Object Manager window, perform one of the following:

    Task

    Steps

    Present an NFC card or token.

    In the Object List, double-click the name of the NFC card or token.

    Remove an NFC card or token.

    Under the label NFC Device #1 Antenna, double-click the image.

  10. In the BlackBerry Smartphone Simulator, test the application.