新聞中心

EEPW首頁 > 手機與無線通信 > 設(shè)計應(yīng)用 > Bluetooth to 1-Wire communication using the DS9097U

Bluetooth to 1-Wire communication using the DS9097U

作者: 時間:2010-02-28 來源:網(wǎng)絡(luò) 收藏

  • From Connect To dialog, select COM port configured in step 16 and press OK.

    Windows XP SP3 setup procedure

  • From COM# Properties dialog select the following options and press OK.

    Windows XP SP3 setup procedure

  • HyperTerminal may show as connected even when the adapter connection has not been established. If the adapter's green light is flashing slowly, disconnect and reconnect the battery. Reestablish the Blueoth connection by double clicking the BlueSnap icon in My Blueoth Places (step 6). Once the connection has been established, disconnect and reconnect the phone icons in the HyperTerminal ol bar.
  • From the HyperTerminal File menu, select BlueSnap Properties.
  • From the properties dialog, click the ASCII Setup...button.

    Windows XP SP3 setup procedure

  • Make the following ASCII setup selections.

    Windows XP SP3 setup procedure

  • Close all dialog boxes by clicking OK.
  • In the HyperTerminal window type $$$; the device will respond with CMD. The CMD confirms that you are now in command mode. The BlueSnap LED changes from a solid green to flashing quickly.
  • In the terminal type ST,255. This changes the timeout for discovery from 60 seconds to infinity. The adapter responds with AOK>.
  • To launch, the newly created HyperTerminal connection can be found at: Start Programs Accessories Communications HyperTerminal BlueSnap.ht.
  • The device is now configured to stay in discovery mode once power is applied without any timeout.
  • Windows Mobile pairing procedure

    1. Use the Connection Wizard to search for the BlueSnap adapter.

      Windows Mobile pairing procedure

    2. Select the BlueSnap device.

      Windows Mobile pairing procedure

    3. Select the SPP service.

      Windows Mobile pairing procedure

    4. Enter the device pin number (0000 or 1234) and press the green checkmark.

      Windows Mobile pairing procedure

    5. When prompted to register a serial port, select Yes.

      Windows Mobile pairing procedure

    6. Select serial-port name BTS from the Name dropdown box. Input an index number of zero. The index is similar to a COM port. Press the green check to accept changes. If an index number other than zero is used, the example code will need this portion of code modified in order to open the appropriate port.

      Windows Mobile pairing procedure

    7. The Bluetooth Manager confirms that the port successfully registered.

      Windows Mobile pairing procedure

    8. The available COM ports are listed in the manager.

      Windows Mobile pairing procedure

    9. The BlueSnap adapter has successfully paired. Upon opening the BTS0 port, a connection between the mobile device and the BlueSnap device is established.

    Windows application

    Because the BlueSnap adapter cannot toggle the RTS and DTR lines, the OneWireLinkLayer.dll is not used in this example. Instead, the COM Port Adapter (see Figure 1) is accessed directly with serial commands.

    Download (ZIP) the sample project. Figure 2 shows the application running on a Windows Mobile device. The project contains a simple class with calls to commonly-used functions (including Search ROM).

    Figure 2. Application running on Windows Mobile.
    Figure 2. Application running on Windows Mobile.

    本文引用地址:http://m.butianyuan.cn/article/157607.htm

    上一頁 1 2 下一頁

    評論


    相關(guān)推薦

    技術(shù)專區(qū)

    關(guān)閉