Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: pfullarton on March 02, 2010, 02:16:43 PM

Title: Getting 'name' in the Proximity Sender Demo
Post by: pfullarton 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
Title: Re: Getting 'name' in the Proximity Sender Demo
Post by: Mike Petrichenko 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
Title: Re: Getting 'name' in the Proximity Sender Demo
Post by: pfullarton 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?
Title: Re: Getting 'name' in the Proximity Sender Demo
Post by: Mike Petrichenko 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