Author Topic: Getting 'name' in the Proximity Sender Demo  (Read 1828 times)

Offline pfullarton

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Getting 'name' in the Proximity Sender Demo
« on: March 02, 2010, 02:16:43 PM »
Hi team,

I'm evaluating the BT kit and am using the Proximity Sender Demo sample as a start point - It is close to their needs.  My client wants to see NAME of the client device in their app.  What is the best way to get this?

Thanks,

Peter

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Getting 'name' in the Proximity Sender Demo
« Reply #1 on: March 02, 2010, 02:19:01 PM »
Hi,

The good way is to use GetName method. However, the best way is to use search and find this topic: http://forum.btframework.com/index.php/topic,935.0.html

Offline pfullarton

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: Getting 'name' in the Proximity Sender Demo
« Reply #2 on: March 02, 2010, 03:11:46 PM »
Not quite with you yet......

My code is as follows:

    Private Sub wclProximitySender_OnDevicesFound(ByVal sender As System.Object, ByVal e As wcl.wclDevicesFoundEventArgs) Handles wclProximitySender.OnDevicesFound

        Set_Clients_In_Range(False)

        Dim I As Integer

        For I = 0 To e.Devices.Count - 1

             If Client_Inserted(e.Devices(I).Address) Then

                If cbxVerboseLogging.Checked Then Write_to_log_File("New potential client found: " + e.Devices(I).Address)

            Else

                If cbxVerboseLogging.Checked Then Write_to_log_File("Revisiting client in range: " + e.Devices(I).Address)

            End If

        Next

        Refresh_DEV_GRID()

    End Sub

How do I acquire name from this situation - or do I need to use a different EVENT to get this data?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Getting 'name' in the Proximity Sender Demo
« Reply #3 on: March 02, 2010, 03:29:13 PM »
Hi,

It is easy to do. Use wclBluetoothDevice.GetName() method to read remote device's name. Usage of this method shown in BluetoothDiscovery demo app as well as method is described in WCL documentation. Also take a look on this topic: http://forum.btframework.com/index.php/topic,935.0.html and on this one as well: http://forum.btframework.com/index.php/topic,960.0.html

 

Sitemap 1 2 3 4 5 6 7 8 9