Embarcadero offers a set of components and libraries to work with Bluetooth Low Energy or just BLE-enabled devices. For instance, you can utilize the new TBluetoothLE component to implement the RTL BluetoothLE feature for server and client applications using with FireMonkey.
Furthermore, the RTL provides a BLE scan filter implementation that takes advantage of the new BLE low consumption chips. Probably you can connect any BLE-enabled devices using built-in Bluetooth components which comes with RAD Studio.
In addition to that, there are third-party BLE libraries or components available for Delphi & C++ Builder developers. For instance, IPWorks BLE library.
What is IPWorks BLE Library?
IPWorks BLE includes a set of powerful components for integrating Bluetooth Low Energy communications capabilities into the web, desktop, and more applications. The BLEClient component provides a simple but flexible BLE GATT client implementation and descriptors exposed by BLE GATT servers on BLE devices.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
procedure TFormBLEClient.iplBLEClient1Advertisement(Sender: TObject; const ServerId, Name: string; RSSI, TxPower: Integer; const ServiceUuids, ServicesWithData, SolicitedServiceUuids: string; ManufacturerCompanyId: Integer; ManufacturerData: string; ManufacturerDataB: TBytes; IsConnectable, IsScanResponse: Boolean); var serverIdExists: Boolean; I: Integer; begin // This method will check to see if the ServerID already exists. If it does not, // then display advertisement information for it. serverIdExists := false; if ServerIds.Count = 0 then begin ServerIds.Add(ServerId); end else begin for I := 0 to ServerIds.Count-1 do begin if ServerIds[I] = ServerId then begin serverIdExists := true; break; end; end; end; if not serverIdExists then begin ServerIds.Add(ServerId); lvAdvertisements.Items.Add(); lvAdvertisements.Items[lvAdvertisements.Items.Count-1].Caption := ServerId; lvAdvertisements.Items.Item[lvAdvertisements.Items.Count-1].SubItems.Add(Name); lvAdvertisements.Items.Item[lvAdvertisements.Items.Count-1].SubItems.Add(inttostr(RSSI)); lvAdvertisements.Items.Item[lvAdvertisements.Items.Count-1].SubItems.Add(inttostr(TxPower)); lvAdvertisements.Items.Item[lvAdvertisements.Items.Count-1].SubItems.Add(booltostr(IsConnectable, True)); lvAdvertisements.Items.Item[lvAdvertisements.Items.Count-1].SubItems.Add(ServiceUuids); lvAdvertisements.Items.Item[lvAdvertisements.Items.Count-1].SubItems.Add(ServicesWithData); lvAdvertisements.Items.Item[lvAdvertisements.Items.Count-1].SubItems.Add(inttostr(ManufacturerCompanyId)); lvAdvertisements.Items.Item[lvAdvertisements.Items.Count-1].SubItems.Add(TBytesToHex(ManufacturerDataB)); // Needs to be converted to hex string end end; |
IPWorks BLE Library Features:
- Complete GATT Client component
- User-friendly scanning and service discovery
- Full support for reading, writing and subscribing to characteristics
- Fast, robust, reliable, and thread-safe capabilities
- and more
How do I get the IPWorks BLE Library?
Head over and check out the BLE library on the GetIt portal and download it in the IDE using the GetIt Package Manager.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition
Currently, Delphi 12 (FM) cannot create Bluetooth LE compatible programs that run on Windows 11. What time do you respond?
Hi, I wasn’t aware this was a problem. I will check into it and comment again as soon as I can.