Discovering devices in the original Microsoft Shared Source Bluetooth is not actually possible. With the enhanced version from DotNetCore with some help from the 32Feet library I have added on Discovering of devices.
I have also added the ability to receive the devices name when discovering devices, something I could not find done in either library.
To discover devices use the following code
' Declare Variables
Dim discovery As New Microsoft.WindowsMobile.SharedSource.Bluetooth.BluetoothDiscovery
' For each bluetooth device discovered
For Each bthDevice As BluetoothDevice In discovery.DiscoverDevices(255, True, True, True)
Next
Parameters
- MaxDevices - the maximum number of devices you want returned
- Authenticated - devices that are already authenticated with the current device
- Remembered - devices that have been remembered from previous connections (Paired Devices)
- Unknown - unknown devices (essentially everything else)