Check to see if a device is in range

Topics: Bluetooth - Microsoft
May 6, 2015 at 10:49 PM
I am working on connecting with a Roving Networks RN-42 bluetooth module.
I can discover and connect with the device just fine.
I can also send and receive data.
When I check to see if a device is in range by using the following code
Dim selectedDevice As BluetoothDeviceInfo = GetSelectedDeviceInfo() ' The RN-42 device
Dim fakeUuid As Guid = New Guid("{F13F471D-47CB-41d6-9609-BAD0690BF891}")
Dim records As ServiceRecord()
    records = selectedDevice.GetServiceRecords(fakeUuid)
    If (records.Length = 0) Then
             Exit Sub
    End If
Catch ex As Exception
End Try
I always get a exception with the following details {"A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself"}

All my searches indicate this is the method to detect if a device is in range.

What am I doing wrong?