Bluetooth to 1-Wire communication using the DS9097U
Windows Mobile pairing procedure
- Use the Connection Wizard to search for the BlueSnap Bluetooth adapter.
- Select the BlueSnap device.
- Select the SPP service.
- Enter the device pin number (0000 or 1234) and press the green checkmark.
- When prompted to register a Bluetooth serial port, select Yes.
- Select Bluetooth 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.
- The Bluetooth Manager confirms that the port successfully registered.
- The available COM ports are listed in the manager.
- 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 DS9097U 1-Wire 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.
評(píng)論