Does anyone have any advice on how to use Bluetooth LE with Delphi Berlin, targeting Windows? The ExploreDevicesLE sample application works fine for me on iOS, Android and OSX, but doesn't work at all on Windows. I believe the problem is that under Windows, the StartDiscovery method returns right away (the DocWiki says so) and so devices never seem to get enumerated. If this is the case, how can I enumerate available Bluetooth LE devices in Windows?
Does anyone have any advice on how to use Bluetooth LE with Delphi Berlin, targeting Windows? The ExploreDevicesLE sample application works fine for me on iOS, Android and OSX, but doesn't work at all on Windows. I believe the problem is that under Windows, the StartDiscovery method returns right away (the DocWiki says so) and so devices never seem to get enumerated. If this is the case, how can I enumerate available Bluetooth LE devices in Windows?
TIA. - Scott
TIA. - Scott
I guess that your computer doesn't have Bluetooth LE. It is popular in mobile devices but not in laptops. Usually BLE comes with Bluetooth 4.0. Does your computer contains BT 4.0 and it has installed correct drivers?
ReplyDeleteMy PC does have Bluetooth LE and is able to pair with LE devices.
ReplyDeleteScott Pinkham Make and model?
ReplyDeleteBluetooth LE Is only available on Windows 8 or newer versions of Windows. Also, If you are using Parallels under OSX, the Parallels Bluetooth bridge between Windows and OSX does not support Bluetooth LE.
ReplyDeleteThe problem is only with Delphi programs running on Windows -- not with my PC, as Bluetooth LE works fine on my PC otherwise. Under Windows the Delphi BluetoothLE component reports that the PC does support Bluetooth. The problem is the Bluetooth LE implementation in Delphi under Windows doesn't seem to enumerate devices -- DiscoverDevices() returns immediately (see http://docwiki.embarcadero.com/Libraries/Berlin/en/System.Bluetooth.Components.TBluetoothLE.DiscoverDevices) on Windows. On all other platforms it does go out and enumerate devices and generate OnDiscoverLEDevice events, while on Windows I never see the OnDiscoverLEDevice events.
ReplyDeletedocwiki.embarcadero.com - System.Bluetooth.Components.TBluetoothLE.DiscoverDevices - RAD Studio API Documentation
Looks like I found the problem -- on Windows you have to pair the devices in advance. See community.embarcadero.com - Bluetooth LE on Win32 or Win64
ReplyDeleteThey should add this info to the docwiki.