Jump to content
Sign in to follow this  
Tomek78

Bluetooth LE problem on Windows 11

Recommended Posts

Hello,

 

I'm using Embarcadero C++Builder 11 Community Edition to write a simple program that connects to a selected Bluetooth LE device.

After discovering desired services, I try to read the characteristics, but the program hangs when reading the service->Characteristics property.

Here is my code snippet:

TGUID VSP_GUID = StringToGUID("{569a1101-b87f-490c-92cb-11ba5ea5167c}");

void __fastcall TForm1::BluetoothLEServicesDiscovered(TObject * const Sender, TBluetoothGattServiceList * const AServiceList)
{
  for(int i=0;i<AServiceList->Count;i++)
  {
     if(AServiceList->Items[i]->UUID == VSP_GUID)
     {
       TBluetoothGattService * service = AServiceList->Items[i];

       if(service->Characteristics != NULL) //freezes here
       {
       }
     }
  }
}

The problem appears on Windows 11. On Windows 10, everything worked fine. I have tried this code on C++ Builder 12 Trial Version, but problem still exists.

 

What should I do and where is the problem?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×