Search code examples
flutterbluetooth-lowenergy

Converting BLE service id to UUID(List<int>)


Can someone help me convert my BLE service ID to a UUID format... I am using Flutter Reactive BLE plugin for BLE communications in my app.

Here is the service id: 000018AE-0000-1000-8000-00805F9B34FB

This needs to be in a List format with the Uuid class of the plugin

flutterReactiveBle.scanForDevices(withServices: [Uuid(...<uuid here>...)], scanMode: ScanMode.lowLatency).listen((device) {
      //code for handling results
    }, onError: () {
      //code for handling error
    });

Solution

  • Try: Uuid.parse('000018AE-0000-1000-8000-00805F9B34FB');