.NET Components for Mobility

Search and Pair serial devices

Last post 06-06-2007 8:46 AM by PeterFoot. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-09-2007 4:46 PM

    Search and Pair serial devices

    Hi,

     

    I am trying to implement the following application:

    I need to search for all the devices that support the serial port emulation and, if needed, I want to pair with a known pin.

    I am using many functionalities of the library but I can't obtain it. Can anyone help me to choose the rigth instructions?

     Here is an example:

    BluetoothClient client = new BluetoothClient();

    BluetoothDeviceInfo[] devices = client.DiscoverDevices();

    if (!device.Authenticated)
    {
          client.SetPin(device.DeviceAddress, pin);
     }
     foreach (Guid service in device.InstalledServices)
     {
          if (service.CompareTo(InTheHand.Net.Bluetooth.BluetoothService.SerialPort) == 0)
          {
               //ok
          }
    }

    But it doesn't work 

    The SetPin gives me an exception (always) and the InstalledServices is always empty.

    I am using a Qtek S100 with Windows mobile 2003.

    Any suggestion ?
     

    Filed under: ,
  • 06-06-2007 8:46 AM In reply to

    Re: Search and Pair serial devices

    Please post this to the 32feet.net forums.

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
Page 1 of 1 (2 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.