AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

BluetoothLe unter DElphi 12 CE

Ein Thema von MomoNoWhere · begonnen am 16. Jan 2025 · letzter Beitrag vom 20. Jan 2025
 
MomoNoWhere

Registriert seit: 16. Jan 2025
2 Beiträge
 
#1

BluetoothLe unter DElphi 12 CE

  Alt 16. Jan 2025, 07:40
Ich habe ein Problem, weiss aber nicht, ob es hier richtig ist:

Ich habe Delphi 12 CE. Seit dem geht das BluetoothLe nicht mehr. Das Programm bleibt immer bei BluetoothLEEndDiscoverServices hängen und geht nicht mehr weiter.

Zitat:
const
xServiceUuid: TGuid = '{0000180F-0000-1000-8000-00805F9B34FB}';
xBatteryUuid: TGuid = '{00001001-0000-1000-8000-00805F9B34FB}';
xTemperaturUuid: TGuid = '{00001002-0000-1000-8000-00805F9B34FB}';
xFallUuid: TGuid = '{00001003-0000-1000-8000-00805F9B34FB}';
xEpilepsyUuid: TGuid = '{00001004-0000-1000-8000-00805F9B34FB}';
xInstheightUuid: TGuid = '{00001005-0000-1000-8000-00805F9B34FB}';
xSensitivityUuid: TGuid = '{00001006-0000-1000-8000-00805F9B34FB}';
xThresholdUuid: TGuid = '{00001007-0000-1000-8000-00805F9B34FB}';
xDistanceUuid: TGuid = '{00001008-0000-1000-8000-00805F9B34FB}';
xBreathrateUuid: TGuid = '{00001009-0000-1000-8000-00805F9B34FB}';
xHeartrateUuid: TGuid = '{00001010-0000-1000-8000-00805F9B34FB}';

var
FormMain: TFormMain;

implementation

{$R *.fmx}

procedure TFormMain.BluetoothLECharacteristicRead(const Sender: TObject;
const ACharacteristic: TBluetoothGattCharacteristic;
AGattStatus: TBluetoothGattStatus);
var s: String;
begin
s:= ACharacteristic.GetValueAsString();
showmessage(s);
end;

procedure TFormMain.BluetoothLEDiscoverLEDevice(const Sender: TObject;
const ADevice: TBluetoothLEDevice; Rssi: Integer;
const ScanResponse: TScanResponse);
var aService: TBluetoothGattService;
aCharacteristic: TBluetoothGattCharacteristic;
begin
if ADevice.DeviceName.StartsWith('FS') then begin
aDevice.DiscoverServices;


end;
end;

procedure TFormMain.BluetoothLEEndDiscoverServices(const Sender: TObject;
const AServiceList: TBluetoothGattServiceList);
var aService: TBluetoothGattService;
aCharacteristic: TBluetoothGattCharacteristic;
begin
for aService in aservicelist do begin
aService.Characteristics;
aService.GetCharacteristic(xBatteryUuid);
end;
end;
Kann mir Jemand helfen?

L.G.
Axel
  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 11:16 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