AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Cross-Platform-Entwicklung Bluetooth LE unter Windows 11 funktioniert nicht mehr
Thema durchsuchen
Ansicht
Themen-Optionen

Bluetooth LE unter Windows 11 funktioniert nicht mehr

Ein Thema von elmar.faber · begonnen am 13. Aug 2023 · letzter Beitrag vom 3. Jan 2025
 
elmar.faber

Registriert seit: 10. Sep 2007
Ort: Neustadt (Hessen)
37 Beiträge
 
Delphi 10.2 Tokyo Architect
 
#1

Bluetooth LE unter Windows 11 funktioniert nicht mehr

  Alt 13. Aug 2023, 12:41
Hallo,

bislang hat die Bluetooth LE Komponente unter Windows 10 keine Probleme gemacht. Unter Windows 11
jedoch funktioniert keines meiner Programme mit Bluetooth LE mehr.

Ich habe die Delphi Version 11.1 und die Community Version 11.3 getestet.

Verwenden tue ich ein HM-10 Bluetooth Modul mit der Firmware 5.40 und 7.09.
Wie gesagt unter Windows 10 funktioniert die Kommunikation einwandfrei.

Hier mein Code:

Delphi-Quellcode:
procedure TFrmPeltierController.BluetoothLE1EndDiscoverServices(const Sender: TObject;
  const AServiceList: TBluetoothGattServiceList);
Var
  Idx : Integer;
  cmd_Str : String;
  AService : TBluetoothGattService;
  ACharacteristic : TBluetoothGattCharacteristic;
begin
  FCurrentService := NIL;
  for AService IN AServiceList Do Begin
    DM.Protocol[1].Add(AService.UUIDName);
    If AService.UUIDName = ServiceName Then Begin
      FCurrentService := AService;
      laBluetoothStatus.BeginUpdate;
      laBluetoothStatus.Text := AService.UUIDName;
      laBluetoothStatus.EndUpdate;
      Application.ProcessMessages;
      Break;
    End;
  End;
  If Assigned(FCurrentService) Then Begin
    Try
      for ACharacteristic IN FCurrentService.Characteristics Do Begin <------ Hier hängt sich das Programm komplett auf
        DM.Protocol[2].Add(ACharacteristic.UUIDName);
        If ACharacteristic.UUIDName = CharacteristicName Then Begin
          FCurrentCharacteristic := ACharacteristic;
          laBluetoothStatus.BeginUpdate;
          laBluetoothStatus.Text := FCurrentCharacteristic.UUIDName;
          laBluetoothStatus.EndUpdate;
          If BluetoothLE1.SubscribeToCharacteristic(FCurrentDevice, FCurrentCharacteristic) Then Begin
            laBluetoothStatus.BeginUpdate;
            laBluetoothStatus.Text := 'Ready to send/receive data...';
            laBluetoothStatus.EndUpdate;
            Application.ProcessMessages;
            (*
            // <Command> | <Type of Value> | <Assignd Value> | <Value>
            cmd_Str := IntToStr(cct_Response)+'|'+IntToStr(cvt_Boolean)+'|'+
                      IntToStr(Ord(at_Response))+'|'+IntToStr(1)+'^';

            FCurrentCharacteristic.SetValueAsString(cmd_Str);
            BluetoothLE1.WriteCharacteristic(FCurrentDevice, FCurrentCharacteristic);
            *)

            SendCommand(ct_Response, vt_Boolean, at_Response, True);

            btn_Connect.Text := 'Verbunden';
            btn_Connect.Enabled := False;

            Circle1.Fill.Color := TAlphaColors.Chartreuse;
          End;
          Break;
        End;
      End;
    Except

    End;
  End;
End;

Das Demoprogramm "ExploreDevicesLE" hängt sich auch genau an diesem Punkt auf.

Kann mir hier jemand weiterhelfen?

Viele Grüße

Elmar
Elmar Faber
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:28 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz