From c3ef48e4f57d04a6cd8f3da4d21644b6f067d9c8 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 11 Jul 2019 22:48:18 -0700 Subject: [PATCH] ESP32 | FLUTTER | BLE - Temperature & Humidity Check App --- .../Esp32_Ble_test/Esp32_Ble_test.ino | 111 + .../Esp32_ble_app/Esp32_ble_app.ino | 440 ++++ .../flutter_ble_app/.gitignore | 72 + .../flutter_ble_app/.metadata | 10 + .../flutter_ble_app/README.md | 16 + .../flutter_ble_app/android/app/build.gradle | 61 + .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 33 + .../eric/flutter_ble_app/MainActivity.java | 13 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values/styles.xml | 8 + .../app/src/profile/AndroidManifest.xml | 7 + .../flutter_ble_app/android/build.gradle | 29 + .../flutter_ble_app/android/gradle.properties | 2 + .../gradle/wrapper/gradle-wrapper.properties | 6 + .../flutter_ble_app/android/settings.gradle | 15 + .../flutter_ble-master/.gitignore | 7 + .../flutter_ble-master/.metadata | 10 + .../flutter_ble-master/CHANGELOG.md | 97 + .../flutter_ble-master/LICENSE | 1 + .../flutter_ble-master/README.md | 119 + .../flutter_ble-master/android/.gitignore | 8 + .../flutter_ble-master/android/build.gradle | 77 + .../android/gradle.properties | 1 + .../android/settings.gradle | 1 + .../android/src/main/AndroidManifest.xml | 7 + .../flutter_ble/AdvertisementParser.java | 106 + .../flutter/flutter_ble/FlutterBlePlugin.java | 884 ++++++++ .../flutter/flutter_ble/ProtoMaker.java | 205 ++ .../flutter_ble-master/example/.gitignore | 70 + .../flutter_ble-master/example/.metadata | 10 + .../flutter_ble-master/example/README.md | 16 + .../example/android/app/build.gradle | 61 + .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 37 + .../flutter_ble_example/MainActivity.java | 13 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values/styles.xml | 8 + .../app/src/profile/AndroidManifest.xml | 7 + .../example/android/build.gradle | 29 + .../example/android/gradle.properties | 2 + .../gradle/wrapper/gradle-wrapper.properties | 6 + .../example/android/settings.gradle | 15 + .../ios/Flutter/AppFrameworkInfo.plist | 26 + .../example/ios/Flutter/Debug.xcconfig | 2 + .../example/ios/Flutter/Release.xcconfig | 2 + .../flutter_ble-master/example/ios/Podfile | 69 + .../example/ios/Podfile.lock | 38 + .../ios/Runner.xcodeproj/project.pbxproj | 577 +++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/xcschemes/Runner.xcscheme | 93 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../example/ios/Runner/AppDelegate.h | 6 + .../example/ios/Runner/AppDelegate.m | 13 + .../AppIcon.appiconset/Contents.json | 122 + .../Icon-App-1024x1024@1x.png | Bin 0 -> 11112 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 564 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 1283 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 1588 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 1025 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 1716 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 1920 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 1283 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 1895 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 3831 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 1888 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 3294 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 3612 bytes .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 5 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 + .../ios/Runner/Base.lproj/Main.storyboard | 26 + .../example/ios/Runner/Info.plist | 45 + .../example/ios/Runner/main.m | 9 + .../flutter_ble-master/example/lib/main.dart | 328 +++ .../example/lib/widgets.dart | 280 +++ .../flutter_ble-master/example/pubspec.lock | 174 ++ .../flutter_ble-master/example/pubspec.yaml | 63 + .../example/test/widget_test.dart | 27 + .../flutter_ble-master/ios/.gitignore | 36 + .../flutter_ble-master/ios/Assets/.gitkeep | 0 .../ios/Classes/FlutterBlePlugin.h | 11 + .../ios/Classes/FlutterBlePlugin.m | 752 ++++++ .../ios/flutter_ble.podspec | 47 + .../ios/gen/Flutterblue.pbobjc.h | 733 ++++++ .../ios/gen/Flutterblue.pbobjc.m | 2014 +++++++++++++++++ .../flutter_ble-master/lib/flutter_ble.dart | 22 + .../lib/gen/flutterblue.pb.dart | 938 ++++++++ .../lib/gen/flutterblue.pbenum.dart | 88 + .../lib/gen/flutterblue.pbjson.dart | 300 +++ .../lib/gen/flutterblue.pbserver.dart | 8 + .../lib/src/bluetooth_characteristic.dart | 93 + .../lib/src/bluetooth_descriptor.dart | 26 + .../lib/src/bluetooth_device.dart | 238 ++ .../lib/src/bluetooth_service.dart | 31 + .../flutter_ble-master/lib/src/constants.dart | 7 + .../lib/src/flutter_ble.dart | 252 +++ .../flutter_ble-master/lib/src/guid.dart | 102 + .../protos/flutterblue.proto | 198 ++ .../flutter_ble-master/protos/regenerate.md | 14 + .../flutter_ble-master/pubspec.lock | 160 ++ .../flutter_ble-master/pubspec.yaml | 64 + .../test/flutter_ble_test.dart | 62 + .../flutter_ble_app/images/humidity.png | Bin 0 -> 4579 bytes .../flutter_ble_app/images/temperature.png | Bin 0 -> 10831 bytes .../ios/Flutter/AppFrameworkInfo.plist | 26 + .../ios/Flutter/Debug.xcconfig | 2 + .../ios/Flutter/Release.xcconfig | 2 + .../flutter_ble_app/ios/Podfile | 72 + .../flutter_ble_app/ios/Podfile.lock | 44 + .../ios/Runner.xcodeproj/project.pbxproj | 581 +++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/xcschemes/Runner.xcscheme | 91 + .../contents.xcworkspacedata | 10 + .../flutter_ble_app/ios/Runner/AppDelegate.h | 6 + .../flutter_ble_app/ios/Runner/AppDelegate.m | 13 + .../AppIcon.appiconset/Contents.json | 122 + .../Icon-App-1024x1024@1x.png | Bin 0 -> 11112 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 564 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 1283 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 1588 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 1025 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 1716 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 1920 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 1283 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 1895 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 3831 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 1888 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 3294 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 3612 bytes .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 5 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 + .../ios/Runner/Base.lproj/Main.storyboard | 26 + .../flutter_ble_app/ios/Runner/Info.plist | 45 + .../flutter_ble_app/ios/Runner/main.m | 9 + .../flutter_ble_app/lib/main.dart | 483 ++++ .../flutter_ble_app/lib/widgets.dart | 280 +++ .../flutter_ble_app/pubspec.lock | 182 ++ .../flutter_ble_app/pubspec.yaml | 75 + 162 files changed, 12993 insertions(+) create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/Esp32_Ble_test/Esp32_Ble_test.ino create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/Esp32_ble_app/Esp32_ble_app.ino create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/.gitignore create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/.metadata create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/README.md create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/build.gradle create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/debug/AndroidManifest.xml create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/AndroidManifest.xml create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/java/com/eric/flutter_ble_app/MainActivity.java create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/drawable/launch_background.xml create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/values/styles.xml create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/profile/AndroidManifest.xml create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/build.gradle create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/gradle.properties create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/settings.gradle create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/.gitignore create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/.metadata create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/CHANGELOG.md create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/LICENSE create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/README.md create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/.gitignore create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/build.gradle create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/gradle.properties create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/settings.gradle create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/AndroidManifest.xml create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/AdvertisementParser.java create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/FlutterBlePlugin.java create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/ProtoMaker.java create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/.gitignore create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/.metadata create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/README.md create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/build.gradle create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/debug/AndroidManifest.xml create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/AndroidManifest.xml create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/java/ai/longev/flutter/flutter_ble_example/MainActivity.java create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/drawable/launch_background.xml create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/values/styles.xml create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/profile/AndroidManifest.xml create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/build.gradle create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/gradle.properties create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/gradle/wrapper/gradle-wrapper.properties create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/settings.gradle create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/AppFrameworkInfo.plist create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/Debug.xcconfig create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/Release.xcconfig create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Podfile create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Podfile.lock create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/project.pbxproj create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/AppDelegate.h create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/AppDelegate.m create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Base.lproj/Main.storyboard create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Info.plist create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/main.m create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/lib/main.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/lib/widgets.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/pubspec.lock create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/pubspec.yaml create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/test/widget_test.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/.gitignore create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Assets/.gitkeep create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Classes/FlutterBlePlugin.h create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Classes/FlutterBlePlugin.m create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/flutter_ble.podspec create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/gen/Flutterblue.pbobjc.h create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/gen/Flutterblue.pbobjc.m create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/flutter_ble.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pb.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbenum.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbjson.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbserver.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_characteristic.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_descriptor.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_device.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_service.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/constants.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/flutter_ble.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/guid.dart create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/protos/flutterblue.proto create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/protos/regenerate.md create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/pubspec.lock create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/pubspec.yaml create mode 100755 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/test/flutter_ble_test.dart create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/images/humidity.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/images/temperature.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Flutter/AppFrameworkInfo.plist create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Flutter/Debug.xcconfig create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Flutter/Release.xcconfig create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Podfile create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Podfile.lock create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/project.pbxproj create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/AppDelegate.h create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/AppDelegate.m create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Base.lproj/Main.storyboard create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Info.plist create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/main.m create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/lib/main.dart create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/lib/widgets.dart create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/pubspec.lock create mode 100644 Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/pubspec.yaml diff --git a/Esp32_temperature_humidity_ble_FLUTTER/Esp32_Ble_test/Esp32_Ble_test.ino b/Esp32_temperature_humidity_ble_FLUTTER/Esp32_Ble_test/Esp32_Ble_test.ino new file mode 100644 index 0000000..9d1366e --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/Esp32_Ble_test/Esp32_Ble_test.ino @@ -0,0 +1,111 @@ +/* + Video: https://www.youtube.com/watch?v=oCMOYS71NIU + Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleNotify.cpp + Ported to Arduino ESP32 by Evandro Copercini + updated by chegewara + + Create a BLE server that, once we receive a connection, will send periodic notifications. + The service advertises itself as: 4fafc201-1fb5-459e-8fcc-c5c9c331914b + And has a characteristic of: beb5483e-36e1-4688-b7f5-ea07361b26a8 + + The design of creating the BLE server is: + 1. Create a BLE Server + 2. Create a BLE Service + 3. Create a BLE Characteristic on the Service + 4. Create a BLE Descriptor on the characteristic + 5. Start the service. + 6. Start advertising. + + A connect hander associated with the server starts a background task that performs notification + every couple of seconds. +*/ +#include +#include +#include +#include + +BLEServer* pServer = NULL; +BLECharacteristic* pCharacteristic = NULL; +bool deviceConnected = false; +bool oldDeviceConnected = false; +uint32_t value = 0; + +// See the following for generating UUIDs: +// https://www.uuidgenerator.net/ + +#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b" +#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8" + + +class MyServerCallbacks: public BLEServerCallbacks { + void onConnect(BLEServer* pServer) { + deviceConnected = true; + BLEDevice::startAdvertising(); + }; + + void onDisconnect(BLEServer* pServer) { + deviceConnected = false; + } +}; + + + +void setup() { + Serial.begin(115200); + + // Create the BLE Device + BLEDevice::init("ESP32 Test"); + + // Create the BLE Server + pServer = BLEDevice::createServer(); + pServer->setCallbacks(new MyServerCallbacks()); + + // Create the BLE Service + BLEService *pService = pServer->createService(SERVICE_UUID); + + // Create a BLE Characteristic + pCharacteristic = pService->createCharacteristic( + CHARACTERISTIC_UUID, + BLECharacteristic::PROPERTY_READ | + BLECharacteristic::PROPERTY_WRITE | + BLECharacteristic::PROPERTY_NOTIFY | + BLECharacteristic::PROPERTY_INDICATE + ); + + // https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml + // Create a BLE Descriptor + pCharacteristic->addDescriptor(new BLE2902()); + + // Start the service + pService->start(); + + // Start advertising + BLEAdvertising *pAdvertising = BLEDevice::getAdvertising(); + pAdvertising->addServiceUUID(SERVICE_UUID); + pAdvertising->setScanResponse(false); + pAdvertising->setMinPreferred(0x0); // set value to 0x00 to not advertise this parameter + BLEDevice::startAdvertising(); + Serial.println("Waiting a client connection to notify..."); +} + +void loop() { + // notify changed value + if (deviceConnected) { + pCharacteristic->setValue((uint8_t*)&value, 4); + pCharacteristic->notify(); + value++; + delay(10); // bluetooth stack will go into congestion, if too many packets are sent, in 6 hours test i was able to go as low as 3ms + } + // disconnecting + if (!deviceConnected && oldDeviceConnected) { + delay(500); // give the bluetooth stack the chance to get things ready + pServer->startAdvertising(); // restart advertising + Serial.println("start advertising"); + oldDeviceConnected = deviceConnected; + } + // connecting + if (deviceConnected && !oldDeviceConnected) { + // do stuff here on connecting + oldDeviceConnected = deviceConnected; + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/Esp32_ble_app/Esp32_ble_app.ino b/Esp32_temperature_humidity_ble_FLUTTER/Esp32_ble_app/Esp32_ble_app.ino new file mode 100644 index 0000000..5e8d913 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/Esp32_ble_app/Esp32_ble_app.ino @@ -0,0 +1,440 @@ +// BLE +#include +#include +#include +#include + +BLEServer* pServer = NULL; +BLECharacteristic* pCharacteristic = NULL; +bool deviceConnected = false; +bool oldDeviceConnected = false; + +#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b" +#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8" + +class MyServerCallbacks: public BLEServerCallbacks { + void onConnect(BLEServer* pServer) { + deviceConnected = true; + BLEDevice::startAdvertising(); + }; + + void onDisconnect(BLEServer* pServer) { + deviceConnected = false; + } +}; + +// SCREEN, DHT + +#include "SPIFFS.h" +#include + +#include +#include +#include +#include +#include + +#define DHTPIN 19 +#define DHTTYPE DHT11 + +DHT_Unified dht(DHTPIN, DHTTYPE); + +uint32_t delayMS; + +#define SCREEN_WIDTH 128 +#define SCREEN_HEIGHT 128 + +#define SCLK_PIN 18 +#define MOSI_PIN 23 +#define DC_PIN 17 +#define CS_PIN 5 +#define RST_PIN 4 + +// Color definitions +#define BLACK 0x0000 +#define BLUE 0x001F +#define RED 0xF800 +#define GREEN 0x07E0 +#define CYAN 0x07FF +#define MAGENTA 0xF81F +#define YELLOW 0xFFE0 +#define WHITE 0xFFFF + +const String fileTemperature = "/temperature.jpg"; +const String fileHumidity = "/humidity.jpg"; + +Adafruit_SSD1351 tft = Adafruit_SSD1351(SCREEN_WIDTH, SCREEN_HEIGHT, CS_PIN, DC_PIN, MOSI_PIN, SCLK_PIN, RST_PIN); + +float prev_temp; +float prev_humidity; + + +// Thread +#include +#include + +// ThreadController that will controll all threads +ThreadController controll = ThreadController(); + +Thread* btThread = new Thread(); +Thread* drawingThread = new Thread(); + +void setup() { + // put your setup code here, to run once: + Serial.begin(115200); + + initDrawing(); + initBT(); + + btThread->onRun(btCallback); + btThread->setInterval(100); + + drawingThread->onRun(drawingCallback); + drawingThread->setInterval(delayMS); + + controll.add(btThread); + controll.add(drawingThread); +} + +void loop() { + // put your main code here, to run repeatedly: + controll.run(); +} + +void drawingCallback(){ + sensors_event_t event; + dht.temperature().getEvent(&event); + if (isnan(event.temperature)) { + Serial.println(F("Error reading temperature!")); + } + else { + Serial.print(F("Temperature: ")); + Serial.print(event.temperature); + Serial.println(F("°C")); + updateTemp(event.temperature); + } + // Get humidity event and print its value. + dht.humidity().getEvent(&event); + if (isnan(event.relative_humidity)) { + Serial.println(F("Error reading humidity!")); + } + else { + Serial.print(F("Humidity: ")); + Serial.print(event.relative_humidity); + Serial.println(F("%")); + updateHumidity(event.relative_humidity); + } +} + +void updateTemp(float temp){ + if(prev_temp != temp){ + tft.fillRect(64, 0, 128, 64, WHITE); + tft.setCursor(70, 24); + tft.setTextColor(BLACK); + tft.setTextSize(3); + String tempString = ""; + tempString += (int)temp; + tempString += "C"; + tft.print(tempString); + prev_temp = temp; + } +} + +void updateHumidity(float humidity){ + if(prev_humidity != humidity){ + tft.fillRect(64, 64, 128, 128, WHITE); + tft.setCursor(70, 88); + tft.setTextColor(BLACK); + tft.setTextSize(3); + String humidityString = ""; + humidityString += (int)humidity; + humidityString += "%"; + tft.print(humidityString); + prev_humidity = humidity; + } +} + +void btCallback(){ + // notify changed value + if (deviceConnected) { + + String str = ""; + str += prev_temp; + str += ","; + str += prev_humidity; + + pCharacteristic->setValue((char*)str.c_str()); + pCharacteristic->notify(); + + } + // disconnecting + if (!deviceConnected && oldDeviceConnected) { + //delay(500); // give the bluetooth stack the chance to get things ready + pServer->startAdvertising(); // restart advertising + Serial.println("start advertising"); + oldDeviceConnected = deviceConnected; + } + // connecting + if (deviceConnected && !oldDeviceConnected) { + // do stuff here on connecting + oldDeviceConnected = deviceConnected; + } +} + +void initBT(){ + // Create the BLE Device + BLEDevice::init("ESP32 Test"); + + // Create the BLE Server + pServer = BLEDevice::createServer(); + pServer->setCallbacks(new MyServerCallbacks()); + + // Create the BLE Service + BLEService *pService = pServer->createService(SERVICE_UUID); + + // Create a BLE Characteristic + pCharacteristic = pService->createCharacteristic( + CHARACTERISTIC_UUID, + BLECharacteristic::PROPERTY_READ | + BLECharacteristic::PROPERTY_WRITE | + BLECharacteristic::PROPERTY_NOTIFY | + BLECharacteristic::PROPERTY_INDICATE + ); + + // https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml + // Create a BLE Descriptor + pCharacteristic->addDescriptor(new BLE2902()); + + // Start the service + pService->start(); + + // Start advertising + BLEAdvertising *pAdvertising = BLEDevice::getAdvertising(); + pAdvertising->addServiceUUID(SERVICE_UUID); + pAdvertising->setScanResponse(false); + pAdvertising->setMinPreferred(0x0); // set value to 0x00 to not advertise this parameter + BLEDevice::startAdvertising(); + Serial.println("Waiting a client connection to notify..."); + +} + +void initDrawing(){ + tft.begin(); + tft.fillRect(0,0,128,128,WHITE); + + dht.begin(); + + // Print temperature sensor details. + sensor_t sensor; + dht.temperature().getSensor(&sensor); + + // Print humidity sensor details. + dht.humidity().getSensor(&sensor); + + // Set delay between sensor readings based on sensor details. + delayMS = sensor.min_delay / 1000; + + if(!SPIFFS.begin()){ + while(1) yield(); + } + + drawFSJpeg(fileTemperature.c_str(), 0, 0); + drawFSJpeg(fileHumidity.c_str(), 0, 64); + + tft.setCursor(72, 24); + tft.setTextColor(BLACK); + tft.setTextSize(3); + tft.print("?"); + + tft.setCursor(72, 88); + tft.setTextColor(BLACK); + tft.setTextSize(3); + tft.print("?"); +} + + +/*==================================================================================== + This sketch contains support functions to render the Jpeg images. + + Created by Bodmer 15th Jan 2017 + ==================================================================================*/ + +// Return the minimum of two values a and b +#define minimum(a,b) (((a) < (b)) ? (a) : (b)) + +//==================================================================================== +// This function opens the Filing System Jpeg image file and primes the decoder +//==================================================================================== +void drawFSJpeg(const char *filename, int xpos, int ypos) { + + Serial.println("====================================="); + Serial.print("Drawing file: "); Serial.println(filename); + Serial.println("====================================="); + + // Open the file (the Jpeg decoder library will close it) + fs::File jpgFile = SPIFFS.open( filename, "r"); // File handle reference for SPIFFS + // File jpgFile = SD.open( filename, FILE_READ); // or, file handle reference for SD library + + if ( !jpgFile ) { + Serial.print("ERROR: File \""); Serial.print(filename); Serial.println ("\" not found!"); + return; + } + + // To initialise the decoder and provide the file, we can use one of the three following methods: + //boolean decoded = JpegDec.decodeFsFile(jpgFile); // We can pass the SPIFFS file handle to the decoder, + //boolean decoded = JpegDec.decodeSdFile(jpgFile); // or we can pass the SD file handle to the decoder, + boolean decoded = JpegDec.decodeFsFile(filename); // or we can pass the filename (leading / distinguishes SPIFFS files) + // The filename can be a String or character array + if (decoded) { + // print information about the image to the serial port + jpegInfo(); + + // render the image onto the screen at given coordinates + jpegRender(xpos, ypos); + } + else { + Serial.println("Jpeg file format not supported!"); + } +} + +//==================================================================================== +// Decode and paint onto the TFT screen +//==================================================================================== +void jpegRender(int xpos, int ypos) { + + // retrieve infomration about the image + uint16_t *pImg; + uint16_t mcu_w = JpegDec.MCUWidth; + uint16_t mcu_h = JpegDec.MCUHeight; + uint32_t max_x = JpegDec.width; + uint32_t max_y = JpegDec.height; + + // Jpeg images are draw as a set of image block (tiles) called Minimum Coding Units (MCUs) + // Typically these MCUs are 16x16 pixel blocks + // Determine the width and height of the right and bottom edge image blocks + uint32_t min_w = minimum(mcu_w, max_x % mcu_w); + uint32_t min_h = minimum(mcu_h, max_y % mcu_h); + + // save the current image block size + uint32_t win_w = mcu_w; + uint32_t win_h = mcu_h; + + // record the current time so we can measure how long it takes to draw an image + uint32_t drawTime = millis(); + + // save the coordinate of the right and bottom edges to assist image cropping + // to the screen size + max_x += xpos; + max_y += ypos; + + // read each MCU block until there are no more + while ( JpegDec.read()) { + + // save a pointer to the image block + pImg = JpegDec.pImage; + + // calculate where the image block should be drawn on the screen + int mcu_x = JpegDec.MCUx * mcu_w + xpos; + int mcu_y = JpegDec.MCUy * mcu_h + ypos; + + // check if the image block size needs to be changed for the right edge + if (mcu_x + mcu_w <= max_x) win_w = mcu_w; + else win_w = min_w; + + // check if the image block size needs to be changed for the bottom edge + if (mcu_y + mcu_h <= max_y) win_h = mcu_h; + else win_h = min_h; + + // copy pixels into a contiguous block + if (win_w != mcu_w) + { + for (int h = 1; h < win_h-1; h++) + { + memcpy(pImg + h * win_w, pImg + (h + 1) * mcu_w, win_w << 1); + } + } + + + // draw image MCU block only if it will fit on the screen + if ( ( mcu_x + win_w) <= tft.width() && ( mcu_y + win_h) <= tft.height()) + { + tft.drawRGBBitmap(mcu_x, mcu_y, pImg, win_w, win_h); + } + + // Stop drawing blocks if the bottom of the screen has been reached, + // the abort function will close the file + else if ( ( mcu_y + win_h) >= tft.height()) JpegDec.abort(); + + } + + // calculate how long it took to draw the image + drawTime = millis() - drawTime; + + // print the results to the serial port + Serial.print ("Total render time was : "); Serial.print(drawTime); Serial.println(" ms"); + Serial.println("====================================="); + +} + +//==================================================================================== +// Send time taken to Serial port +//==================================================================================== +void jpegInfo() { + Serial.println(F("===============")); + Serial.println(F("JPEG image info")); + Serial.println(F("===============")); + Serial.print(F( "Width :")); Serial.println(JpegDec.width); + Serial.print(F( "Height :")); Serial.println(JpegDec.height); + Serial.print(F( "Components :")); Serial.println(JpegDec.comps); + Serial.print(F( "MCU / row :")); Serial.println(JpegDec.MCUSPerRow); + Serial.print(F( "MCU / col :")); Serial.println(JpegDec.MCUSPerCol); + Serial.print(F( "Scan type :")); Serial.println(JpegDec.scanType); + Serial.print(F( "MCU width :")); Serial.println(JpegDec.MCUWidth); + Serial.print(F( "MCU height :")); Serial.println(JpegDec.MCUHeight); + Serial.println(F("===============")); +} + +//==================================================================================== +// Open a Jpeg file and dump it to the Serial port as a C array +//==================================================================================== +void createArray(const char *filename) { + + fs::File jpgFile; // File handle reference for SPIFFS + // File jpgFile; // File handle reference For SD library + + if ( !( jpgFile = SPIFFS.open( filename, "r"))) { + Serial.println(F("JPEG file not found")); + return; + } + + uint8_t data; + byte line_len = 0; + Serial.println("// Generated by a JPEGDecoder library example sketch:"); + Serial.println("// https://github.com/Bodmer/JPEGDecoder"); + Serial.println(""); + Serial.println("#if defined(__AVR__)"); + Serial.println(" #include "); + Serial.println("#endif"); + Serial.println(""); + Serial.print("const uint8_t "); + while (*filename != '.') Serial.print(*filename++); + Serial.println("[] PROGMEM = {"); // PROGMEM added for AVR processors, it is ignored by Due + + while ( jpgFile.available()) { + + data = jpgFile.read(); + Serial.print("0x"); if (abs(data) < 16) Serial.print("0"); + Serial.print(data, HEX); Serial.print(",");// Add value and comma + line_len++; + if ( line_len >= 32) { + line_len = 0; + Serial.println(); + } + + } + + Serial.println("};\r\n"); + // jpgFile.seek( 0, SeekEnd); + jpgFile.close(); +} +//==================================================================================== diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/.gitignore b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/.gitignore new file mode 100644 index 0000000..ac4a906 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/.gitignore @@ -0,0 +1,72 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.packages +.pub-cache/ +.pub/ +/build/ + +# Android related +**/android/**/gradle-wrapper.jar +**/android/.gradle +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/.metadata b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/.metadata new file mode 100644 index 0000000..3b87eb5 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: b712a172f9694745f50505c93340883493b505e5 + channel: stable + +project_type: app diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/README.md b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/README.md new file mode 100644 index 0000000..6ae6e3a --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/README.md @@ -0,0 +1,16 @@ +# flutter_ble_app + +A new Flutter application. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/build.gradle b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/build.gradle new file mode 100644 index 0000000..bb7e796 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/build.gradle @@ -0,0 +1,61 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 28 + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.eric.flutter_ble_app" + minSdkVersion 24 + targetSdkVersion 28 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/debug/AndroidManifest.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..bbd617a --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/AndroidManifest.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..8661020 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/java/com/eric/flutter_ble_app/MainActivity.java b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/java/com/eric/flutter_ble_app/MainActivity.java new file mode 100644 index 0000000..f3dd097 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/java/com/eric/flutter_ble_app/MainActivity.java @@ -0,0 +1,13 @@ +package com.eric.flutter_ble_app; + +import android.os.Bundle; +import io.flutter.app.FlutterActivity; +import io.flutter.plugins.GeneratedPluginRegistrant; + +public class MainActivity extends FlutterActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + GeneratedPluginRegistrant.registerWith(this); + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/drawable/launch_background.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4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h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/values/styles.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..00fa441 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/profile/AndroidManifest.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..bbd617a --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/build.gradle b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/build.gradle new file mode 100644 index 0000000..bb8a303 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/build.gradle @@ -0,0 +1,29 @@ +buildscript { + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.2.1' + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/gradle.properties b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/gradle.properties new file mode 100644 index 0000000..2bd6f4f --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/gradle.properties @@ -0,0 +1,2 @@ +org.gradle.jvmargs=-Xmx1536M + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/gradle/wrapper/gradle-wrapper.properties b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..2819f02 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/settings.gradle b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/settings.gradle new file mode 100644 index 0000000..5a2f14f --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/android/settings.gradle @@ -0,0 +1,15 @@ +include ':app' + +def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + +def plugins = new Properties() +def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') +if (pluginsFile.exists()) { + pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } +} + +plugins.each { name, path -> + def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() + include ":$name" + project(":$name").projectDir = pluginDirectory +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/.gitignore b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/.gitignore new file mode 100755 index 0000000..e9dc58d --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +.dart_tool/ + +.packages +.pub/ + +build/ diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/.metadata b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/.metadata new file mode 100755 index 0000000..faf287a --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b + channel: stable + +project_type: plugin diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/CHANGELOG.md b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/CHANGELOG.md new file mode 100755 index 0000000..450b7aa --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/CHANGELOG.md @@ -0,0 +1,97 @@ +## 0.5.1 +* Forked repo to internal use +* Upgrade Android protobuf dependencies +* Refresh iOS build files + +## 0.5.0 +* **Breaking change**. Migrate from the deprecated original Android Support + Library to AndroidX. This shouldn't result in any functional changes, but it + requires any Android apps using this plugin to [also + migrate](https://developer.android.com/jetpack/androidx/migrate) if they're + using the original support library. + +## 0.4.2+1 +* Upgrade Android Gradle plugin to 3.3.0 +* Refresh iOS build files + +## 0.4.2 +* Set the verbosity of log messages with `setLogLevel` +* Updated iOS and Android project files +* `autoConnect` now configurable for Android +* Various bug fixes + +## 0.4.1 +* Fixed bug where setNotifyValue wasn't properly awaitable. +* Various UI bug fixes to example app. +* Removed unnecessary intl dependencies in example app. + +## 0.4.0 +* **Breaking change**. Manufacturer Data is now a `Map` of manufacturer ID's. +* Service UUID's, service data, tx power level packets fixed in advertising data. +* Example app updated to show advertising data. +* Various other bug fixes. + +## 0.3.4 +* Updated to use the latest protobuf (^0.9.0+1) +* Updated other dependencies + +## 0.3.3 +* `scan` `withServices` to filter by service UUID's (iOS) +* Error handled when trying to scan with adapter off (Android) + +## 0.3.2 +* Runtime permissions for Android +* `scan` `withServices` to filter by service UUID's (Android) +* Scan mode can be specified (Android) +* Now targets the latest android SDK +* Dart 2 compatibility + +## 0.3.1 +* Now allows simultaneous notifications of characteristics +* Fixed bug on iOS that was returning `discoverServices` too early + +## 0.3.0 +* iOS support added +* Bug fixed in example causing discoverServices to be called multiple times +* Various other bug fixes + +## 0.2.4 +* **Breaking change**. Upgraded to Gradle 4.1 and Android Studio Gradle plugin + 3.0.1. Older Flutter projects need to upgrade their Gradle setup as well in + order to use this version of the plugin. Instructions can be found + [here](https://github.com/flutter/flutter/wiki/Updating-Flutter-projects-to-Gradle-4.1-and-Android-Studio-Gradle-plugin-3.0.1). + +## 0.2.3 +* Bug fixes + +## 0.2.2 +* **Breaking changes**: +* `startScan` renamed to `scan` +* `ScanResult` now returns a `BluetoothDevice` +* `connect` now takes a `BluetoothDevice` and returns Stream +* Added parameter `timeout` to `connect` +* Automatic disconnect on deviceConnection.cancel() + +## 0.2.1 +* **Breaking change**. Removed `stopScan` from API, use `scanSubscription.cancel()` instead +* Automatically stops scan when `startScan` subscription is canceled (thanks to @brianegan) +* Added `timeout` parameter to `startScan` +* Updated example app to show new scan functionality + +## 0.2.0 + +* Added state and onStateChanged for BluetoothDevice +* Updated example to show new functionality + +## 0.1.1 + +* Fixed image for pub.dartlang.org + +## 0.1.0 + +* Characteristic notifications/indications. +* Merged in Guid library, removed from pubspec.yaml. + +## 0.0.1 - September 1st, 2017 + +* Initial Release. \ No newline at end of file diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/LICENSE b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/LICENSE new file mode 100755 index 0000000..ba75c69 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/README.md b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/README.md new file mode 100755 index 0000000..0ae9977 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/README.md @@ -0,0 +1,119 @@ + +
+

+FlutterBle +

+

+ +## Introduction + +FlutterBle is a bluetooth plugin for [Flutter](http://www.flutter.io), a new mobile SDK to help developers build modern apps for iOS and Android. +fork of [FlutterBlue](https://github.com/pauldemarco/flutter_blue) + +## Cross-Platform Bluetooth LE +FlutterBle aims to offer the most from both platforms (iOS and Android). + +Using the FlutterBle instance, you can scan for and connect to nearby devices ([BluetoothDevice](#bluetoothdevice-api)). +Once connected to a device, the BluetoothDevice object can discover services ([BluetoothService](lib/src/bluetooth_service.dart)), characteristics ([BluetoothCharacteristic](lib/src/bluetooth_characteristic.dart)), and descriptors ([BluetoothDescriptor](lib/src/bluetooth_descriptor.dart)). +The BluetoothDevice object is then used to directly interact with characteristics and descriptors. + +## Usage +### Obtain an instance +```dart +FlutterBle flutterBlue = FlutterBle.instance; +``` + +### Scan for devices +```dart +/// Start scanning +var scanSubscription = flutterBlue.scan().listen((scanResult) { + // do something with scan result +}); + +/// Stop scanning +scanSubscription.cancel(); +``` + +### Connect to a device +```dart +/// Create a connection to the device +var deviceConnection = flutterBlue.connect(device).listen((s) { + if(s == BluetoothDeviceState.connected) { + // device is connected, do something + } +}); + +/// Disconnect from device +deviceConnection.cancel(); +``` + +### Discover services +```dart +List services = await device.discoverServices(); +services.forEach((service) { + // do something with service +}); +``` + +### Read and write characteristics +```dart +// Reads all characteristics +var characteristics = service.characteristics; +for(BluetoothCharacteristic c in characteristics) { + List value = await device.readCharacteristic(c); + print(value); +} + +// Writes to a characteristic +await device.writeCharacteristic(c, [0x12, 0x34]) +``` + +### Read and write descriptors +```dart +// Reads all descriptors +var descriptors = characteristic.descriptors; +for(BluetoothDescriptor d in descriptors) { + List value = await device.readDescriptor(d); + print(value); +} + +// Writes to a descriptor +await device.writeDescriptor(d, [0x12, 0x34]) +``` + +### Set notifications +```dart +await device.setNotifyValue(characteristic, true); +device.onValueChanged(characteristic).listen((value) { + // do something with new value +}); +``` + +## Reference +### FlutterBle API +| | Android | iOS | Description | +| :--------------- | :----------------: | :------------------: | :-------------------------------- | +| scan | :white_check_mark: | :white_check_mark: | Starts a scan for Bluetooth Low Energy devices. | +| connect | :white_check_mark: | :white_check_mark: | Establishes a connection to the Bluetooth Device. | +| state | :white_check_mark: | :white_check_mark: | Gets the current state of the Bluetooth Adapter. | +| onStateChanged | :white_check_mark: | :white_check_mark: | Stream of state changes for the Bluetooth Adapter. | + +### BluetoothDevice API +| | Android | iOS | Description | +| :-------------------------- | :------------------: | :------------------: | :-------------------------------- | +| discoverServices | :white_check_mark: | :white_check_mark: | Discovers services offered by the remote device as well as their characteristics and descriptors. | +| services | :white_check_mark: | :white_check_mark: | Gets a list of services. Requires that discoverServices() has completed. | +| readCharacteristic | :white_check_mark: | :white_check_mark: | Retrieves the value of a specified characteristic. | +| readDescriptor | :white_check_mark: | :white_check_mark: | Retrieves the value of a specified descriptor. | +| writeCharacteristic | :white_check_mark: | :white_check_mark: | Writes the value of a characteristic. | +| writeDescriptor | :white_check_mark: | :white_check_mark: | Writes the value of a descriptor. | +| setNotifyValue | :white_check_mark: | :white_check_mark: | Sets notifications or indications on the specified characteristic. | +| onValueChanged | :white_check_mark: | :white_check_mark: | Notifies when the characteristic's value has changed. | +| state | :white_check_mark: | :white_check_mark: | Gets the current state of the Bluetooth Device. | +| onStateChanged | :white_check_mark: | :white_check_mark: | Notifies of state changes for the Bluetooth Device. | + + +## Troubleshooting +### Scanning for service UUID's doesn't return any results +Make sure the device is advertising which service UUID's it supports. This is found in the advertisement +packet as **UUID 16 bit complete list** or **UUID 128 bit complete list**. \ No newline at end of file diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/.gitignore b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/.gitignore new file mode 100755 index 0000000..c6cbe56 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/.gitignore @@ -0,0 +1,8 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/build.gradle b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/build.gradle new file mode 100755 index 0000000..ce153bd --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/build.gradle @@ -0,0 +1,77 @@ +group 'ai.longev.flutter.flutter_ble' +version '1.0-SNAPSHOT' + +buildscript { + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.4.1' + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8' + } +} + +rootProject.allprojects { + repositories { + google() + jcenter() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'com.google.protobuf' + + +android { + compileSdkVersion 28 + + defaultConfig { + minSdkVersion 19 + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + lintOptions { + disable 'InvalidPackage' + } + sourceSets { + main { + proto { + srcDir '../protos' + } + } + } + dependencies { + // Required for local unit tests (JUnit 4 framework) + implementation 'androidx.core:core:1.0.2' + } +} + + +protobuf { + // Configure the protoc executable + protoc { + // Download from repositories + artifact = 'com.google.protobuf:protoc:3.7.0' + } + plugins { + javalite { artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'} + grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.19.0' } + } + generateProtoTasks { + all().each { task -> + task.plugins { + javalite {} + grpc { + // Options added to --grpc_out + option 'lite' + } + } + } + } +} + +dependencies { + implementation 'com.google.protobuf:protobuf-lite:3.0.1' + +} \ No newline at end of file diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/gradle.properties b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/gradle.properties new file mode 100755 index 0000000..8bd86f6 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/gradle.properties @@ -0,0 +1 @@ +org.gradle.jvmargs=-Xmx1536M diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/settings.gradle b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/settings.gradle new file mode 100755 index 0000000..15be4fe --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'flutter_ble' diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/AndroidManifest.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/AndroidManifest.xml new file mode 100755 index 0000000..e337b60 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/AdvertisementParser.java b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/AdvertisementParser.java new file mode 100755 index 0000000..ba48440 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/AdvertisementParser.java @@ -0,0 +1,106 @@ +package ai.longev.flutter.flutter_ble; + + +import com.google.protobuf.ByteString; +import ai.longev.flutter.flutter_ble.Protos; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.charset.StandardCharsets; +import java.util.UUID; + +/** + * Parser of Bluetooth Advertisement packets. + */ +class AdvertisementParser { + + /** + * Parses packet data into {@link Protos.AdvertisementData} structure. + * + * @param rawData The scan record data. + * @return An AdvertisementData proto object. + * @throws ArrayIndexOutOfBoundsException if the input is truncated. + */ + static Protos.AdvertisementData parse(byte[] rawData) { + ByteBuffer data = ByteBuffer.wrap(rawData).asReadOnlyBuffer().order(ByteOrder.LITTLE_ENDIAN); + Protos.AdvertisementData.Builder ret = Protos.AdvertisementData.newBuilder(); + boolean seenLongLocalName = false; + do { + int length = data.get() & 0xFF; + if (length == 0) { + break; + } + if (length > data.remaining()) { + throw new ArrayIndexOutOfBoundsException("Not enough data."); + } + + int type = data.get() & 0xFF; + length--; + + switch (type) { + case 0x08: // Short local name. + case 0x09: { // Long local name. + if (seenLongLocalName) { + // Prefer the long name over the short. + data.position(data.position() + length); + break; + } + byte[] name = new byte[length]; + data.get(name); + ret.setLocalName(new String(name, StandardCharsets.UTF_8)); + if (type == 0x09) { + seenLongLocalName = true; + } + break; + } + case 0x0A: { // Power level. + ret.setTxPowerLevel(Protos.Int32Value.newBuilder().setValue(data.get())); + break; + } + case 0x16: // Service Data with 16 bit UUID. + case 0x20: // Service Data with 32 bit UUID. + case 0x21: { // Service Data with 128 bit UUID. + UUID uuid; + int remainingDataLength = 0; + if (type == 0x16 || type == 0x20) { + long uuidValue; + if (type == 0x16) { + uuidValue = data.getShort() & 0xFFFF; + remainingDataLength = length - 2; + } else { + uuidValue = data.getInt() & 0xFFFFFFFF; + remainingDataLength = length - 4; + } + uuid = UUID.fromString(String.format("%08x-0000-1000-8000-00805f9b34fb", uuidValue)); + } else { + long msb = data.getLong(); + long lsb = data.getLong(); + uuid = new UUID(msb, lsb); + remainingDataLength = length - 16; + } + byte[] remainingData = new byte[remainingDataLength]; + data.get(remainingData); + ret.putServiceData(uuid.toString(), ByteString.copyFrom(remainingData)); + break; + } + case 0xFF: {// Manufacturer specific data. + if (length < 2) { + throw new ArrayIndexOutOfBoundsException("Not enough data for Manufacturer specific data."); + } + int manufacturerId = data.getShort(); + if ((length - 2) > 0) { + byte[] msd = new byte[length - 2]; + data.get(msd); + ret.putManufacturerData(manufacturerId, ByteString.copyFrom(msd)); + } + break; + } + default: { + data.position(data.position() + length); + break; + } + } + } while (true); + return ret.build(); + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/FlutterBlePlugin.java b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/FlutterBlePlugin.java new file mode 100755 index 0000000..08a3f89 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/FlutterBlePlugin.java @@ -0,0 +1,884 @@ +package ai.longev.flutter.flutter_ble; + +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import android.Manifest; +import android.annotation.TargetApi; +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothGatt; +import android.bluetooth.BluetoothGattCallback; +import android.bluetooth.BluetoothGattCharacteristic; +import android.bluetooth.BluetoothGattDescriptor; +import android.bluetooth.BluetoothGattService; +import android.bluetooth.BluetoothManager; +import android.bluetooth.BluetoothProfile; +import android.bluetooth.le.BluetoothLeScanner; +import android.bluetooth.le.ScanCallback; +import android.bluetooth.le.ScanFilter; +import android.bluetooth.le.ScanResult; +import android.bluetooth.le.ScanSettings; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.pm.PackageManager; +import android.os.Build; +import android.os.ParcelUuid; +import android.util.Log; + +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; + +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import io.flutter.plugin.common.EventChannel; +import io.flutter.plugin.common.EventChannel.EventSink; +import io.flutter.plugin.common.EventChannel.StreamHandler; +import io.flutter.plugin.common.MethodCall; +import io.flutter.plugin.common.MethodChannel; +import io.flutter.plugin.common.MethodChannel.MethodCallHandler; +import io.flutter.plugin.common.MethodChannel.Result; +import io.flutter.plugin.common.PluginRegistry.Registrar; +import io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener; + + +/** + * FlutterBlePlugin + */ +public class FlutterBlePlugin implements MethodCallHandler, RequestPermissionsResultListener { + private static final String TAG = "FlutterBlePlugin"; + private static final String NAMESPACE = "ai.longev.flutter/flutter_ble"; + private static final int REQUEST_COARSE_LOCATION_PERMISSIONS = 1452; + static final private UUID CCCD_ID = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"); + private final Registrar registrar; + private final MethodChannel channel; + private final EventChannel stateChannel; + private final EventChannel scanResultChannel; + private final EventChannel servicesDiscoveredChannel; + private final EventChannel characteristicReadChannel; + private final EventChannel descriptorReadChannel; + private final BluetoothManager mBluetoothManager; + private final Map mGattServers = new HashMap<>(); + private final StreamHandler stateHandler = new StreamHandler() { + private EventSink sink; + + private final BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + final String action = intent.getAction(); + + if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { + final int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, + BluetoothAdapter.ERROR); + switch (state) { + case BluetoothAdapter.STATE_OFF: + sink.success(Protos.BluetoothState.newBuilder().setState(Protos.BluetoothState.State.OFF).build().toByteArray()); + break; + case BluetoothAdapter.STATE_TURNING_OFF: + sink.success(Protos.BluetoothState.newBuilder().setState(Protos.BluetoothState.State.TURNING_OFF).build().toByteArray()); + break; + case BluetoothAdapter.STATE_ON: + sink.success(Protos.BluetoothState.newBuilder().setState(Protos.BluetoothState.State.ON).build().toByteArray()); + break; + case BluetoothAdapter.STATE_TURNING_ON: + sink.success(Protos.BluetoothState.newBuilder().setState(Protos.BluetoothState.State.TURNING_ON).build().toByteArray()); + break; + } + } + } + }; + + @Override + public void onListen(Object o, EventChannel.EventSink eventSink) { + sink = eventSink; + IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED); + registrar.activity().registerReceiver(mReceiver, filter); + } + + @Override + public void onCancel(Object o) { + sink = null; + registrar.activity().unregisterReceiver(mReceiver); + } + }; + private BluetoothAdapter mBluetoothAdapter; + private LogLevel logLevel = LogLevel.EMERGENCY; + // Pending call and result for startScan, in the case where permissions are needed + private MethodCall pendingCall; + private Result pendingResult; + private ScanCallback scanCallback21; + private BluetoothAdapter.LeScanCallback scanCallback18; + private EventSink scanResultsSink; + private final StreamHandler scanResultsHandler = new StreamHandler() { + @Override + public void onListen(Object o, EventChannel.EventSink eventSink) { + scanResultsSink = eventSink; + } + + @Override + public void onCancel(Object o) { + scanResultsSink = null; + } + }; + private EventSink servicesDiscoveredSink; + private final StreamHandler servicesDiscoveredHandler = new StreamHandler() { + @Override + public void onListen(Object o, EventChannel.EventSink eventSink) { + servicesDiscoveredSink = eventSink; + } + + @Override + public void onCancel(Object o) { + servicesDiscoveredSink = null; + } + }; + private EventSink characteristicReadSink; + private final StreamHandler characteristicReadHandler = new StreamHandler() { + @Override + public void onListen(Object o, EventChannel.EventSink eventSink) { + characteristicReadSink = eventSink; + } + + @Override + public void onCancel(Object o) { + characteristicReadSink = null; + } + }; + private EventSink descriptorReadSink; + private final StreamHandler descriptorReadHandler = new StreamHandler() { + @Override + public void onListen(Object o, EventChannel.EventSink eventSink) { + descriptorReadSink = eventSink; + } + + @Override + public void onCancel(Object o) { + descriptorReadSink = null; + } + }; + private final BluetoothGattCallback mGattCallback = new BluetoothGattCallback() { + @Override + public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { + log(LogLevel.DEBUG, "[onConnectionStateChange] status: " + status + " newState: " + newState); + channel.invokeMethod("DeviceState", ProtoMaker.from(gatt.getDevice(), newState).toByteArray()); + } + + @Override + public void onServicesDiscovered(BluetoothGatt gatt, int status) { + log(LogLevel.DEBUG, "[onServicesDiscovered] count: " + gatt.getServices().size() + " status: " + status); + if (servicesDiscoveredSink != null) { + Protos.DiscoverServicesResult.Builder p = Protos.DiscoverServicesResult.newBuilder(); + p.setRemoteId(gatt.getDevice().getAddress()); + for (BluetoothGattService s : gatt.getServices()) { + p.addServices(ProtoMaker.from(gatt.getDevice(), s, gatt)); + } + servicesDiscoveredSink.success(p.build().toByteArray()); + } + } + + @Override + public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { + log(LogLevel.DEBUG, "[onCharacteristicRead] uuid: " + characteristic.getUuid().toString() + " status: " + status); + if (characteristicReadSink != null) { + Protos.ReadCharacteristicResponse.Builder p = Protos.ReadCharacteristicResponse.newBuilder(); + p.setRemoteId(gatt.getDevice().getAddress()); + p.setCharacteristic(ProtoMaker.from(characteristic, gatt)); + characteristicReadSink.success(p.build().toByteArray()); + } + } + + @Override + public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { + log(LogLevel.DEBUG, "[onCharacteristicWrite] uuid: " + characteristic.getUuid().toString() + " status: " + status); + Protos.WriteCharacteristicRequest.Builder request = Protos.WriteCharacteristicRequest.newBuilder(); + request.setRemoteId(gatt.getDevice().getAddress()); + request.setCharacteristicUuid(characteristic.getUuid().toString()); + request.setServiceUuid(characteristic.getService().getUuid().toString()); + Protos.WriteCharacteristicResponse.Builder p = Protos.WriteCharacteristicResponse.newBuilder(); + p.setRequest(request); + p.setSuccess(status == BluetoothGatt.GATT_SUCCESS); + channel.invokeMethod("WriteCharacteristicResponse", p.build().toByteArray()); + } + + @Override + public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) { + log(LogLevel.DEBUG, "[onCharacteristicChanged] uuid: " + characteristic.getUuid().toString()); + Protos.OnNotificationResponse.Builder p = Protos.OnNotificationResponse.newBuilder(); + p.setRemoteId(gatt.getDevice().getAddress()); + p.setCharacteristic(ProtoMaker.from(characteristic, gatt)); + channel.invokeMethod("OnValueChanged", p.build().toByteArray()); + } + + @Override + public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) { + log(LogLevel.DEBUG, "[onDescriptorRead] uuid: " + descriptor.getUuid().toString() + " status: " + status); + if (descriptorReadSink != null) { + // Rebuild the ReadAttributeRequest and send back along with response + Protos.ReadDescriptorRequest.Builder q = Protos.ReadDescriptorRequest.newBuilder(); + q.setRemoteId(gatt.getDevice().getAddress()); + q.setCharacteristicUuid(descriptor.getCharacteristic().getUuid().toString()); + q.setDescriptorUuid(descriptor.getUuid().toString()); + if (descriptor.getCharacteristic().getService().getType() == BluetoothGattService.SERVICE_TYPE_PRIMARY) { + q.setServiceUuid(descriptor.getCharacteristic().getService().getUuid().toString()); + } else { + // Reverse search to find service + for (BluetoothGattService s : gatt.getServices()) { + for (BluetoothGattService ss : s.getIncludedServices()) { + if (ss.getUuid().equals(descriptor.getCharacteristic().getService().getUuid())) { + q.setServiceUuid(s.getUuid().toString()); + q.setSecondaryServiceUuid(ss.getUuid().toString()); + break; + } + } + } + } + Protos.ReadDescriptorResponse.Builder p = Protos.ReadDescriptorResponse.newBuilder(); + p.setRequest(q); + p.setValue(ByteString.copyFrom(descriptor.getValue())); + descriptorReadSink.success(p.build().toByteArray()); + } + + } + + @Override + public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) { + log(LogLevel.DEBUG, "[onDescriptorWrite] uuid: " + descriptor.getUuid().toString() + " status: " + status); + Protos.WriteDescriptorRequest.Builder request = Protos.WriteDescriptorRequest.newBuilder(); + request.setRemoteId(gatt.getDevice().getAddress()); + request.setDescriptorUuid(descriptor.getUuid().toString()); + request.setCharacteristicUuid(descriptor.getCharacteristic().getUuid().toString()); + request.setServiceUuid(descriptor.getCharacteristic().getService().getUuid().toString()); + Protos.WriteDescriptorResponse.Builder p = Protos.WriteDescriptorResponse.newBuilder(); + p.setRequest(request); + p.setSuccess(status == BluetoothGatt.GATT_SUCCESS); + channel.invokeMethod("WriteDescriptorResponse", p.build().toByteArray()); + + if (descriptor.getUuid().compareTo(CCCD_ID) == 0) { + // SetNotificationResponse + Protos.SetNotificationResponse.Builder q = Protos.SetNotificationResponse.newBuilder(); + q.setRemoteId(gatt.getDevice().getAddress()); + q.setCharacteristic(ProtoMaker.from(descriptor.getCharacteristic(), gatt)); + channel.invokeMethod("SetNotificationResponse", q.build().toByteArray()); + } + } + + @Override + public void onReliableWriteCompleted(BluetoothGatt gatt, int status) { + log(LogLevel.DEBUG, "[onReliableWriteCompleted] status: " + status); + } + + @Override + public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) { + log(LogLevel.DEBUG, "[onReadRemoteRssi] rssi: " + rssi + " status: " + status); + } + + @Override + public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) { + log(LogLevel.DEBUG, "[onMtuChanged] mtu: " + mtu + " status: " + status); + } + }; + + FlutterBlePlugin(Registrar r) { + this.registrar = r; + this.channel = new MethodChannel(registrar.messenger(), NAMESPACE + "/methods"); + this.stateChannel = new EventChannel(registrar.messenger(), NAMESPACE + "/state"); + this.scanResultChannel = new EventChannel(registrar.messenger(), NAMESPACE + "/scanResult"); + this.servicesDiscoveredChannel = new EventChannel(registrar.messenger(), NAMESPACE + "/servicesDiscovered"); + this.characteristicReadChannel = new EventChannel(registrar.messenger(), NAMESPACE + "/characteristicRead"); + this.descriptorReadChannel = new EventChannel(registrar.messenger(), NAMESPACE + "/descriptorRead"); + this.mBluetoothManager = (BluetoothManager) r.activity().getSystemService(Context.BLUETOOTH_SERVICE); + this.mBluetoothAdapter = mBluetoothManager.getAdapter(); + channel.setMethodCallHandler(this); + stateChannel.setStreamHandler(stateHandler); + scanResultChannel.setStreamHandler(scanResultsHandler); + servicesDiscoveredChannel.setStreamHandler(servicesDiscoveredHandler); + characteristicReadChannel.setStreamHandler(characteristicReadHandler); + descriptorReadChannel.setStreamHandler(descriptorReadHandler); + } + + /** + * Plugin registration. + */ + public static void registerWith(Registrar registrar) { + final FlutterBlePlugin instance = new FlutterBlePlugin(registrar); + registrar.addRequestPermissionsResultListener(instance); + } + + @Override + public void onMethodCall(MethodCall call, Result result) { + if (mBluetoothAdapter == null && !"isAvailable".equals(call.method)) { + result.error("bluetooth_unavailable", "the device does not have bluetooth", null); + return; + } + + switch (call.method) { + case "setLogLevel": { + int logLevelIndex = (int) call.arguments; + logLevel = LogLevel.values()[logLevelIndex]; + result.success(null); + break; + } + + case "state": { + Protos.BluetoothState.Builder p = Protos.BluetoothState.newBuilder(); + try { + switch (mBluetoothAdapter.getState()) { + case BluetoothAdapter.STATE_OFF: + p.setState(Protos.BluetoothState.State.OFF); + break; + case BluetoothAdapter.STATE_ON: + p.setState(Protos.BluetoothState.State.ON); + break; + case BluetoothAdapter.STATE_TURNING_OFF: + p.setState(Protos.BluetoothState.State.TURNING_OFF); + break; + case BluetoothAdapter.STATE_TURNING_ON: + p.setState(Protos.BluetoothState.State.TURNING_ON); + break; + default: + p.setState(Protos.BluetoothState.State.UNKNOWN); + break; + } + } catch (SecurityException e) { + p.setState(Protos.BluetoothState.State.UNAUTHORIZED); + } + result.success(p.build().toByteArray()); + break; + } + + case "isAvailable": { + result.success(mBluetoothAdapter != null); + break; + } + + case "isOn": { + result.success(mBluetoothAdapter.isEnabled()); + break; + } + + case "startScan": { + if (ContextCompat.checkSelfPermission(registrar.activity(), Manifest.permission.ACCESS_COARSE_LOCATION) + != PackageManager.PERMISSION_GRANTED) { + ActivityCompat.requestPermissions( + registrar.activity(), + new String[]{ + Manifest.permission.ACCESS_COARSE_LOCATION + }, + REQUEST_COARSE_LOCATION_PERMISSIONS); + pendingCall = call; + pendingResult = result; + break; + } + startScan(call, result); + break; + } + + case "stopScan": { + stopScan(); + result.success(null); + break; + } + + case "connect": { + byte[] data = call.arguments(); + Protos.ConnectRequest options; + try { + options = Protos.ConnectRequest.newBuilder().mergeFrom(data).build(); + } catch (InvalidProtocolBufferException e) { + result.error("RuntimeException", e.getMessage(), e); + break; + } + String deviceId = options.getRemoteId(); + BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(deviceId); + boolean isConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT).contains(device); + + // If device is already connected, return error + if (mGattServers.containsKey(deviceId) && isConnected) { + result.error("already_connected", "connection with device already exists", null); + return; + } + + // If device was connected to previously but is now disconnected, attempt a reconnect + if (mGattServers.containsKey(deviceId) && !isConnected) { + if (!mGattServers.get(deviceId).connect()) { + result.error("reconnect_error", "error when reconnecting to device", null); + return; + } + } + + // New request, connect and add gattServer to Map + BluetoothGatt gattServer = device.connectGatt(registrar.activity(), options.getAndroidAutoConnect(), mGattCallback); + mGattServers.put(deviceId, gattServer); + result.success(null); + break; + } + + case "createBond": { + byte[] data = call.arguments(); + Protos.ConnectRequest options; + try { + options = Protos.ConnectRequest.newBuilder().mergeFrom(data).build(); + } catch (InvalidProtocolBufferException e) { + result.error("RuntimeException", e.getMessage(), e); + break; + } + String deviceId = options.getRemoteId(); + BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(deviceId); + boolean isConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT).contains(device); + if (mGattServers.containsKey(deviceId) && !isConnected) { + if (device.createBond()) { + result.success(null); + } else { + result.error(" bond error", "create bond error", null); + } + } + return; + } + + case "disconnect": { + String deviceId = (String) call.arguments; + BluetoothGatt gattServer = mGattServers.remove(deviceId); + if (gattServer != null) { + gattServer.close(); + } + result.success(null); + break; + } + + case "deviceState": { + String deviceId = (String) call.arguments; + BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(deviceId); + int state = mBluetoothManager.getConnectionState(device, BluetoothProfile.GATT); + try { + result.success(ProtoMaker.from(device, state).toByteArray()); + } catch (Exception e) { + result.error("device_state_error", e.getMessage(), null); + } + break; + } + + case "discoverServices": { + String deviceId = (String) call.arguments; + BluetoothGatt gattServer = mGattServers.get(deviceId); + if (gattServer == null) { + result.error("discover_services_error", "no instance of BluetoothGatt, have you connected first?", null); + return; + } + if (gattServer.discoverServices()) { + result.success(null); + } else { + result.error("discover_services_error", "unknown reason", null); + } + break; + } + + case "services": { + String deviceId = (String) call.arguments; + BluetoothGatt gattServer = mGattServers.get(deviceId); + if (gattServer == null) { + result.error("get_services_error", "no instance of BluetoothGatt, have you connected first?", null); + return; + } + if (gattServer.getServices().isEmpty()) { + result.error("get_services_error", "services are empty, have you called discoverServices() yet?", null); + return; + } + Protos.DiscoverServicesResult.Builder p = Protos.DiscoverServicesResult.newBuilder(); + p.setRemoteId(deviceId); + for (BluetoothGattService s : gattServer.getServices()) { + p.addServices(ProtoMaker.from(gattServer.getDevice(), s, gattServer)); + } + result.success(p.build().toByteArray()); + break; + } + + case "readCharacteristic": { + byte[] data = call.arguments(); + Protos.ReadCharacteristicRequest request; + try { + request = Protos.ReadCharacteristicRequest.newBuilder().mergeFrom(data).build(); + } catch (InvalidProtocolBufferException e) { + result.error("RuntimeException", e.getMessage(), e); + break; + } + + BluetoothGatt gattServer; + BluetoothGattCharacteristic characteristic; + try { + gattServer = locateGatt(request.getRemoteId()); + characteristic = locateCharacteristic(gattServer, request.getServiceUuid(), request.getSecondaryServiceUuid(), request.getCharacteristicUuid()); + } catch (Exception e) { + result.error("read_characteristic_error", e.getMessage(), null); + return; + } + + if (gattServer.readCharacteristic(characteristic)) { + result.success(null); + } else { + result.error("read_characteristic_error", "unknown reason, may occur if readCharacteristic was called before last read finished.", null); + } + break; + } + + case "readDescriptor": { + byte[] data = call.arguments(); + Protos.ReadDescriptorRequest request; + try { + request = Protos.ReadDescriptorRequest.newBuilder().mergeFrom(data).build(); + } catch (InvalidProtocolBufferException e) { + result.error("RuntimeException", e.getMessage(), e); + break; + } + + BluetoothGatt gattServer; + BluetoothGattCharacteristic characteristic; + BluetoothGattDescriptor descriptor; + try { + gattServer = locateGatt(request.getRemoteId()); + characteristic = locateCharacteristic(gattServer, request.getServiceUuid(), request.getSecondaryServiceUuid(), request.getCharacteristicUuid()); + descriptor = locateDescriptor(characteristic, request.getDescriptorUuid()); + } catch (Exception e) { + result.error("read_descriptor_error", e.getMessage(), null); + return; + } + + if (gattServer.readDescriptor(descriptor)) { + result.success(null); + } else { + result.error("read_descriptor_error", "unknown reason, may occur if readDescriptor was called before last read finished.", null); + } + break; + } + + case "writeCharacteristic": { + byte[] data = call.arguments(); + Protos.WriteCharacteristicRequest request; + try { + request = Protos.WriteCharacteristicRequest.newBuilder().mergeFrom(data).build(); + } catch (InvalidProtocolBufferException e) { + result.error("RuntimeException", e.getMessage(), e); + break; + } + + BluetoothGatt gattServer; + BluetoothGattCharacteristic characteristic; + try { + gattServer = locateGatt(request.getRemoteId()); + characteristic = locateCharacteristic(gattServer, request.getServiceUuid(), request.getSecondaryServiceUuid(), request.getCharacteristicUuid()); + } catch (Exception e) { + result.error("write_characteristic_error", e.getMessage(), null); + return; + } + + // Set characteristic to new value + if (!characteristic.setValue(request.getValue().toByteArray())) { + result.error("write_characteristic_error", "could not set the local value of characteristic", null); + } + + // Apply the correct write type + if (request.getWriteType() == Protos.WriteCharacteristicRequest.WriteType.WITHOUT_RESPONSE) { + characteristic.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_NO_RESPONSE); + } else { + characteristic.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT); + } + + if (!gattServer.writeCharacteristic(characteristic)) { + result.error("write_characteristic_error", "writeCharacteristic failed", null); + return; + } + + result.success(null); + break; + } + + case "writeDescriptor": { + byte[] data = call.arguments(); + Protos.WriteDescriptorRequest request; + try { + request = Protos.WriteDescriptorRequest.newBuilder().mergeFrom(data).build(); + } catch (InvalidProtocolBufferException e) { + result.error("RuntimeException", e.getMessage(), e); + break; + } + + BluetoothGatt gattServer; + BluetoothGattCharacteristic characteristic; + BluetoothGattDescriptor descriptor; + try { + gattServer = locateGatt(request.getRemoteId()); + characteristic = locateCharacteristic(gattServer, request.getServiceUuid(), request.getSecondaryServiceUuid(), request.getCharacteristicUuid()); + descriptor = locateDescriptor(characteristic, request.getDescriptorUuid()); + } catch (Exception e) { + result.error("write_descriptor_error", e.getMessage(), null); + return; + } + + // Set descriptor to new value + if (!descriptor.setValue(request.getValue().toByteArray())) { + result.error("write_descriptor_error", "could not set the local value for descriptor", null); + } + + if (!gattServer.writeDescriptor(descriptor)) { + result.error("write_descriptor_error", "writeCharacteristic failed", null); + return; + } + + result.success(null); + break; + } + + case "setNotification": { + byte[] data = call.arguments(); + Protos.SetNotificationRequest request; + try { + request = Protos.SetNotificationRequest.newBuilder().mergeFrom(data).build(); + } catch (InvalidProtocolBufferException e) { + result.error("RuntimeException", e.getMessage(), e); + break; + } + + BluetoothGatt gattServer; + BluetoothGattCharacteristic characteristic; + BluetoothGattDescriptor cccDescriptor; + try { + gattServer = locateGatt(request.getRemoteId()); + characteristic = locateCharacteristic(gattServer, request.getServiceUuid(), request.getSecondaryServiceUuid(), request.getCharacteristicUuid()); + cccDescriptor = characteristic.getDescriptor(CCCD_ID); + if (cccDescriptor == null) { + throw new Exception("could not locate CCCD descriptor for characteristic: " + characteristic.getUuid().toString()); + } + } catch (Exception e) { + result.error("set_notification_error", e.getMessage(), null); + return; + } + + byte[] value = null; + + if (request.getEnable()) { + boolean canNotify = (characteristic.getProperties() & BluetoothGattCharacteristic.PROPERTY_NOTIFY) > 0; + boolean canIndicate = (characteristic.getProperties() & BluetoothGattCharacteristic.PROPERTY_INDICATE) > 0; + if (!canIndicate && !canNotify) { + result.error("set_notification_error", "the characteristic cannot notify or indicate", null); + return; + } + if (canIndicate) { + value = BluetoothGattDescriptor.ENABLE_INDICATION_VALUE; + } + if (canNotify) { + value = BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE; + } + } else { + value = BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE; + } + + if (!gattServer.setCharacteristicNotification(characteristic, request.getEnable())) { + result.error("set_notification_error", "could not set characteristic notifications to :" + request.getEnable(), null); + return; + } + + if (!cccDescriptor.setValue(value)) { + result.error("set_notification_error", "error when setting the descriptor value to: " + value, null); + return; + } + + if (!gattServer.writeDescriptor(cccDescriptor)) { + result.error("set_notification_error", "error when writing the descriptor", null); + return; + } + + result.success(null); + break; + } + + default: { + result.notImplemented(); + break; + } + } + } + + @Override + public boolean onRequestPermissionsResult( + int requestCode, String[] permissions, int[] grantResults) { + if (requestCode == REQUEST_COARSE_LOCATION_PERMISSIONS) { + if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { + startScan(pendingCall, pendingResult); + } else { + pendingResult.error( + "no_permissions", "flutter_blue plugin requires location permissions for scanning", null); + pendingResult = null; + pendingCall = null; + } + return true; + } + return false; + } + + private BluetoothGatt locateGatt(String remoteId) throws Exception { + BluetoothGatt gattServer = mGattServers.get(remoteId); + if (gattServer == null) { + throw new Exception("no instance of BluetoothGatt, have you connected first?"); + } + return gattServer; + } + + private BluetoothGattCharacteristic locateCharacteristic(BluetoothGatt gattServer, String serviceId, String secondaryServiceId, String characteristicId) throws Exception { + BluetoothGattService primaryService = gattServer.getService(UUID.fromString(serviceId)); + if (primaryService == null) { + throw new Exception("service (" + serviceId + ") could not be located on the device"); + } + BluetoothGattService secondaryService = null; + if (secondaryServiceId.length() > 0) { + for (BluetoothGattService s : primaryService.getIncludedServices()) { + if (s.getUuid().equals(UUID.fromString(secondaryServiceId))) { + secondaryService = s; + } + } + if (secondaryService == null) { + throw new Exception("secondary service (" + secondaryServiceId + ") could not be located on the device"); + } + } + BluetoothGattService service = (secondaryService != null) ? secondaryService : primaryService; + BluetoothGattCharacteristic characteristic = service.getCharacteristic(UUID.fromString(characteristicId)); + if (characteristic == null) { + throw new Exception("characteristic (" + characteristicId + ") could not be located in the service (" + service.getUuid().toString() + ")"); + } + return characteristic; + } + + private BluetoothGattDescriptor locateDescriptor(BluetoothGattCharacteristic characteristic, String descriptorId) throws Exception { + BluetoothGattDescriptor descriptor = characteristic.getDescriptor(UUID.fromString(descriptorId)); + if (descriptor == null) { + throw new Exception("descriptor (" + descriptorId + ") could not be located in the characteristic (" + characteristic.getUuid().toString() + ")"); + } + return descriptor; + } + + private void startScan(MethodCall call, Result result) { + byte[] data = call.arguments(); + Protos.ScanSettings settings; + try { + settings = Protos.ScanSettings.newBuilder().mergeFrom(data).build(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + startScan21(settings); + } else { + startScan18(settings); + } + result.success(null); + } catch (Exception e) { + result.error("startScan", e.getMessage(), e); + } + } + + private void stopScan() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + stopScan21(); + } else { + stopScan18(); + } + } + + @TargetApi(21) + private ScanCallback getScanCallback21() { + if (scanCallback21 == null) { + scanCallback21 = new ScanCallback() { + + @Override + public void onScanResult(int callbackType, ScanResult result) { + super.onScanResult(callbackType, result); + if (scanResultsSink != null) { + Protos.ScanResult scanResult = ProtoMaker.from(result.getDevice(), result); + scanResultsSink.success(scanResult.toByteArray()); + } + } + + @Override + public void onBatchScanResults(List results) { + super.onBatchScanResults(results); + + } + + @Override + public void onScanFailed(int errorCode) { + super.onScanFailed(errorCode); + } + }; + } + return scanCallback21; + } + + @TargetApi(21) + private void startScan21(Protos.ScanSettings proto) throws IllegalStateException { + BluetoothLeScanner scanner = mBluetoothAdapter.getBluetoothLeScanner(); + if (scanner == null) + throw new IllegalStateException("getBluetoothLeScanner() is null. Is the Adapter on?"); + int scanMode = proto.getAndroidScanMode(); + int count = proto.getServiceUuidsCount(); + List filters = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + String uuid = proto.getServiceUuids(i); + ScanFilter f = new ScanFilter.Builder().setServiceUuid(ParcelUuid.fromString(uuid)).build(); + filters.add(f); + } + ScanSettings settings = new ScanSettings.Builder().setScanMode(scanMode).build(); + scanner.startScan(filters, settings, getScanCallback21()); + } + + @TargetApi(21) + private void stopScan21() { + BluetoothLeScanner scanner = mBluetoothAdapter.getBluetoothLeScanner(); + if (scanner != null) scanner.stopScan(getScanCallback21()); + } + + private BluetoothAdapter.LeScanCallback getScanCallback18() { + if (scanCallback18 == null) { + scanCallback18 = new BluetoothAdapter.LeScanCallback() { + @Override + public void onLeScan(final BluetoothDevice bluetoothDevice, int rssi, + byte[] scanRecord) { + if (scanResultsSink != null) { + Protos.ScanResult scanResult = ProtoMaker.from(bluetoothDevice, scanRecord, rssi); + scanResultsSink.success(scanResult.toByteArray()); + } + } + }; + } + return scanCallback18; + } + + private void startScan18(Protos.ScanSettings proto) throws IllegalStateException { + List serviceUuids = proto.getServiceUuidsList(); + UUID[] uuids = new UUID[serviceUuids.size()]; + for (int i = 0; i < serviceUuids.size(); i++) { + uuids[i] = UUID.fromString(serviceUuids.get(i)); + } + boolean success = mBluetoothAdapter.startLeScan(uuids, getScanCallback18()); + if (!success) + throw new IllegalStateException("getBluetoothLeScanner() is null. Is the Adapter on?"); + } + + private void stopScan18() { + mBluetoothAdapter.stopLeScan(getScanCallback18()); + } + + private void log(LogLevel level, String message) { + if (level.ordinal() <= logLevel.ordinal()) { + Log.d(TAG, message); + } + } + + enum LogLevel { + EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG + } + +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/ProtoMaker.java b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/ProtoMaker.java new file mode 100755 index 0000000..68d998c --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/android/src/main/java/ai/longev/flutter/flutter_ble/ProtoMaker.java @@ -0,0 +1,205 @@ +package ai.longev.flutter.flutter_ble; + +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + + +import android.annotation.TargetApi; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothGatt; +import android.bluetooth.BluetoothGattCharacteristic; +import android.bluetooth.BluetoothGattDescriptor; +import android.bluetooth.BluetoothGattService; +import android.bluetooth.BluetoothProfile; +import android.bluetooth.le.ScanRecord; +import android.bluetooth.le.ScanResult; +import android.os.Build; +import android.os.ParcelUuid; +import android.util.SparseArray; + +import com.google.protobuf.ByteString; + + +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** + * Created by paul on 8/31/17. + */ + +public class ProtoMaker { + + private static final UUID CCCD_UUID = UUID.fromString("000002902-0000-1000-8000-00805f9b34fb"); + + static Protos.ScanResult from(BluetoothDevice device, byte[] advertisementData, int rssi) { + Protos.ScanResult.Builder p = Protos.ScanResult.newBuilder(); + p.setDevice(from(device)); + if (advertisementData != null && advertisementData.length > 0) + p.setAdvertisementData(AdvertisementParser.parse(advertisementData)); + p.setRssi(rssi); + return p.build(); + } + + @TargetApi(21) + static Protos.ScanResult from(BluetoothDevice device, ScanResult scanResult) { + Protos.ScanResult.Builder p = Protos.ScanResult.newBuilder(); + p.setDevice(from(device)); + Protos.AdvertisementData.Builder a = Protos.AdvertisementData.newBuilder(); + ScanRecord scanRecord = scanResult.getScanRecord(); + if (Build.VERSION.SDK_INT >= 26) { + a.setConnectable(scanResult.isConnectable()); + } else { + if (scanRecord != null) { + int flags = scanRecord.getAdvertiseFlags(); + a.setConnectable((flags & 0x2) > 0); + } + } + if (scanRecord != null) { + String deviceName = scanRecord.getDeviceName(); + if (deviceName != null) { + a.setLocalName(deviceName); + } + int txPower = scanRecord.getTxPowerLevel(); + if (txPower != Integer.MIN_VALUE) { + a.setTxPowerLevel(Protos.Int32Value.newBuilder().setValue(txPower)); + } + // Manufacturer Specific Data + SparseArray msd = scanRecord.getManufacturerSpecificData(); + for (int i = 0; i < msd.size(); i++) { + int key = msd.keyAt(i); + byte[] value = msd.valueAt(i); + a.putManufacturerData(key, ByteString.copyFrom(value)); + } + // Service Data + Map serviceData = scanRecord.getServiceData(); + for (Map.Entry entry : serviceData.entrySet()) { + ParcelUuid key = entry.getKey(); + byte[] value = entry.getValue(); + a.putServiceData(key.getUuid().toString(), ByteString.copyFrom(value)); + } + // Service UUIDs + List serviceUuids = scanRecord.getServiceUuids(); + if (serviceUuids != null) { + for (ParcelUuid s : serviceUuids) { + a.addServiceUuids(s.getUuid().toString()); + } + } + } + p.setRssi(scanResult.getRssi()); + p.setAdvertisementData(a.build()); + return p.build(); + } + + static Protos.BluetoothDevice from(BluetoothDevice device) { + Protos.BluetoothDevice.Builder p = Protos.BluetoothDevice.newBuilder(); + p.setRemoteId(device.getAddress()); + String name = device.getName(); + if (name != null) { + p.setName(name); + } + switch (device.getType()) { + case BluetoothDevice.DEVICE_TYPE_LE: + p.setType(Protos.BluetoothDevice.Type.LE); + break; + case BluetoothDevice.DEVICE_TYPE_CLASSIC: + p.setType(Protos.BluetoothDevice.Type.CLASSIC); + break; + case BluetoothDevice.DEVICE_TYPE_DUAL: + p.setType(Protos.BluetoothDevice.Type.DUAL); + break; + default: + p.setType(Protos.BluetoothDevice.Type.UNKNOWN); + break; + } + return p.build(); + } + + static Protos.BluetoothService from(BluetoothDevice device, BluetoothGattService service, BluetoothGatt gatt) { + Protos.BluetoothService.Builder p = Protos.BluetoothService.newBuilder(); + p.setRemoteId(device.getAddress()); + p.setUuid(service.getUuid().toString()); + p.setIsPrimary(service.getType() == BluetoothGattService.SERVICE_TYPE_PRIMARY); + for (BluetoothGattCharacteristic c : service.getCharacteristics()) { + p.addCharacteristics(from(c, gatt)); + } + for (BluetoothGattService s : service.getIncludedServices()) { + p.addIncludedServices(from(device, s, gatt)); + } + return p.build(); + } + + static Protos.BluetoothCharacteristic from(BluetoothGattCharacteristic characteristic, BluetoothGatt gatt) { + Protos.BluetoothCharacteristic.Builder p = Protos.BluetoothCharacteristic.newBuilder(); + p.setUuid(characteristic.getUuid().toString()); + p.setProperties(from(characteristic.getProperties())); + if (characteristic.getValue() != null) + p.setValue(ByteString.copyFrom(characteristic.getValue())); + for (BluetoothGattDescriptor d : characteristic.getDescriptors()) { + p.addDescriptors(from(d)); + } + if (characteristic.getService().getType() == BluetoothGattService.SERVICE_TYPE_PRIMARY) { + p.setServiceUuid(characteristic.getService().getUuid().toString()); + } else { + // Reverse search to find service + for (BluetoothGattService s : gatt.getServices()) { + for (BluetoothGattService ss : s.getIncludedServices()) { + if (ss.getUuid().equals(characteristic.getService().getUuid())) { + p.setServiceUuid(s.getUuid().toString()); + p.setSecondaryServiceUuid(ss.getUuid().toString()); + break; + } + } + } + } + return p.build(); + } + + static Protos.BluetoothDescriptor from(BluetoothGattDescriptor descriptor) { + Protos.BluetoothDescriptor.Builder p = Protos.BluetoothDescriptor.newBuilder(); + p.setUuid(descriptor.getUuid().toString()); + p.setCharacteristicUuid(descriptor.getCharacteristic().getUuid().toString()); + p.setServiceUuid(descriptor.getCharacteristic().getService().getUuid().toString()); + if (descriptor.getValue() != null) + p.setValue(ByteString.copyFrom(descriptor.getValue())); + return p.build(); + } + + static Protos.CharacteristicProperties from(int properties) { + return Protos.CharacteristicProperties.newBuilder() + .setBroadcast((properties & 1) != 0) + .setRead((properties & 2) != 0) + .setWriteWithoutResponse((properties & 4) != 0) + .setWrite((properties & 8) != 0) + .setNotify((properties & 16) != 0) + .setIndicate((properties & 32) != 0) + .setAuthenticatedSignedWrites((properties & 64) != 0) + .setExtendedProperties((properties & 128) != 0) + .setNotifyEncryptionRequired((properties & 256) != 0) + .setIndicateEncryptionRequired((properties & 512) != 0) + .build(); + } + + static Protos.DeviceStateResponse from(BluetoothDevice device, int state) { + Protos.DeviceStateResponse.Builder p = Protos.DeviceStateResponse.newBuilder(); + switch (state) { + case BluetoothProfile.STATE_DISCONNECTING: + p.setState(Protos.DeviceStateResponse.BluetoothDeviceState.DISCONNECTING); + break; + case BluetoothProfile.STATE_CONNECTED: + p.setState(Protos.DeviceStateResponse.BluetoothDeviceState.CONNECTED); + break; + case BluetoothProfile.STATE_CONNECTING: + p.setState(Protos.DeviceStateResponse.BluetoothDeviceState.CONNECTING); + break; + case BluetoothProfile.STATE_DISCONNECTED: + p.setState(Protos.DeviceStateResponse.BluetoothDeviceState.DISCONNECTED); + break; + default: + break; + } + p.setRemoteId(device.getAddress()); + return p.build(); + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/.gitignore b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/.gitignore new file mode 100755 index 0000000..07488ba --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/.gitignore @@ -0,0 +1,70 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# Visual Studio Code related +.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.packages +.pub-cache/ +.pub/ +/build/ + +# Android related +**/android/**/gradle-wrapper.jar +**/android/.gradle +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/.metadata b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/.metadata new file mode 100755 index 0000000..033ad2a --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b + channel: stable + +project_type: app diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/README.md b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/README.md new file mode 100755 index 0000000..dc05c8e --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/README.md @@ -0,0 +1,16 @@ +# flutter_ble_example + +Demonstrates how to use the flutter_ble plugin. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/build.gradle b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/build.gradle new file mode 100755 index 0000000..27338c7 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/build.gradle @@ -0,0 +1,61 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 28 + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "ai.longev.flutter.flutter_ble_example" + minSdkVersion 19 + targetSdkVersion 28 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/debug/AndroidManifest.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/debug/AndroidManifest.xml new file mode 100755 index 0000000..54b3b80 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/AndroidManifest.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/AndroidManifest.xml new file mode 100755 index 0000000..2518a6c --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/java/ai/longev/flutter/flutter_ble_example/MainActivity.java b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/java/ai/longev/flutter/flutter_ble_example/MainActivity.java new file mode 100755 index 0000000..a4566d3 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/java/ai/longev/flutter/flutter_ble_example/MainActivity.java @@ -0,0 +1,13 @@ +package ai.longev.flutter.flutter_ble_example; + +import android.os.Bundle; +import io.flutter.app.FlutterActivity; +import io.flutter.plugins.GeneratedPluginRegistrant; + +public class MainActivity extends FlutterActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + GeneratedPluginRegistrant.registerWith(this); + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/drawable/launch_background.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100755 index 0000000..304732f --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100755 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100755 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100755 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100755 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!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styles.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/values/styles.xml new file mode 100755 index 0000000..00fa441 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/profile/AndroidManifest.xml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/profile/AndroidManifest.xml new file mode 100755 index 0000000..54b3b80 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/build.gradle b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/build.gradle new file mode 100755 index 0000000..1b33616 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/build.gradle @@ -0,0 +1,29 @@ +buildscript { + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.4.1' + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/gradle.properties b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/gradle.properties new file mode 100755 index 0000000..ad8917e --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/gradle.properties @@ -0,0 +1,2 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true \ No newline at end of file diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/gradle/wrapper/gradle-wrapper.properties b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100755 index 0000000..dea14c2 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri May 31 15:39:48 CDT 2019 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/settings.gradle b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/settings.gradle new file mode 100755 index 0000000..5a2f14f --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/android/settings.gradle @@ -0,0 +1,15 @@ +include ':app' + +def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + +def plugins = new Properties() +def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') +if (pluginsFile.exists()) { + pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } +} + +plugins.each { name, path -> + def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() + include ":$name" + project(":$name").projectDir = pluginDirectory +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/AppFrameworkInfo.plist b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100755 index 0000000..9367d48 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/Debug.xcconfig b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/Debug.xcconfig new file mode 100755 index 0000000..e8efba1 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/Release.xcconfig b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/Release.xcconfig new file mode 100755 index 0000000..399e934 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Podfile b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Podfile new file mode 100755 index 0000000..d077b08 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Podfile @@ -0,0 +1,69 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def parse_KV_file(file, separator='=') + file_abs_path = File.expand_path(file) + if !File.exists? file_abs_path + return []; + end + pods_ary = [] + skip_line_start_symbols = ["#", "/"] + File.foreach(file_abs_path) { |line| + next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } + plugin = line.split(pattern=separator) + if plugin.length == 2 + podname = plugin[0].strip() + path = plugin[1].strip() + podpath = File.expand_path("#{path}", file_abs_path) + pods_ary.push({:name => podname, :path => podpath}); + else + puts "Invalid plugin specification: #{line}" + end + } + return pods_ary +end + +target 'Runner' do + # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock + # referring to absolute paths on developers' machines. + system('rm -rf .symlinks') + system('mkdir -p .symlinks/plugins') + + # Flutter Pods + generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') + if generated_xcode_build_settings.empty? + puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." + end + generated_xcode_build_settings.map { |p| + if p[:name] == 'FLUTTER_FRAMEWORK_DIR' + symlink = File.join('.symlinks', 'flutter') + File.symlink(File.dirname(p[:path]), symlink) + pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) + end + } + + # Plugin Pods + plugin_pods = parse_KV_file('../.flutter-plugins') + plugin_pods.map { |p| + symlink = File.join('.symlinks', 'plugins', p[:name]) + File.symlink(p[:path], symlink) + pod p[:name], :path => File.join(symlink, 'ios') + } +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['ENABLE_BITCODE'] = 'NO' + end + end +end diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Podfile.lock b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Podfile.lock new file mode 100755 index 0000000..a316c66 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Podfile.lock @@ -0,0 +1,38 @@ +PODS: + - "!ProtoCompiler (3.7.0)": + - Protobuf (~> 3.0) + - Flutter (1.0.0) + - flutter_ble (0.5.1): + - "!ProtoCompiler" + - Flutter + - flutter_ble/Protos (= 0.5.1) + - flutter_ble/Protos (0.5.1): + - "!ProtoCompiler" + - Flutter + - Protobuf + - Protobuf (3.8.0) + +DEPENDENCIES: + - Flutter (from `.symlinks/flutter/ios`) + - flutter_ble (from `.symlinks/plugins/flutter_ble/ios`) + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - "!ProtoCompiler" + - Protobuf + +EXTERNAL SOURCES: + Flutter: + :path: ".symlinks/flutter/ios" + flutter_ble: + :path: ".symlinks/plugins/flutter_ble/ios" + +SPEC CHECKSUMS: + "!ProtoCompiler": efc8ba4dceb16b48f6b366a08500871c8d3ff8d2 + Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a + flutter_ble: c8480760bed31cb8337311c3faedfa9fcae5f9c1 + Protobuf: 3f617b9a6e73605565086864c9bc26b2bf2dd5a3 + +PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09 + +COCOAPODS: 1.7.0 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/project.pbxproj b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100755 index 0000000..cda72c5 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,577 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; + 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + A2A537F352EE5164B05911AB /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6CD001701BDC4728022DB42C /* libPods-Runner.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; + 6CD001701BDC4728022DB42C /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 7DD8CFB7F0364D55F5354FE1 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + CF6E4140832AD784A39F6B08 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + DE00DC1DC429064AF0B2580C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, + A2A537F352EE5164B05911AB /* libPods-Runner.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3A903686E102B85427835225 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6CD001701BDC4728022DB42C /* libPods-Runner.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B80C3931E831B6300D905FE /* App.framework */, + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEBA1CF902C7004384FC /* Flutter.framework */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + D6EA32F9A89D2F62F8ABD1E7 /* Pods */, + 3A903686E102B85427835225 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 97C146F21CF9000F007C117D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + D6EA32F9A89D2F62F8ABD1E7 /* Pods */ = { + isa = PBXGroup; + children = ( + DE00DC1DC429064AF0B2580C /* Pods-Runner.debug.xcconfig */, + 7DD8CFB7F0364D55F5354FE1 /* Pods-Runner.release.xcconfig */, + CF6E4140832AD784A39F6B08 /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + F4B005EC65297E62A1063D35 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 743D5EE8D0F9D613E1A63883 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0910; + ORGANIZATIONNAME = "The Chromium Authors"; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = 3D56TJUQRV; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + }; + 743D5EE8D0F9D613E1A63883 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + F4B005EC65297E62A1063D35 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, + 97C146F31CF9000F007C117D /* main.m in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 3D56TJUQRV; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = ai.longev.flutter.flutterBleExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 3D56TJUQRV; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = ai.longev.flutter.flutterBleExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 3D56TJUQRV; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = ai.longev.flutter.flutterBleExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100755 index 0000000..1d526a1 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100755 index 0000000..786d6aa --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100755 index 0000000..21a3cc1 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100755 index 0000000..18d9810 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100755 index 0000000..949b678 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + BuildSystemType + Original + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/AppDelegate.h b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/AppDelegate.h new file mode 100755 index 0000000..36e21bb --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/AppDelegate.h @@ -0,0 +1,6 @@ +#import +#import + +@interface AppDelegate : FlutterAppDelegate + +@end diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/AppDelegate.m b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/AppDelegate.m new file mode 100755 index 0000000..59a72e9 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/AppDelegate.m @@ -0,0 +1,13 @@ +#include "AppDelegate.h" +#include "GeneratedPluginRegistrant.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [GeneratedPluginRegistrant registerWithRegistry:self]; + // Override point for customization after application launch. + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +@end diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100755 index 0000000..d36b1fa --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100755 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N%z*#VXWK9Qa-OEME#fykF%|7o=1Y+eF;Rtv0W4~kKRDx9YBHOWhC%^I z$Jec0cC7o37}Xt}cu)NH5R}NT+=2Nap*`^%O)vz?+{PV<2~qX%TzdJOGeKj5_QjqR&a3*K@= P-1+_A+?hGkL;m(J7kc&K literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100755 index 0000000000000000000000000000000000000000..28c6bf03016f6c994b70f38d1b7346e5831b531f GIT binary patch literal 564 zcmV-40?Yl0P)Px$?ny*JR5%f>l)FnDQ543{x%ZCiu33$Wg!pQFfT_}?5Q|_VSlIbLC`dpoMXL}9 zHfd9&47Mo(7D231gb+kjFxZHS4-m~7WurTH&doVX2KI5sU4v(sJ1@T9eCIKPjsqSr z)C01LsCxk=72-vXmX}CQD#BD;Cthymh&~=f$Q8nn0J<}ZrusBy4PvRNE}+1ceuj8u z0mW5k8fmgeLnTbWHGwfKA3@PdZxhn|PypR&^p?weGftrtCbjF#+zk_5BJh7;0`#Wr zgDpM_;Ax{jO##IrT`Oz;MvfwGfV$zD#c2xckpcXC6oou4ML~ezCc2EtnsQTB4tWNg z?4bkf;hG7IMfhgNI(FV5Gs4|*GyMTIY0$B=_*mso9Ityq$m^S>15>-?0(zQ<8Qy<_TjHE33(?_M8oaM zyc;NxzRVK@DL6RJnX%U^xW0Gpg(lXp(!uK1v0YgHjs^ZXSQ|m#lV7ip7{`C_J2TxPmfw%h$|%acrYHt)Re^PB%O&&=~a zhS(%I#+V>J-vjIib^<+s%ludY7y^C(P8nmqn9fp!i+?vr`bziDE=bx`%2W#Xyrj|i z!XQ4v1%L`m{7KT7q+LZNB^h8Ha2e=`Wp65^0;J00)_^G=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_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100755 index 0000000000000000000000000000000000000000..f091b6b0bca859a3f474b03065bef75ba58a9e4c GIT binary patch literal 1588 zcmV-42Fv-0P)C1SqPt}wig>|5Crh^=oyX$BK<}M8eLU3e2hGT;=G|!_SP)7zNI6fqUMB=)y zRAZ>eDe#*r`yDAVgB_R*LB*MAc)8(b{g{9McCXW!lq7r(btRoB9!8B-#AI6JMb~YFBEvdsV)`mEQO^&#eRKx@b&x- z5lZm*!WfD8oCLzfHGz#u7sT0^VLMI1MqGxF^v+`4YYnVYgk*=kU?HsSz{v({E3lb9 z>+xILjBN)t6`=g~IBOelGQ(O990@BfXf(DRI5I$qN$0Gkz-FSc$3a+2fX$AedL4u{ z4V+5Ong(9LiGcIKW?_352sR;LtDPmPJXI{YtT=O8=76o9;*n%_m|xo!i>7$IrZ-{l z-x3`7M}qzHsPV@$v#>H-TpjDh2UE$9g6sysUREDy_R(a)>=eHw-WAyfIN z*qb!_hW>G)Tu8nSw9yn#3wFMiLcfc4pY0ek1}8(NqkBR@t4{~oC>ryc-h_ByH(Cg5 z>ao-}771+xE3um9lWAY1FeQFxowa1(!J(;Jg*wrg!=6FdRX+t_<%z&d&?|Bn){>zm zZQj(aA_HeBY&OC^jj*)N`8fa^ePOU72VpInJoI1?`ty#lvlNzs(&MZX+R%2xS~5Kh zX*|AU4QE#~SgPzOXe9>tRj>hjU@c1k5Y_mW*Jp3fI;)1&g3j|zDgC+}2Q_v%YfDax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n8u9a)z>l(1kEaPYZ6hwubN6i<8QHgsu0oE) ziJ(p;Wxm>sf!K+cw>R-(^Y2_bahB+&KI9y^);#0qt}t-$C|Bo71lHi{_+lg#f%RFy z0um=e3$K3i6K{U_4K!EX?F&rExl^W|G8Z8;`5z-k}OGNZ0#WVb$WCpQu-_YsiqKP?BB# vzVHS-CTUF4Ozn5G+mq_~Qqto~ahA+K`|lyv3(-e}00000NkvXXu0mjfd`9t{ literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..d0ef06e7edb86cdfe0d15b4b0d98334a86163658 GIT binary patch literal 1716 zcmds$`#;kQ7{|XelZftyR5~xW7?MLxS4^|Hw3&P7^y)@A9Fj{Xm1~_CIV^XZ%SLBn zA;!r`GqGHg=7>xrB{?psZQs88ZaedDoagm^KF{a*>G|dJWRSe^I$DNW008I^+;Kjt z>9p3GNR^I;v>5_`+91i(*G;u5|L+Bu6M=(afLjtkya#yZ175|z$pU~>2#^Z_pCZ7o z1c6UNcv2B3?; zX%qdxCXQpdKRz=#b*q0P%b&o)5ZrNZt7$fiETSK_VaY=mb4GK`#~0K#~9^ zcY!`#Af+4h?UMR-gMKOmpuYeN5P*RKF!(tb`)oe0j2BH1l?=>y#S5pMqkx6i{*=V9JF%>N8`ewGhRE(|WohnD59R^$_36{4>S zDFlPC5|k?;SPsDo87!B{6*7eqmMdU|QZ84>6)Kd9wNfh90=y=TFQay-0__>=<4pk& zYDjgIhL-jQ9o>z32K)BgAH+HxamL{ZL~ozu)Qqe@a`FpH=oQRA8=L-m-1dam(Ix2V z?du;LdMO+ooBelr^_y4{|44tmgH^2hSzPFd;U^!1p>6d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B)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..c8f9ed8f5cee1c98386d13b17e89f719e83555b2 GIT binary patch literal 1895 zcmV-t2blPYP)FQtfgmafE#=YDCq`qUBt#QpG%*H6QHY765~R=q zZ6iudfM}q!Pz#~9JgOi8QJ|DSu?1-*(kSi1K4#~5?#|rh?sS)(-JQqX*}ciXJ56_H zdw=^s_srbAdqxlvGyrgGet#6T7_|j;95sL%MtM;q86vOxKM$f#puR)Bjv9Zvz9-di zXOTSsZkM83)E9PYBXC<$6(|>lNLVBb&&6y{NByFCp%6+^ALR@NCTse_wqvNmSWI-m z!$%KlHFH2omF!>#%1l3LTZg(s7eof$7*xB)ZQ0h?ejh?Ta9fDv59+u#MokW+1t8Zb zgHv%K(u9G^Lv`lh#f3<6!JVTL3(dCpxHbnbA;kKqQyd1~^Xe0VIaYBSWm6nsr;dFj z4;G-RyL?cYgsN1{L4ZFFNa;8)Rv0fM0C(~Tkit94 zz#~A)59?QjD&pAPSEQ)p8gP|DS{ng)j=2ux)_EzzJ773GmQ_Cic%3JJhC0t2cx>|v zJcVusIB!%F90{+}8hG3QU4KNeKmK%T>mN57NnCZ^56=0?&3@!j>a>B43pi{!u z7JyDj7`6d)qVp^R=%j>UIY6f+3`+qzIc!Y_=+uN^3BYV|o+$vGo-j-Wm<10%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ets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100755 index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22 GIT binary patch literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`sk6!QYtBa ztlZI#nu$8lJ^q2Z79UTgZe>BU73(Aospiq+?SdMt8lDZ;*?@tyWVZVS_Q7S&*tJaiRlJ z+aSMOmbg3@h5}v;A*c8SbqM3icg-`Cnwl;7Ts%A1RkNIp+Txl-Ckkvg4oxrqGA5ewEgYqwtECD<_3Egu)xGllKt&J8g&+=ac@Jq4-?w6M3b*>w5 z69N3O%=I^6&UL5gZ!}trC7bUj*12xLdkNs~Bz4QdJJ*UDZox2UGR}SNg@lmOvhCc~ z*f_UeXv(=#I#*7>VZx2ObEN~UoGUTl=-@)E;YtCRZ>SVp$p9yG5hEFZ!`wI!spd)n zSk+vK0Vin7FL{7f&6OB%f;SH22dtbcF<|9fi2Fp%q4kxL!b1#l^)8dUwJ zwEf{(wJj@8iYDVnKB`eSU+;ml-t2`@%_)0jDM`+a46xhDbBj2+&Ih>1A>6aky#(-SYyE{R3f#y57wfLs z6w1p~$bp;6!9DX$M+J~S@D6vJAaElETnsX4h9a5tvPhC3L@qB~bOzkL@^z0k_hS{T4PF*TDrgdXp+dzsE? z>V|VR035Pl9n5&-RePFdS{7KAr2vPOqR9=M$vXA1Yy5>w;EsF`;OK{2pkn-kpp9Pw z)r;5JfJKKaT$4qCb{TaXHjb$QA{y0EYy*+b1XI;6Ah- zw13P)xT`>~eFoJC!>{2XL(a_#upp3gaR1#5+L(Jmzp4TBnx{~WHedpJ1ch8JFk~Sw z>F+gN+i+VD?gMXwcIhn8rz`>e>J^TI3E-MW>f}6R-pL}>WMOa0k#jN+`RyUVUC;#D zg|~oS^$6%wpF{^Qr+}X>0PKcr3Fc&>Z>uv@C);pwDs@2bZWhYP!rvGx?_|q{d`t<*XEb#=aOb=N+L@CVBGqImZf&+a zCQEa3$~@#kC);pasdG=f6tuIi0PO-y&tvX%>Mv=oY3U$nD zJ#gMegnQ46pq+3r=;zmgcG+zRc9D~c>z+jo9&D+`E6$LmyFqlmCYw;-Zooma{sR@~ z)_^|YL1&&@|GXo*pivH7k!msl+$Sew3%XJnxajt0K%3M6Bd&YFNy9}tWG^aovK2eX z1aL1%7;KRDrA@eG-Wr6w+;*H_VD~qLiVI`{_;>o)k`{8xa3EJT1O_>#iy_?va0eR? zDV=N%;Zjb%Z2s$@O>w@iqt!I}tLjGk!=p`D23I}N4Be@$(|iSA zf3Ih7b<{zqpDB4WF_5X1(peKe+rASze%u8eKLn#KKXt;UZ+Adf$_TO+vTqshLLJ5c z52HucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22 GIT binary patch literal 2665 zcmV-v3YPVWP)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dG=f6tuIi0PO-y&tvX%>Mv=oY3U$nD zJ#gMegnQ46pq+3r=;zmgcG+zRc9D~c>z+jo9&D+`E6$LmyFqlmCYw;-Zooma{sR@~ z)_^|YL1&&@|GXo*pivH7k!msl+$Sew3%XJnxajt0K%3M6Bd&YFNy9}tWG^aovK2eX z1aL1%7;KRDrA@eG-Wr6w+;*H_VD~qLiVI`{_;>o)k`{8xa3EJT1O_>#iy_?va0eR? zDV=N%;Zjb%Z2s$@O>w@iqt!I}tLjGk!=p`D23I}N4Be@$(|iSA zf3Ih7b<{zqpDB4WF_5X1(peKe+rASze%u8eKLn#KKXt;UZ+Adf$_TO+vTqshLLJ5c z52HucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100755 index 0000000000000000000000000000000000000000..75b2d164a5a98e212cca15ea7bf2ab5de5108680 GIT binary patch literal 3831 zcmVjJBgitF5mAp-i>4+KS_oR{|13AP->1TD4=w)g|)JHOx|a2Wk1Va z!k)vP$UcQ#mdj%wNQoaJ!w>jv_6&JPyutpQps?s5dmDQ>`%?Bvj>o<%kYG!YW6H-z zu`g$@mp`;qDR!51QaS}|ZToSuAGcJ7$2HF0z`ln4t!#Yg46>;vGG9N9{V@9z#}6v* zfP?}r6b{*-C*)(S>NECI_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fc}&G0A~*)lGHKv=^FE+b(37|)zL;KLF>oiGfb(?&1 zV3XRu!Sw>@quKiab%g6jun#oZ%!>V#A%+lNc?q>6+VvyAn=kf_6z^(TZUa4Eelh{{ zqFX-#dY(EV@7l$NE&kv9u9BR8&Ojd#ZGJ6l8_BW}^r?DIS_rU2(XaGOK z225E@kH5Opf+CgD^{y29jD4gHbGf{1MD6ggQ&%>UG4WyPh5q_tb`{@_34B?xfSO*| zZv8!)q;^o-bz`MuxXk*G^}(6)ACb@=Lfs`Hxoh>`Y0NE8QRQ!*p|SH@{r8=%RKd4p z+#Ty^-0kb=-H-O`nAA3_6>2z(D=~Tbs(n8LHxD0`R0_ATFqp-SdY3(bZ3;VUM?J=O zKCNsxsgt@|&nKMC=*+ZqmLHhX1KHbAJs{nGVMs6~TiF%Q)P@>!koa$%oS zjXa=!5>P`vC-a}ln!uH1ooeI&v?=?v7?1n~P(wZ~0>xWxd_Aw;+}9#eULM7M8&E?Y zC-ZLhi3RoM92SXUb-5i-Lmt5_rfjE{6y^+24`y$1lywLyHO!)Boa7438K4#iLe?rh z2O~YGSgFUBH?og*6=r9rme=peP~ah`(8Zt7V)j5!V0KPFf_mebo3z95U8(up$-+EA^9dTRLq>Yl)YMBuch9%=e5B`Vnb>o zt03=kq;k2TgGe4|lGne&zJa~h(UGutjP_zr?a7~#b)@15XNA>Dj(m=gg2Q5V4-$)D|Q9}R#002ovPDHLkV1o7DH3k3x literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100755 index 0000000000000000000000000000000000000000..c4df70d39da7941ef3f6dcb7f06a192d8dcb308d GIT binary patch literal 1888 zcmV-m2cP(fP)x~L`~4d)Rspd&<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$*FevycC0*nE3Xws8gsWp|Rj2>SM zns)qcYj?^2sd8?N!_w~4v+f-HCF|a$TNZDoNl$I1Uq87euoNgKb6&r26TNrfkUa@o zfdiFA@p{K&mH3b8i!lcoz)V{n8Q@g(vR4ns4r6w;K z>1~ecQR0-<^J|Ndg5fvVUM9g;lbu-){#ghGw(fg>L zh)T5Ljb%lWE;V9L!;Cqk>AV1(rULYF07ZBJbGb9qbSoLAd;in9{)95YqX$J43-dY7YU*k~vrM25 zxh5_IqO0LYZW%oxQ5HOzmk4x{atE*vipUk}sh88$b2tn?!ujEHn`tQLe&vo}nMb&{ zio`xzZ&GG6&ZyN3jnaQy#iVqXE9VT(3tWY$n-)uWDQ|tc{`?fq2F`oQ{;d3aWPg4Hp-(iE{ry>MIPWL> iW8Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100755 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100755 index 0000000..89c2725 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100755 index 0000000..f2e259c --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Base.lproj/Main.storyboard b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100755 index 0000000..f3c2851 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Info.plist b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Info.plist new file mode 100755 index 0000000..c9d70eb --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + flutter_ble_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/main.m b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/main.m new file mode 100755 index 0000000..dff6597 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/ios/Runner/main.m @@ -0,0 +1,9 @@ +#import +#import +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/lib/main.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/lib/main.dart new file mode 100755 index 0000000..7e773b5 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/lib/main.dart @@ -0,0 +1,328 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_ble/flutter_ble.dart'; +import 'package:flutter_ble_example/widgets.dart'; + +void main() { + runApp(new FlutterBleApp()); +} + +class FlutterBleApp extends StatefulWidget { + FlutterBleApp({Key key, this.title}) : super(key: key); + + final String title; + + @override + _FlutterBleAppState createState() => new _FlutterBleAppState(); +} + +class _FlutterBleAppState extends State { + FlutterBle _flutterBlue = FlutterBle.instance; + + /// Scanning + StreamSubscription _scanSubscription; + Map scanResults = new Map(); + bool isScanning = false; + + /// State + StreamSubscription _stateSubscription; + BluetoothState state = BluetoothState.unknown; + + /// Device + BluetoothDevice device; + bool get isConnected => (device != null); + StreamSubscription deviceConnection; + StreamSubscription deviceStateSubscription; + List services = new List(); + Map valueChangedSubscriptions = {}; + BluetoothDeviceState deviceState = BluetoothDeviceState.disconnected; + + @override + void initState() { + super.initState(); + // Immediately get the state of FlutterBle + _flutterBlue.state.then((s) { + setState(() { + state = s; + }); + }); + // Subscribe to state changes + _stateSubscription = _flutterBlue.onStateChanged().listen((s) { + setState(() { + state = s; + }); + }); + } + + @override + void dispose() { + _stateSubscription?.cancel(); + _stateSubscription = null; + _scanSubscription?.cancel(); + _scanSubscription = null; + deviceConnection?.cancel(); + deviceConnection = null; + super.dispose(); + } + + _startScan() { + _scanSubscription = _flutterBlue + .scan( + timeout: const Duration(seconds: 5), + /*withServices: [ + new Guid('0000180F-0000-1000-8000-00805F9B34FB') + ]*/ + ) + .listen((scanResult) { + print('localName: ${scanResult.advertisementData.localName}'); + print( + 'manufacturerData: ${scanResult.advertisementData.manufacturerData}'); + print('serviceData: ${scanResult.advertisementData.serviceData}'); + setState(() { + scanResults[scanResult.device.id] = scanResult; + }); + }, onDone: _stopScan); + + setState(() { + isScanning = true; + }); + } + + _stopScan() { + _scanSubscription?.cancel(); + _scanSubscription = null; + setState(() { + isScanning = false; + }); + } + + _connect(BluetoothDevice d) async { + device = d; + // Connect to device + deviceConnection = _flutterBlue + .connect(device, timeout: const Duration(seconds: 4)) + .listen( + null, + onDone: _disconnect, + ); + + // Update the connection state immediately + device.state.then((s) { + setState(() { + deviceState = s; + }); + }); + + // Subscribe to connection changes + deviceStateSubscription = device.onStateChanged().listen((s) { + setState(() { + deviceState = s; + }); + if (s == BluetoothDeviceState.connected) { + device.discoverServices().then((s) { + setState(() { + services = s; + }); + }); + } + }); + } + + _disconnect() { + // Remove all value changed listeners + valueChangedSubscriptions.forEach((uuid, sub) => sub.cancel()); + valueChangedSubscriptions.clear(); + deviceStateSubscription?.cancel(); + deviceStateSubscription = null; + deviceConnection?.cancel(); + deviceConnection = null; + setState(() { + device = null; + }); + } + + _readCharacteristic(BluetoothCharacteristic c) async { + await device.readCharacteristic(c); + setState(() {}); + } + + _writeCharacteristic(BluetoothCharacteristic c) async { + await device.writeCharacteristic(c, [0x12, 0x34], + type: CharacteristicWriteType.withResponse); + setState(() {}); + } + + _readDescriptor(BluetoothDescriptor d) async { + await device.readDescriptor(d); + setState(() {}); + } + + _writeDescriptor(BluetoothDescriptor d) async { + await device.writeDescriptor(d, [0x12, 0x34]); + setState(() {}); + } + + _setNotification(BluetoothCharacteristic c) async { + if (c.isNotifying) { + await device.setNotifyValue(c, false); + // Cancel subscription + valueChangedSubscriptions[c.uuid]?.cancel(); + valueChangedSubscriptions.remove(c.uuid); + } else { + await device.setNotifyValue(c, true); + // ignore: cancel_subscriptions + final sub = device.onValueChanged(c).listen((d) { + setState(() { + print('onValueChanged $d'); + }); + }); + // Add to map + valueChangedSubscriptions[c.uuid] = sub; + } + setState(() {}); + } + + _refreshDeviceState(BluetoothDevice d) async { + var state = await d.state; + setState(() { + deviceState = state; + print('State refreshed: $deviceState'); + }); + } + + _buildScanningButton() { + if (isConnected || state != BluetoothState.on) { + return null; + } + if (isScanning) { + return new FloatingActionButton( + child: new Icon(Icons.stop), + onPressed: _stopScan, + backgroundColor: Colors.red, + ); + } else { + return new FloatingActionButton( + child: new Icon(Icons.search), onPressed: _startScan); + } + } + + _buildScanResultTiles() { + return scanResults.values + .map((r) => ScanResultTile( + result: r, + onTap: () => _connect(r.device), + )) + .toList(); + } + + List _buildServiceTiles() { + return services + .map( + (s) => new ServiceTile( + service: s, + characteristicTiles: s.characteristics + .map( + (c) => new CharacteristicTile( + characteristic: c, + onReadPressed: () => _readCharacteristic(c), + onWritePressed: () => _writeCharacteristic(c), + onNotificationPressed: () => _setNotification(c), + descriptorTiles: c.descriptors + .map( + (d) => new DescriptorTile( + descriptor: d, + onReadPressed: () => _readDescriptor(d), + onWritePressed: () => + _writeDescriptor(d), + ), + ) + .toList(), + ), + ) + .toList(), + ), + ) + .toList(); + } + + _buildActionButtons() { + if (isConnected) { + return [ + new IconButton( + icon: const Icon(Icons.cancel), + onPressed: () => _disconnect(), + ) + ]; + } + } + + _buildAlertTile() { + return new Container( + color: Colors.redAccent, + child: new ListTile( + title: new Text( + 'Bluetooth adapter is ${state.toString().substring(15)}', + style: Theme.of(context).primaryTextTheme.subhead, + ), + trailing: new Icon( + Icons.error, + color: Theme.of(context).primaryTextTheme.subhead.color, + ), + ), + ); + } + + _buildDeviceStateTile() { + return new ListTile( + leading: (deviceState == BluetoothDeviceState.connected) + ? const Icon(Icons.bluetooth_connected) + : const Icon(Icons.bluetooth_disabled), + title: new Text('Device is ${deviceState.toString().split('.')[1]}.'), + subtitle: new Text('${device.id}'), + trailing: new IconButton( + icon: const Icon(Icons.refresh), + onPressed: () => _refreshDeviceState(device), + color: Theme.of(context).iconTheme.color.withOpacity(0.5), + )); + } + + _buildProgressBarTile() { + return new LinearProgressIndicator(); + } + + @override + Widget build(BuildContext context) { + var tiles = new List(); + if (state != BluetoothState.on) { + tiles.add(_buildAlertTile()); + } + if (isConnected) { + tiles.add(_buildDeviceStateTile()); + tiles.addAll(_buildServiceTiles()); + } else { + tiles.addAll(_buildScanResultTiles()); + } + return new MaterialApp( + home: new Scaffold( + appBar: new AppBar( + title: const Text('Flutter Longev BLE'), + actions: _buildActionButtons(), + ), + floatingActionButton: _buildScanningButton(), + body: new Stack( + children: [ + (isScanning) ? _buildProgressBarTile() : new Container(), + new ListView( + children: tiles, + ) + ], + ), + ), + ); + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/lib/widgets.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/lib/widgets.dart new file mode 100755 index 0000000..1071143 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/lib/widgets.dart @@ -0,0 +1,280 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:flutter_ble/flutter_ble.dart'; + +class ScanResultTile extends StatelessWidget { + const ScanResultTile({Key key, this.result, this.onTap}) : super(key: key); + + final ScanResult result; + final VoidCallback onTap; + + Widget _buildTitle(BuildContext context) { + if (result.device.name.length > 0) { + return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(result.device.name), + Text( + result.device.id.toString(), + style: Theme.of(context).textTheme.caption, + ) + ], + ); + } else { + return Text(result.device.id.toString()); + } + } + + Widget _buildAdvRow(BuildContext context, String title, String value) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 4.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(title, style: Theme.of(context).textTheme.caption), + SizedBox( + width: 12.0, + ), + Expanded( + child: Text( + value, + style: Theme.of(context) + .textTheme + .caption + .apply(color: Colors.black), + softWrap: true, + ), + ), + ], + ), + ); + } + + String getNiceHexArray(List bytes) { + return '[${bytes.map((i) => i.toRadixString(16).padLeft(2, '0')).join(', ')}]' + .toUpperCase(); + } + + String getNiceManufacturerData(Map> data) { + if (data.isEmpty) { + return null; + } + List res = []; + data.forEach((id, bytes) { + res.add( + '${id.toRadixString(16).toUpperCase()}: ${getNiceHexArray(bytes)}'); + }); + return res.join(', '); + } + + String getNiceServiceData(Map> data) { + if (data.isEmpty) { + return null; + } + List res = []; + data.forEach((id, bytes) { + res.add('${id.toUpperCase()}: ${getNiceHexArray(bytes)}'); + }); + return res.join(', '); + } + + @override + Widget build(BuildContext context) { + return ExpansionTile( + title: _buildTitle(context), + leading: Text(result.rssi.toString()), + trailing: RaisedButton( + child: Text('CONNECT'), + color: Colors.black, + textColor: Colors.white, + onPressed: (result.advertisementData.connectable) ? onTap : null, + ), + children: [ + _buildAdvRow( + context, 'Complete Local Name', result.advertisementData.localName), + _buildAdvRow(context, 'Tx Power Level', + '${result.advertisementData.txPowerLevel ?? 'N/A'}'), + _buildAdvRow( + context, + 'Manufacturer Data', + getNiceManufacturerData( + result.advertisementData.manufacturerData) ?? + 'N/A'), + _buildAdvRow( + context, + 'Service UUIDs', + (result.advertisementData.serviceUuids.isNotEmpty) + ? result.advertisementData.serviceUuids.join(', ').toUpperCase() + : 'N/A'), + _buildAdvRow(context, 'Service Data', + getNiceServiceData(result.advertisementData.serviceData) ?? 'N/A'), + ], + ); + } +} + +class ServiceTile extends StatelessWidget { + final BluetoothService service; + final List characteristicTiles; + + const ServiceTile({Key key, this.service, this.characteristicTiles}) + : super(key: key); + + @override + Widget build(BuildContext context) { + if (characteristicTiles.length > 0) { + return new ExpansionTile( + title: new Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Service'), + new Text( + '0x${service.uuid.toString().toUpperCase().substring(4, 8)}', + style: Theme.of(context) + .textTheme + .body1 + .copyWith(color: Theme.of(context).textTheme.caption.color)) + ], + ), + children: characteristicTiles, + ); + } else { + return new ListTile( + title: const Text('Service'), + subtitle: new Text( + '0x${service.uuid.toString().toUpperCase().substring(4, 8)}'), + ); + } + } +} + +class CharacteristicTile extends StatelessWidget { + final BluetoothCharacteristic characteristic; + final List descriptorTiles; + final VoidCallback onReadPressed; + final VoidCallback onWritePressed; + final VoidCallback onNotificationPressed; + + const CharacteristicTile( + {Key key, + this.characteristic, + this.descriptorTiles, + this.onReadPressed, + this.onWritePressed, + this.onNotificationPressed}) + : super(key: key); + + @override + Widget build(BuildContext context) { + var actions = new Row( + mainAxisSize: MainAxisSize.min, + children: [ + new IconButton( + icon: new Icon( + Icons.file_download, + color: Theme.of(context).iconTheme.color.withOpacity(0.5), + ), + onPressed: onReadPressed, + ), + new IconButton( + icon: new Icon(Icons.file_upload, + color: Theme.of(context).iconTheme.color.withOpacity(0.5)), + onPressed: onWritePressed, + ), + new IconButton( + icon: new Icon( + characteristic.isNotifying ? Icons.sync_disabled : Icons.sync, + color: Theme.of(context).iconTheme.color.withOpacity(0.5)), + onPressed: onNotificationPressed, + ) + ], + ); + + var title = new Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Characteristic'), + new Text( + '0x${characteristic.uuid.toString().toUpperCase().substring(4, 8)}', + style: Theme.of(context) + .textTheme + .body1 + .copyWith(color: Theme.of(context).textTheme.caption.color)) + ], + ); + + if (descriptorTiles.length > 0) { + return new ExpansionTile( + title: new ListTile( + title: title, + subtitle: new Text(characteristic.value.toString()), + contentPadding: EdgeInsets.all(0.0), + ), + trailing: actions, + children: descriptorTiles, + ); + } else { + return new ListTile( + title: title, + subtitle: new Text(characteristic.value.toString()), + trailing: actions, + ); + } + } +} + +class DescriptorTile extends StatelessWidget { + final BluetoothDescriptor descriptor; + final VoidCallback onReadPressed; + final VoidCallback onWritePressed; + + const DescriptorTile( + {Key key, this.descriptor, this.onReadPressed, this.onWritePressed}) + : super(key: key); + + @override + Widget build(BuildContext context) { + var title = new Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Descriptor'), + new Text( + '0x${descriptor.uuid.toString().toUpperCase().substring(4, 8)}', + style: Theme.of(context) + .textTheme + .body1 + .copyWith(color: Theme.of(context).textTheme.caption.color)) + ], + ); + return new ListTile( + title: title, + subtitle: new Text(descriptor.value.toString()), + trailing: new Row( + mainAxisSize: MainAxisSize.min, + children: [ + new IconButton( + icon: new Icon( + Icons.file_download, + color: Theme.of(context).iconTheme.color.withOpacity(0.5), + ), + onPressed: onReadPressed, + ), + new IconButton( + icon: new Icon( + Icons.file_upload, + color: Theme.of(context).iconTheme.color.withOpacity(0.5), + ), + onPressed: onWritePressed, + ) + ], + ), + ); + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/pubspec.lock b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/pubspec.lock new file mode 100755 index 0000000..13227e5 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/pubspec.lock @@ -0,0 +1,174 @@ +# Generated by pub +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_ble: + dependency: "direct dev" + description: + path: ".." + relative: true + source: path + version: "0.5.1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.0" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.11" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.4" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" +sdks: + dart: ">=2.2.0 <3.0.0" diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/pubspec.yaml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/pubspec.yaml new file mode 100755 index 0000000..256e50a --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/pubspec.yaml @@ -0,0 +1,63 @@ +name: flutter_ble_example +description: Demonstrates how to use the flutter_ble plugin. +publish_to: 'none' + +environment: + sdk: ">=2.1.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^0.1.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_ble: + path: ../ + +# For information on the generic Dart part of this file, see the +# following page: https://www.dartlang.org/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/test/widget_test.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/test/widget_test.dart new file mode 100755 index 0000000..c1c0a2e --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/example/test/widget_test.dart @@ -0,0 +1,27 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:flutter_ble_example/main.dart'; + +void main() { + testWidgets('Verify Platform version', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(FlutterBleApp()); + + // Verify that platform version is retrieved. + expect( + find.byWidgetPredicate( + (Widget widget) => widget is Text && + widget.data.startsWith('Running on:'), + ), + findsOneWidget, + ); + }); +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/.gitignore b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/.gitignore new file mode 100755 index 0000000..710ec6c --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/.gitignore @@ -0,0 +1,36 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Assets/.gitkeep b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Assets/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Classes/FlutterBlePlugin.h b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Classes/FlutterBlePlugin.h new file mode 100755 index 0000000..25cd680 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Classes/FlutterBlePlugin.h @@ -0,0 +1,11 @@ +#import +#import + +#define NAMESPACE @"ai.longev.flutter/flutter_ble" + +@interface FlutterBlePlugin : NSObject +@end + +@interface FlutterBleStreamHandler : NSObject +@property FlutterEventSink sink; +@end diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Classes/FlutterBlePlugin.m b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Classes/FlutterBlePlugin.m new file mode 100755 index 0000000..24a4410 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/Classes/FlutterBlePlugin.m @@ -0,0 +1,752 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#import "FlutterBlePlugin.h" +#import "Flutterblue.pbobjc.h" + +@interface CBUUID (CBUUIDAdditionsFlutterBle) +- (NSString *)fullUUIDString; +@end + +@implementation CBUUID (CBUUIDAdditionsFlutterBle) +- (NSString *)fullUUIDString { + if(self.UUIDString.length == 4) { + return [[NSString stringWithFormat:@"0000%@-0000-1000-8000-00805F9B34FB", self.UUIDString] lowercaseString]; + } + return [self.UUIDString lowercaseString]; +} +@end + +typedef NS_ENUM(NSUInteger, LogLevel) { + emergency = 0, + alert = 1, + critical = 2, + error = 3, + warning = 4, + notice = 5, + info = 6, + debug = 7 +}; + +@interface FlutterBlePlugin () +@property(nonatomic, retain) NSObject *registrar; +@property(nonatomic, retain) FlutterMethodChannel *channel; +@property(nonatomic, retain) FlutterBleStreamHandler *stateStreamHandler; +@property(nonatomic, retain) FlutterBleStreamHandler *scanResultStreamHandler; +@property(nonatomic, retain) FlutterBleStreamHandler *servicesDiscoveredStreamHandler; +@property(nonatomic, retain) FlutterBleStreamHandler *characteristicReadStreamHandler; +@property(nonatomic, retain) FlutterBleStreamHandler *descriptorReadStreamHandler; +@property(nonatomic, retain) CBCentralManager *centralManager; +@property(nonatomic) NSMutableDictionary *scannedPeripherals; +@property(nonatomic) NSMutableArray *servicesThatNeedDiscovered; +@property(nonatomic) NSMutableArray *characteristicsThatNeedDiscovered; +@property(nonatomic) LogLevel logLevel; +@end + +@implementation FlutterBlePlugin ++ (void)registerWithRegistrar:(NSObject*)registrar { + FlutterMethodChannel* channel = [FlutterMethodChannel + methodChannelWithName:NAMESPACE @"/methods" + binaryMessenger:[registrar messenger]]; + FlutterEventChannel* stateChannel = [FlutterEventChannel eventChannelWithName:NAMESPACE @"/state" binaryMessenger:[registrar messenger]]; + FlutterEventChannel* scanResultChannel = [FlutterEventChannel eventChannelWithName:NAMESPACE @"/scanResult" binaryMessenger:[registrar messenger]]; + FlutterEventChannel* servicesDiscoveredChannel = [FlutterEventChannel eventChannelWithName:NAMESPACE @"/servicesDiscovered" binaryMessenger:[registrar messenger]]; + FlutterEventChannel* characteristicReadChannel = [FlutterEventChannel eventChannelWithName:NAMESPACE @"/characteristicRead" binaryMessenger:[registrar messenger]]; + FlutterEventChannel* descriptorReadChannel = [FlutterEventChannel eventChannelWithName:NAMESPACE @"/descriptorRead" binaryMessenger:[registrar messenger]]; + FlutterBlePlugin* instance = [[FlutterBlePlugin alloc] init]; + instance.channel = channel; + instance.centralManager = [[CBCentralManager alloc] initWithDelegate:instance queue:nil]; + instance.scannedPeripherals = [NSMutableDictionary new]; + instance.servicesThatNeedDiscovered = [NSMutableArray new]; + instance.characteristicsThatNeedDiscovered = [NSMutableArray new]; + instance.logLevel = emergency; + + // STATE + FlutterBleStreamHandler* stateStreamHandler = [[FlutterBleStreamHandler alloc] init]; + [stateChannel setStreamHandler:stateStreamHandler]; + instance.stateStreamHandler = stateStreamHandler; + + // SCAN RESULTS + FlutterBleStreamHandler* scanResultStreamHandler = [[FlutterBleStreamHandler alloc] init]; + [scanResultChannel setStreamHandler:scanResultStreamHandler]; + instance.scanResultStreamHandler = scanResultStreamHandler; + + // SERVICES DISCOVERED + FlutterBleStreamHandler* servicesDiscoveredStreamHandler = [[FlutterBleStreamHandler alloc] init]; + [servicesDiscoveredChannel setStreamHandler:servicesDiscoveredStreamHandler]; + instance.servicesDiscoveredStreamHandler = servicesDiscoveredStreamHandler; + + // CHARACTERISTIC READ + FlutterBleStreamHandler* characteristicReadStreamHandler = [[FlutterBleStreamHandler alloc] init]; + [characteristicReadChannel setStreamHandler:characteristicReadStreamHandler]; + instance.characteristicReadStreamHandler = characteristicReadStreamHandler; + + // DESCRIPTOR READ + FlutterBleStreamHandler* descriptorReadStreamHandler = [[FlutterBleStreamHandler alloc] init]; + [descriptorReadChannel setStreamHandler:descriptorReadStreamHandler]; + instance.descriptorReadStreamHandler = descriptorReadStreamHandler; + + [registrar addMethodCallDelegate:instance channel:channel]; +} + +- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { + if ([@"setLogLevel" isEqualToString:call.method]) { + NSNumber *logLevelIndex = [call arguments]; + _logLevel = (LogLevel)[logLevelIndex integerValue]; + result(nil); + } else if ([@"state" isEqualToString:call.method]) { + FlutterStandardTypedData *data = [self toFlutterData:[self toBluetoothStateProto:self->_centralManager.state]]; + result(data); + } else if([@"isAvailable" isEqualToString:call.method]) { + if(self.centralManager.state != CBManagerStateUnsupported && self.centralManager.state != CBManagerStateUnknown) { + result(@(YES)); + } else { + result(@(NO)); + } + } else if([@"isOn" isEqualToString:call.method]) { + if(self.centralManager.state == CBManagerStatePoweredOn) { + result(@(YES)); + } else { + result(@(NO)); + } + } else if([@"startScan" isEqualToString:call.method]) { + // Clear any existing scan results + [self.scannedPeripherals removeAllObjects]; + // TODO: Request Permission? + FlutterStandardTypedData *data = [call arguments]; + ProtosScanSettings *request = [[ProtosScanSettings alloc] initWithData:[data data] error:nil]; + // UUID Service filter + NSArray *uuids = [NSArray array]; + for (int i = 0; i < [request serviceUuidsArray_Count]; i++) { + NSString *u = [request.serviceUuidsArray objectAtIndex:i]; + uuids = [uuids arrayByAddingObject:[CBUUID UUIDWithString:u]]; + } + // TODO: iOS Scan Options (#35) + [self->_centralManager scanForPeripheralsWithServices:uuids options:nil]; + result(nil); + } else if([@"stopScan" isEqualToString:call.method]) { + [self->_centralManager stopScan]; + result(nil); + } else if([@"connect" isEqualToString:call.method]) { + FlutterStandardTypedData *data = [call arguments]; + ProtosConnectRequest *request = [[ProtosConnectRequest alloc] initWithData:[data data] error:nil]; + NSString *remoteId = [request remoteId]; + @try { + CBPeripheral *peripheral = [_scannedPeripherals objectForKey:remoteId]; + if(peripheral == nil) { + @throw [FlutterError errorWithCode:@"connect" + message:@"Peripheral not found" + details:nil]; + } + // TODO: Implement Connect options (#36) + [_centralManager connectPeripheral:peripheral options:nil]; + result(nil); + } @catch(FlutterError *e) { + result(e); + } + } else if([@"disconnect" isEqualToString:call.method]) { + NSString *remoteId = [call arguments]; + @try { + CBPeripheral *peripheral = [self findPeripheral:remoteId]; + [_centralManager cancelPeripheralConnection:peripheral]; + result(nil); + } @catch(FlutterError *e) { + result(e); + } + } else if([@"deviceState" isEqualToString:call.method]) { + NSString *remoteId = [call arguments]; + @try { + CBPeripheral *peripheral = [self findPeripheral:remoteId]; + result([self toFlutterData:[self toDeviceStateProto:peripheral state:peripheral.state]]); + } @catch(FlutterError *e) { + result(e); + } + } else if([@"discoverServices" isEqualToString:call.method]) { + NSString *remoteId = [call arguments]; + @try { + CBPeripheral *peripheral = [self findPeripheral:remoteId]; + // Clear helper arrays + [_servicesThatNeedDiscovered removeAllObjects]; + [_characteristicsThatNeedDiscovered removeAllObjects ]; + [peripheral discoverServices:nil]; + result(nil); + } @catch(FlutterError *e) { + result(e); + } + } else if([@"services" isEqualToString:call.method]) { + NSString *remoteId = [call arguments]; + @try { + CBPeripheral *peripheral = [self findPeripheral:remoteId]; + result([self toFlutterData:[self toServicesResultProto:peripheral]]); + } @catch(FlutterError *e) { + result(e); + } + } else if([@"readCharacteristic" isEqualToString:call.method]) { + FlutterStandardTypedData *data = [call arguments]; + ProtosReadCharacteristicRequest *request = [[ProtosReadCharacteristicRequest alloc] initWithData:[data data] error:nil]; + NSString *remoteId = [request remoteId]; + @try { + // Find peripheral + CBPeripheral *peripheral = [self findPeripheral:remoteId]; + // Find characteristic + CBCharacteristic *characteristic = [self locateCharacteristic:[request characteristicUuid] peripheral:peripheral serviceId:[request serviceUuid] secondaryServiceId:[request secondaryServiceUuid]]; + // Trigger a read + [peripheral readValueForCharacteristic:characteristic]; + result(nil); + } @catch(FlutterError *e) { + result(e); + } + } else if([@"readDescriptor" isEqualToString:call.method]) { + FlutterStandardTypedData *data = [call arguments]; + ProtosReadDescriptorRequest *request = [[ProtosReadDescriptorRequest alloc] initWithData:[data data] error:nil]; + NSString *remoteId = [request remoteId]; + @try { + // Find peripheral + CBPeripheral *peripheral = [self findPeripheral:remoteId]; + // Find characteristic + CBCharacteristic *characteristic = [self locateCharacteristic:[request characteristicUuid] peripheral:peripheral serviceId:[request serviceUuid] secondaryServiceId:[request secondaryServiceUuid]]; + // Find descriptor + CBDescriptor *descriptor = [self locateDescriptor:[request descriptorUuid] characteristic:characteristic]; + [peripheral readValueForDescriptor:descriptor]; + result(nil); + } @catch(FlutterError *e) { + result(e); + } + } else if([@"writeCharacteristic" isEqualToString:call.method]) { + FlutterStandardTypedData *data = [call arguments]; + ProtosWriteCharacteristicRequest *request = [[ProtosWriteCharacteristicRequest alloc] initWithData:[data data] error:nil]; + NSString *remoteId = [request remoteId]; + @try { + // Find peripheral + CBPeripheral *peripheral = [self findPeripheral:remoteId]; + // Find characteristic + CBCharacteristic *characteristic = [self locateCharacteristic:[request characteristicUuid] peripheral:peripheral serviceId:[request serviceUuid] secondaryServiceId:[request secondaryServiceUuid]]; + // Get correct write type + CBCharacteristicWriteType type = ([request writeType] == ProtosWriteCharacteristicRequest_WriteType_WithoutResponse) ? CBCharacteristicWriteWithoutResponse : CBCharacteristicWriteWithResponse; + // Write to characteristic + [peripheral writeValue:[request value] forCharacteristic:characteristic type:type]; + result(nil); + } @catch(FlutterError *e) { + result(e); + } + } else if([@"writeDescriptor" isEqualToString:call.method]) { + FlutterStandardTypedData *data = [call arguments]; + ProtosWriteDescriptorRequest *request = [[ProtosWriteDescriptorRequest alloc] initWithData:[data data] error:nil]; + NSString *remoteId = [request remoteId]; + @try { + // Find peripheral + CBPeripheral *peripheral = [self findPeripheral:remoteId]; + // Find characteristic + CBCharacteristic *characteristic = [self locateCharacteristic:[request characteristicUuid] peripheral:peripheral serviceId:[request serviceUuid] secondaryServiceId:[request secondaryServiceUuid]]; + // Find descriptor + CBDescriptor *descriptor = [self locateDescriptor:[request descriptorUuid] characteristic:characteristic]; + // Write descriptor + [peripheral writeValue:[request value] forDescriptor:descriptor]; + result(nil); + } @catch(FlutterError *e) { + result(e); + } + } else if([@"setNotification" isEqualToString:call.method]) { + FlutterStandardTypedData *data = [call arguments]; + ProtosSetNotificationRequest *request = [[ProtosSetNotificationRequest alloc] initWithData:[data data] error:nil]; + NSString *remoteId = [request remoteId]; + @try { + // Find peripheral + CBPeripheral *peripheral = [self findPeripheral:remoteId]; + // Find characteristic + CBCharacteristic *characteristic = [self locateCharacteristic:[request characteristicUuid] peripheral:peripheral serviceId:[request serviceUuid] secondaryServiceId:[request secondaryServiceUuid]]; + // Set notification value + [peripheral setNotifyValue:[request enable] forCharacteristic:characteristic]; + result(nil); + } @catch(FlutterError *e) { + result(e); + } + } else { + result(FlutterMethodNotImplemented); + } +} + +- (CBPeripheral*)findPeripheral:(NSString*)remoteId { + NSArray *peripherals = [_centralManager retrievePeripheralsWithIdentifiers:@[[[NSUUID alloc] initWithUUIDString:remoteId]]]; + CBPeripheral *peripheral; + for(CBPeripheral *p in peripherals) { + if([[p.identifier UUIDString] isEqualToString:remoteId]) { + peripheral = p; + break; + } + } + if(peripheral == nil) { + @throw [FlutterError errorWithCode:@"findPeripheral" + message:@"Peripheral not found" + details:nil]; + } + return peripheral; +} + +- (CBCharacteristic*)locateCharacteristic:(NSString*)characteristicId peripheral:(CBPeripheral*)peripheral serviceId:(NSString*)serviceId secondaryServiceId:(NSString*)secondaryServiceId { + CBService *primaryService = [self getServiceFromArray:serviceId array:[peripheral services]]; + if(primaryService == nil || [primaryService isPrimary] == false) { + @throw [FlutterError errorWithCode:@"locateCharacteristic" + message:@"service could not be located on the device" + details:nil]; + } + CBService *secondaryService; + if(secondaryServiceId.length) { + secondaryService = [self getServiceFromArray:secondaryServiceId array:[primaryService includedServices]]; + @throw [FlutterError errorWithCode:@"locateCharacteristic" + message:@"secondary service could not be located on the device" + details:secondaryServiceId]; + } + CBService *service = (secondaryService != nil) ? secondaryService : primaryService; + CBCharacteristic *characteristic = [self getCharacteristicFromArray:characteristicId array:[service characteristics]]; + if(characteristic == nil) { + @throw [FlutterError errorWithCode:@"locateCharacteristic" + message:@"characteristic could not be located on the device" + details:nil]; + } + return characteristic; +} + +- (CBDescriptor*)locateDescriptor:(NSString*)descriptorId characteristic:(CBCharacteristic*)characteristic { + CBDescriptor *descriptor = [self getDescriptorFromArray:descriptorId array:[characteristic descriptors]]; + if(descriptor == nil) { + @throw [FlutterError errorWithCode:@"locateDescriptor" + message:@"descriptor could not be located on the device" + details:nil]; + } + return descriptor; +} + +// Reverse search to find primary service +- (CBService*)findPrimaryService:(CBService*)secondaryService peripheral:(CBPeripheral*)peripheral { + for(CBService *s in [peripheral services]) { + for(CBService *ss in [s includedServices]) { + if([[ss.UUID UUIDString] isEqualToString:[secondaryService.UUID UUIDString]]) { + return s; + } + } + } + return nil; +} + +- (CBDescriptor*)findCCCDescriptor:(CBCharacteristic*)characteristic { + for(CBDescriptor *d in characteristic.descriptors) { + if([d.UUID.UUIDString isEqualToString:@"2902"]) { + return d; + } + } + return nil; +} + +- (CBService*)getServiceFromArray:(NSString*)uuidString array:(NSArray*)array { + for(CBService *s in array) { + if([[s UUID] isEqual:[CBUUID UUIDWithString:uuidString]]) { + return s; + } + } + return nil; +} + +- (CBCharacteristic*)getCharacteristicFromArray:(NSString*)uuidString array:(NSArray*)array { + for(CBCharacteristic *c in array) { + if([[c UUID] isEqual:[CBUUID UUIDWithString:uuidString]]) { + return c; + } + } + return nil; +} + +- (CBDescriptor*)getDescriptorFromArray:(NSString*)uuidString array:(NSArray*)array { + for(CBDescriptor *d in array) { + if([[d UUID] isEqual:[CBUUID UUIDWithString:uuidString]]) { + return d; + } + } + return nil; +} + +// +// CBCentralManagerDelegate methods +// +- (void)centralManagerDidUpdateState:(nonnull CBCentralManager *)central { + if(_stateStreamHandler.sink != nil) { + FlutterStandardTypedData *data = [self toFlutterData:[self toBluetoothStateProto:self->_centralManager.state]]; + self.stateStreamHandler.sink(data); + } +} + +- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI { + [self.scannedPeripherals setObject:peripheral + forKey:[[peripheral identifier] UUIDString]]; + if(_scanResultStreamHandler.sink != nil) { + FlutterStandardTypedData *data = [self toFlutterData:[self toScanResultProto:peripheral advertisementData:advertisementData RSSI:RSSI]]; + _scanResultStreamHandler.sink(data); + } +} + +- (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral { + NSLog(@"didConnectPeripheral"); + // Register self as delegate for peripheral + peripheral.delegate = self; + + // Send connection state + [_channel invokeMethod:@"DeviceState" arguments:[self toFlutterData:[self toDeviceStateProto:peripheral state:peripheral.state]]]; +} + +- (void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error { + NSLog(@"didDisconnectPeripheral"); + // Unregister self as delegate for peripheral, not working #42 + peripheral.delegate = nil; + + // Send connection state + [_channel invokeMethod:@"DeviceState" arguments:[self toFlutterData:[self toDeviceStateProto:peripheral state:peripheral.state]]]; +} + +- (void)centralManager:(CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error { + // TODO:? +} + +// +// CBPeripheralDelegate methods +// +- (void)peripheral:(CBPeripheral *)peripheral didDiscoverServices:(NSError *)error { + NSLog(@"didDiscoverServices"); + // Loop through and discover characteristics and secondary services + [_servicesThatNeedDiscovered addObjectsFromArray:peripheral.services]; + for(CBService *s in [peripheral services]) { + NSLog(@"Found service: %@", [s.UUID UUIDString]); + [peripheral discoverCharacteristics:nil forService:s]; + // [peripheral discoverIncludedServices:nil forService:s]; // Secondary services in the future (#8) + } +} + +- (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error { + NSLog(@"didDiscoverCharacteristicsForService"); + // Loop through and discover descriptors for characteristics + [_servicesThatNeedDiscovered removeObject:service]; + [_characteristicsThatNeedDiscovered addObjectsFromArray:service.characteristics]; + for(CBCharacteristic *c in [service characteristics]) { + [peripheral discoverDescriptorsForCharacteristic:c]; + } +} + +- (void)peripheral:(CBPeripheral *)peripheral didDiscoverDescriptorsForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error { + NSLog(@"didDiscoverDescriptorsForCharacteristic"); + [_characteristicsThatNeedDiscovered removeObject:characteristic]; + if(_servicesThatNeedDiscovered.count > 0 || _characteristicsThatNeedDiscovered.count > 0) { + // Still discovering + return; + } + // Send updated tree + if(_servicesDiscoveredStreamHandler.sink != nil) { + ProtosDiscoverServicesResult *result = [self toServicesResultProto:peripheral]; + _servicesDiscoveredStreamHandler.sink([self toFlutterData:result]); + } +} + +- (void)peripheral:(CBPeripheral *)peripheral didDiscoverIncludedServicesForService:(CBService *)service error:(NSError *)error { + NSLog(@"didDiscoverIncludedServicesForService"); + // Loop through and discover characteristics for secondary services + for(CBService *ss in [service includedServices]) { + [peripheral discoverCharacteristics:nil forService:ss]; + } +} + +- (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error { + NSLog(@"didUpdateValueForCharacteristic %@", [peripheral.identifier UUIDString]); + if(_characteristicReadStreamHandler.sink != nil) { + ProtosReadCharacteristicResponse *result = [[ProtosReadCharacteristicResponse alloc] init]; + [result setRemoteId:[peripheral.identifier UUIDString]]; + [result setCharacteristic:[self toCharacteristicProto:characteristic]]; + _characteristicReadStreamHandler.sink([self toFlutterData:result]); + } + // on iOS, this method also handle notification values + ProtosOnNotificationResponse *result = [[ProtosOnNotificationResponse alloc] init]; + [result setRemoteId:[peripheral.identifier UUIDString]]; + [result setCharacteristic:[self toCharacteristicProto:characteristic]]; + [_channel invokeMethod:@"OnValueChanged" arguments:[self toFlutterData:result]]; +} + +- (void)peripheral:(CBPeripheral *)peripheral didWriteValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error { + NSLog(@"didWriteValueForCharacteristic"); + ProtosWriteCharacteristicRequest *request = [[ProtosWriteCharacteristicRequest alloc] init]; + [request setRemoteId:[peripheral.identifier UUIDString]]; + [request setCharacteristicUuid:[characteristic.UUID fullUUIDString]]; + [request setServiceUuid:[characteristic.service.UUID fullUUIDString]]; + ProtosWriteCharacteristicResponse *result = [[ProtosWriteCharacteristicResponse alloc] init]; + [result setRequest:request]; + [result setSuccess:(error == nil)]; + [_channel invokeMethod:@"WriteCharacteristicResponse" arguments:[self toFlutterData:result]]; +} + +- (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error { + NSLog(@"didUpdateNotificationStateForCharacteristic"); + // Read CCC descriptor of characteristic + CBDescriptor *cccd = [self findCCCDescriptor:characteristic]; + if(cccd == nil || error != nil) { + // Send error + ProtosSetNotificationResponse *response = [[ProtosSetNotificationResponse alloc] init]; + [response setRemoteId:[peripheral.identifier UUIDString]]; + [response setCharacteristic:[self toCharacteristicProto:characteristic]]; + [response setSuccess:false]; + [_channel invokeMethod:@"SetNotificationResponse" arguments:[self toFlutterData:response]]; + return; + } + + // Request a read + [peripheral readValueForDescriptor:cccd]; +} + +- (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForDescriptor:(CBDescriptor *)descriptor error:(NSError *)error { + if(_descriptorReadStreamHandler.sink != nil) { + ProtosReadDescriptorRequest *q = [[ProtosReadDescriptorRequest alloc] init]; + [q setRemoteId:[peripheral.identifier UUIDString]]; + [q setCharacteristicUuid:[descriptor.characteristic.UUID fullUUIDString]]; + [q setDescriptorUuid:[descriptor.UUID fullUUIDString]]; + if([descriptor.characteristic.service isPrimary]) { + [q setServiceUuid:[descriptor.characteristic.service.UUID fullUUIDString]]; + } else { + [q setSecondaryServiceUuid:[descriptor.characteristic.service.UUID fullUUIDString]]; + CBService *primaryService = [self findPrimaryService:[descriptor.characteristic service] peripheral:[descriptor.characteristic.service peripheral]]; + [q setServiceUuid:[primaryService.UUID fullUUIDString]]; + } + ProtosReadDescriptorResponse *result = [[ProtosReadDescriptorResponse alloc] init]; + [result setRequest:q]; + int value = [descriptor.value intValue]; + [result setValue:[NSData dataWithBytes:&value length:sizeof(value)]]; + _descriptorReadStreamHandler.sink([self toFlutterData:result]); + } + // If descriptor is CCCD, send a SetNotificationResponse in case anything is awaiting + if([descriptor.UUID.UUIDString isEqualToString:@"2902"]){ + ProtosSetNotificationResponse *response = [[ProtosSetNotificationResponse alloc] init]; + [response setRemoteId:[peripheral.identifier UUIDString]]; + [response setCharacteristic:[self toCharacteristicProto:descriptor.characteristic]]; + [response setSuccess:true]; + [_channel invokeMethod:@"SetNotificationResponse" arguments:[self toFlutterData:response]]; + } +} + +- (void)peripheral:(CBPeripheral *)peripheral didWriteValueForDescriptor:(CBDescriptor *)descriptor error:(NSError *)error { + ProtosWriteDescriptorRequest *request = [[ProtosWriteDescriptorRequest alloc] init]; + [request setRemoteId:[peripheral.identifier UUIDString]]; + [request setCharacteristicUuid:[descriptor.characteristic.UUID fullUUIDString]]; + [request setDescriptorUuid:[descriptor.UUID fullUUIDString]]; + if([descriptor.characteristic.service isPrimary]) { + [request setServiceUuid:[descriptor.characteristic.service.UUID fullUUIDString]]; + } else { + [request setSecondaryServiceUuid:[descriptor.characteristic.service.UUID fullUUIDString]]; + CBService *primaryService = [self findPrimaryService:[descriptor.characteristic service] peripheral:[descriptor.characteristic.service peripheral]]; + [request setServiceUuid:[primaryService.UUID fullUUIDString]]; + } + ProtosWriteDescriptorResponse *result = [[ProtosWriteDescriptorResponse alloc] init]; + [result setRequest:request]; + [result setSuccess:(error == nil)]; + [_channel invokeMethod:@"WriteDescriptorResponse" arguments:[self toFlutterData:result]]; +} + +// +// Proto Helper methods +// +- (FlutterStandardTypedData*)toFlutterData:(GPBMessage*)proto { + FlutterStandardTypedData *data = [FlutterStandardTypedData typedDataWithBytes:[[proto data] copy]]; + return data; +} + +- (ProtosBluetoothState*)toBluetoothStateProto:(CBManagerState)state { + ProtosBluetoothState *result = [[ProtosBluetoothState alloc] init]; + switch(state) { + case CBManagerStateResetting: + [result setState:ProtosBluetoothState_State_TurningOn]; + break; + case CBManagerStateUnsupported: + [result setState:ProtosBluetoothState_State_Unavailable]; + break; + case CBManagerStateUnauthorized: + [result setState:ProtosBluetoothState_State_Unauthorized]; + break; + case CBManagerStatePoweredOff: + [result setState:ProtosBluetoothState_State_Off]; + break; + case CBManagerStatePoweredOn: + [result setState:ProtosBluetoothState_State_On]; + break; + default: + [result setState:ProtosBluetoothState_State_Unknown]; + break; + } + return result; +} + +- (ProtosScanResult*)toScanResultProto:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI { + ProtosScanResult *result = [[ProtosScanResult alloc] init]; + [result setDevice:[self toDeviceProto:peripheral]]; + [result setRssi:[RSSI intValue]]; + ProtosAdvertisementData *ads = [[ProtosAdvertisementData alloc] init]; + [ads setConnectable:[advertisementData[CBAdvertisementDataIsConnectable] boolValue]]; + [ads setLocalName:advertisementData[CBAdvertisementDataLocalNameKey]]; + // Tx Power Level + NSNumber *txPower = advertisementData[CBAdvertisementDataTxPowerLevelKey]; + if(txPower != nil) { + ProtosInt32Value *txPowerWrapper = [[ProtosInt32Value alloc] init]; + [txPowerWrapper setValue:[txPower intValue]]; + [ads setTxPowerLevel:txPowerWrapper]; + } + // Manufacturer Specific Data + NSData *manufData = advertisementData[CBAdvertisementDataManufacturerDataKey]; + if(manufData.length > 2) { + unsigned short manufacturerId; + [manufData getBytes:&manufacturerId length:2]; + [[ads manufacturerData] setObject:[manufData subdataWithRange:NSMakeRange(2, manufData.length - 2)] forKey:manufacturerId]; + } + // Service Data + NSDictionary *serviceData = advertisementData[CBAdvertisementDataServiceDataKey]; + for (CBUUID *uuid in serviceData) { + [[ads serviceData] setObject:serviceData[uuid] forKey:uuid.UUIDString]; + } + // Service Uuids + NSArray *serviceUuids = advertisementData[CBAdvertisementDataServiceUUIDsKey]; + for (CBUUID *uuid in serviceUuids) { + [[ads serviceUuidsArray] addObject:uuid.UUIDString]; + } + [result setAdvertisementData:ads]; + return result; +} + +- (ProtosBluetoothDevice*)toDeviceProto:(CBPeripheral *)peripheral { + ProtosBluetoothDevice *result = [[ProtosBluetoothDevice alloc] init]; + [result setName:[peripheral name]]; + [result setRemoteId:[[peripheral identifier] UUIDString]]; + [result setType:ProtosBluetoothDevice_Type_Le]; // TODO: Does iOS differentiate? + return result; +} + +- (ProtosDeviceStateResponse*)toDeviceStateProto:(CBPeripheral *)peripheral state:(CBPeripheralState)state { + ProtosDeviceStateResponse *result = [[ProtosDeviceStateResponse alloc] init]; + switch(state) { + case CBPeripheralStateDisconnected: + [result setState:ProtosDeviceStateResponse_BluetoothDeviceState_Disconnected]; + break; + case CBPeripheralStateConnecting: + [result setState:ProtosDeviceStateResponse_BluetoothDeviceState_Connecting]; + break; + case CBPeripheralStateConnected: + [result setState:ProtosDeviceStateResponse_BluetoothDeviceState_Connected]; + break; + case CBPeripheralStateDisconnecting: + [result setState:ProtosDeviceStateResponse_BluetoothDeviceState_Disconnecting]; + break; + } + [result setRemoteId:[[peripheral identifier] UUIDString]]; + return result; +} + +- (ProtosDiscoverServicesResult*)toServicesResultProto:(CBPeripheral *)peripheral { + ProtosDiscoverServicesResult *result = [[ProtosDiscoverServicesResult alloc] init]; + [result setRemoteId:[peripheral.identifier UUIDString]]; + NSMutableArray *servicesProtos = [NSMutableArray new]; + for(CBService *s in [peripheral services]) { + [servicesProtos addObject:[self toServiceProto:peripheral service:s]]; + } + [result setServicesArray:servicesProtos]; + return result; +} + +- (ProtosBluetoothService*)toServiceProto:(CBPeripheral *)peripheral service:(CBService *)service { + ProtosBluetoothService *result = [[ProtosBluetoothService alloc] init]; + NSLog(@"peripheral uuid:%@", [peripheral.identifier UUIDString]); + NSLog(@"service uuid:%@", [service.UUID fullUUIDString]); + [result setRemoteId:[peripheral.identifier UUIDString]]; + [result setUuid:[service.UUID fullUUIDString]]; + [result setIsPrimary:[service isPrimary]]; + + // Characteristic Array + NSMutableArray *characteristicProtos = [NSMutableArray new]; + for(CBCharacteristic *c in [service characteristics]) { + [characteristicProtos addObject:[self toCharacteristicProto:c]]; + } + [result setCharacteristicsArray:characteristicProtos]; + + // Included Services Array + NSMutableArray *includedServicesProtos = [NSMutableArray new]; + for(CBService *s in [service includedServices]) { + [includedServicesProtos addObject:[self toServiceProto:peripheral service:s]]; + } + [result setIncludedServicesArray:includedServicesProtos]; + + return result; +} + +- (ProtosBluetoothCharacteristic*)toCharacteristicProto:(CBCharacteristic *)characteristic { + ProtosBluetoothCharacteristic *result = [[ProtosBluetoothCharacteristic alloc] init]; + [result setUuid:[characteristic.UUID fullUUIDString]]; + [result setProperties:[self toCharacteristicPropsProto:characteristic.properties]]; + [result setValue:[characteristic value]]; + NSLog(@"uuid: %@ value: %@", [characteristic.UUID fullUUIDString], [characteristic value]); + NSMutableArray *descriptorProtos = [NSMutableArray new]; + for(CBDescriptor *d in [characteristic descriptors]) { + [descriptorProtos addObject:[self toDescriptorProto:d]]; + } + [result setDescriptorsArray:descriptorProtos]; + if([characteristic.service isPrimary]) { + [result setServiceUuid:[characteristic.service.UUID fullUUIDString]]; + } else { + // Reverse search to find service and secondary service UUID + [result setSecondaryServiceUuid:[characteristic.service.UUID fullUUIDString]]; + CBService *primaryService = [self findPrimaryService:[characteristic service] peripheral:[characteristic.service peripheral]]; + [result setServiceUuid:[primaryService.UUID fullUUIDString]]; + } + return result; +} + +- (ProtosBluetoothDescriptor*)toDescriptorProto:(CBDescriptor *)descriptor { + ProtosBluetoothDescriptor *result = [[ProtosBluetoothDescriptor alloc] init]; + [result setUuid:[descriptor.UUID fullUUIDString]]; + [result setCharacteristicUuid:[descriptor.characteristic.UUID fullUUIDString]]; + [result setServiceUuid:[descriptor.characteristic.service.UUID fullUUIDString]]; + int value = [descriptor.value intValue]; + [result setValue:[NSData dataWithBytes:&value length:sizeof(value)]]; + return result; +} + +- (ProtosCharacteristicProperties*)toCharacteristicPropsProto:(CBCharacteristicProperties)props { + ProtosCharacteristicProperties *result = [[ProtosCharacteristicProperties alloc] init]; + [result setBroadcast:(props & CBCharacteristicPropertyBroadcast) != 0]; + [result setRead:(props & CBCharacteristicPropertyRead) != 0]; + [result setWriteWithoutResponse:(props & CBCharacteristicPropertyWriteWithoutResponse) != 0]; + [result setWrite:(props & CBCharacteristicPropertyWrite) != 0]; + [result setNotify:(props & CBCharacteristicPropertyNotify) != 0]; + [result setIndicate:(props & CBCharacteristicPropertyIndicate) != 0]; + [result setAuthenticatedSignedWrites:(props & CBCharacteristicPropertyAuthenticatedSignedWrites) != 0]; + [result setExtendedProperties:(props & CBCharacteristicPropertyExtendedProperties) != 0]; + [result setNotifyEncryptionRequired:(props & CBCharacteristicPropertyNotifyEncryptionRequired) != 0]; + [result setIndicateEncryptionRequired:(props & CBCharacteristicPropertyIndicateEncryptionRequired) != 0]; + return result; +} + + +- (void)log:(LogLevel)level format:(NSString *)format, ... { + if(level <= _logLevel) { + va_list args; + va_start(args, format); +// NSString* formattedMessage = [[NSString alloc] initWithFormat:format arguments:args]; + NSLog(format, args); + va_end(args); + } +} + +@end + +@implementation FlutterBleStreamHandler + +- (FlutterError*)onListenWithArguments:(id)arguments eventSink:(FlutterEventSink)eventSink { + self.sink = eventSink; + return nil; +} + +- (FlutterError*)onCancelWithArguments:(id)arguments { + self.sink = nil; + return nil; +} + +@end diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/flutter_ble.podspec b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/flutter_ble.podspec new file mode 100755 index 0000000..a31ee02 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/flutter_ble.podspec @@ -0,0 +1,47 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html +# +Pod::Spec.new do |s| + s.name = 'flutter_ble' + s.version = '0.5.1' + s.summary = 'A new Flutter plugin.' + s.description = <<-DESC +A new Flutter plugin. + DESC + s.homepage = 'http://example.com' + s.license = { :file => '../LICENSE' } + s.author = { 'Your Company' => 'email@example.com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.public_header_files = 'Classes/**/*.h' + s.dependency 'Flutter' + s.framework = 'CoreBluetooth' + s.dependency '!ProtoCompiler' + + protoc = ENV['PWD'] + '/Pods/!ProtoCompiler/protoc' + objc_out = 'gen' + proto_in = '../protos' + s.prepare_command = <<-CMD + mkdir -p #{objc_out} + #{protoc} \ + --objc_out=#{objc_out} \ + --proto_path=#{proto_in} \ + #{proto_in}/*.proto + CMD + + s.subspec 'Protos' do |ss| + ss.source_files = 'gen/**/*.pbobjc.{h,m}' + ss.header_mappings_dir = 'gen' + ss.requires_arc = false + ss.dependency 'Protobuf' + end + + s.pod_target_xcconfig = { + # This is needed by all pods that depend on Protobuf: + 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', + } + + + s.ios.deployment_target = '8.0' +end + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/gen/Flutterblue.pbobjc.h b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/gen/Flutterblue.pbobjc.h new file mode 100755 index 0000000..dce3ed6 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/gen/Flutterblue.pbobjc.h @@ -0,0 +1,733 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: flutterblue.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers.h" +#endif + +#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 +#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. +#endif +#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION +#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. +#endif + +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +CF_EXTERN_C_BEGIN + +@class ProtosAdvertisementData; +@class ProtosBluetoothCharacteristic; +@class ProtosBluetoothDescriptor; +@class ProtosBluetoothDevice; +@class ProtosBluetoothService; +@class ProtosCharacteristicProperties; +@class ProtosInt32Value; +@class ProtosReadDescriptorRequest; +@class ProtosWriteCharacteristicRequest; +@class ProtosWriteDescriptorRequest; + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Enum ProtosBluetoothState_State + +typedef GPB_ENUM(ProtosBluetoothState_State) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + ProtosBluetoothState_State_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + ProtosBluetoothState_State_Unknown = 0, + ProtosBluetoothState_State_Unavailable = 1, + ProtosBluetoothState_State_Unauthorized = 2, + ProtosBluetoothState_State_TurningOn = 3, + ProtosBluetoothState_State_On = 4, + ProtosBluetoothState_State_TurningOff = 5, + ProtosBluetoothState_State_Off = 6, +}; + +GPBEnumDescriptor *ProtosBluetoothState_State_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL ProtosBluetoothState_State_IsValidValue(int32_t value); + +#pragma mark - Enum ProtosBluetoothDevice_Type + +typedef GPB_ENUM(ProtosBluetoothDevice_Type) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + ProtosBluetoothDevice_Type_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + ProtosBluetoothDevice_Type_Unknown = 0, + ProtosBluetoothDevice_Type_Classic = 1, + ProtosBluetoothDevice_Type_Le = 2, + ProtosBluetoothDevice_Type_Dual = 3, +}; + +GPBEnumDescriptor *ProtosBluetoothDevice_Type_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL ProtosBluetoothDevice_Type_IsValidValue(int32_t value); + +#pragma mark - Enum ProtosWriteCharacteristicRequest_WriteType + +typedef GPB_ENUM(ProtosWriteCharacteristicRequest_WriteType) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + ProtosWriteCharacteristicRequest_WriteType_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + ProtosWriteCharacteristicRequest_WriteType_WithResponse = 0, + ProtosWriteCharacteristicRequest_WriteType_WithoutResponse = 1, +}; + +GPBEnumDescriptor *ProtosWriteCharacteristicRequest_WriteType_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL ProtosWriteCharacteristicRequest_WriteType_IsValidValue(int32_t value); + +#pragma mark - Enum ProtosDeviceStateResponse_BluetoothDeviceState + +typedef GPB_ENUM(ProtosDeviceStateResponse_BluetoothDeviceState) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + ProtosDeviceStateResponse_BluetoothDeviceState_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + ProtosDeviceStateResponse_BluetoothDeviceState_Disconnected = 0, + ProtosDeviceStateResponse_BluetoothDeviceState_Connecting = 1, + ProtosDeviceStateResponse_BluetoothDeviceState_Connected = 2, + ProtosDeviceStateResponse_BluetoothDeviceState_Disconnecting = 3, +}; + +GPBEnumDescriptor *ProtosDeviceStateResponse_BluetoothDeviceState_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL ProtosDeviceStateResponse_BluetoothDeviceState_IsValidValue(int32_t value); + +#pragma mark - ProtosFlutterblueRoot + +/** + * Exposes the extension registry for this file. + * + * The base class provides: + * @code + * + (GPBExtensionRegistry *)extensionRegistry; + * @endcode + * which is a @c GPBExtensionRegistry that includes all the extensions defined by + * this file and all files that it depends on. + **/ +@interface ProtosFlutterblueRoot : GPBRootObject +@end + +#pragma mark - ProtosInt32Value + +typedef GPB_ENUM(ProtosInt32Value_FieldNumber) { + ProtosInt32Value_FieldNumber_Value = 1, +}; + +/** + * Wrapper message for `int32`. + * + * Allows for nullability of fields in messages + **/ +@interface ProtosInt32Value : GPBMessage + +/** The int32 value. */ +@property(nonatomic, readwrite) int32_t value; + +@end + +#pragma mark - ProtosBluetoothState + +typedef GPB_ENUM(ProtosBluetoothState_FieldNumber) { + ProtosBluetoothState_FieldNumber_State = 1, +}; + +@interface ProtosBluetoothState : GPBMessage + +@property(nonatomic, readwrite) ProtosBluetoothState_State state; + +@end + +/** + * Fetches the raw value of a @c ProtosBluetoothState's @c state property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t ProtosBluetoothState_State_RawValue(ProtosBluetoothState *message); +/** + * Sets the raw value of an @c ProtosBluetoothState's @c state property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetProtosBluetoothState_State_RawValue(ProtosBluetoothState *message, int32_t value); + +#pragma mark - ProtosAdvertisementData + +typedef GPB_ENUM(ProtosAdvertisementData_FieldNumber) { + ProtosAdvertisementData_FieldNumber_LocalName = 1, + ProtosAdvertisementData_FieldNumber_TxPowerLevel = 2, + ProtosAdvertisementData_FieldNumber_Connectable = 3, + ProtosAdvertisementData_FieldNumber_ManufacturerData = 4, + ProtosAdvertisementData_FieldNumber_ServiceData = 5, + ProtosAdvertisementData_FieldNumber_ServiceUuidsArray = 6, +}; + +@interface ProtosAdvertisementData : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *localName; + +@property(nonatomic, readwrite, strong, null_resettable) ProtosInt32Value *txPowerLevel; +/** Test to see if @c txPowerLevel has been set. */ +@property(nonatomic, readwrite) BOOL hasTxPowerLevel; + +@property(nonatomic, readwrite) BOOL connectable; + +/** Map of manufacturers to their data */ +@property(nonatomic, readwrite, strong, null_resettable) GPBInt32ObjectDictionary *manufacturerData; +/** The number of items in @c manufacturerData without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger manufacturerData_Count; + +/** Map of service UUIDs to their data. */ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary *serviceData; +/** The number of items in @c serviceData without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger serviceData_Count; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *serviceUuidsArray; +/** The number of items in @c serviceUuidsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger serviceUuidsArray_Count; + +@end + +#pragma mark - ProtosScanSettings + +typedef GPB_ENUM(ProtosScanSettings_FieldNumber) { + ProtosScanSettings_FieldNumber_AndroidScanMode = 1, + ProtosScanSettings_FieldNumber_ServiceUuidsArray = 2, +}; + +@interface ProtosScanSettings : GPBMessage + +@property(nonatomic, readwrite) int32_t androidScanMode; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *serviceUuidsArray; +/** The number of items in @c serviceUuidsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger serviceUuidsArray_Count; + +@end + +#pragma mark - ProtosScanResult + +typedef GPB_ENUM(ProtosScanResult_FieldNumber) { + ProtosScanResult_FieldNumber_Device = 1, + ProtosScanResult_FieldNumber_AdvertisementData = 2, + ProtosScanResult_FieldNumber_Rssi = 3, +}; + +@interface ProtosScanResult : GPBMessage + +/** The received peer's ID. */ +@property(nonatomic, readwrite, strong, null_resettable) ProtosBluetoothDevice *device; +/** Test to see if @c device has been set. */ +@property(nonatomic, readwrite) BOOL hasDevice; + +@property(nonatomic, readwrite, strong, null_resettable) ProtosAdvertisementData *advertisementData; +/** Test to see if @c advertisementData has been set. */ +@property(nonatomic, readwrite) BOOL hasAdvertisementData; + +@property(nonatomic, readwrite) int32_t rssi; + +@end + +#pragma mark - ProtosConnectRequest + +typedef GPB_ENUM(ProtosConnectRequest_FieldNumber) { + ProtosConnectRequest_FieldNumber_RemoteId = 1, + ProtosConnectRequest_FieldNumber_AndroidAutoConnect = 2, +}; + +@interface ProtosConnectRequest : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite) BOOL androidAutoConnect; + +@end + +#pragma mark - ProtosBluetoothDevice + +typedef GPB_ENUM(ProtosBluetoothDevice_FieldNumber) { + ProtosBluetoothDevice_FieldNumber_RemoteId = 1, + ProtosBluetoothDevice_FieldNumber_Name = 2, + ProtosBluetoothDevice_FieldNumber_Type = 3, +}; + +@interface ProtosBluetoothDevice : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *name; + +@property(nonatomic, readwrite) ProtosBluetoothDevice_Type type; + +@end + +/** + * Fetches the raw value of a @c ProtosBluetoothDevice's @c type property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t ProtosBluetoothDevice_Type_RawValue(ProtosBluetoothDevice *message); +/** + * Sets the raw value of an @c ProtosBluetoothDevice's @c type property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetProtosBluetoothDevice_Type_RawValue(ProtosBluetoothDevice *message, int32_t value); + +#pragma mark - ProtosBluetoothService + +typedef GPB_ENUM(ProtosBluetoothService_FieldNumber) { + ProtosBluetoothService_FieldNumber_Uuid = 1, + ProtosBluetoothService_FieldNumber_RemoteId = 2, + ProtosBluetoothService_FieldNumber_IsPrimary = 3, + ProtosBluetoothService_FieldNumber_CharacteristicsArray = 4, + ProtosBluetoothService_FieldNumber_IncludedServicesArray = 5, +}; + +@interface ProtosBluetoothService : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *uuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +/** Indicates whether the type of service is primary or secondary. */ +@property(nonatomic, readwrite) BOOL isPrimary; + +/** A list of characteristics that have been discovered in this service. */ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *characteristicsArray; +/** The number of items in @c characteristicsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger characteristicsArray_Count; + +/** A list of included services that have been discovered in this service. */ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *includedServicesArray; +/** The number of items in @c includedServicesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger includedServicesArray_Count; + +@end + +#pragma mark - ProtosBluetoothCharacteristic + +typedef GPB_ENUM(ProtosBluetoothCharacteristic_FieldNumber) { + ProtosBluetoothCharacteristic_FieldNumber_Uuid = 1, + ProtosBluetoothCharacteristic_FieldNumber_ServiceUuid = 2, + ProtosBluetoothCharacteristic_FieldNumber_SecondaryServiceUuid = 3, + ProtosBluetoothCharacteristic_FieldNumber_DescriptorsArray = 4, + ProtosBluetoothCharacteristic_FieldNumber_Properties = 5, + ProtosBluetoothCharacteristic_FieldNumber_Value = 6, +}; + +@interface ProtosBluetoothCharacteristic : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *uuid; + +/** The service that this characteristic belongs to. */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *serviceUuid; + +/** The secondary service if nested */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *secondaryServiceUuid; + +/** A list of descriptors that have been discovered in this characteristic. */ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *descriptorsArray; +/** The number of items in @c descriptorsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger descriptorsArray_Count; + +/** The properties of the characteristic. */ +@property(nonatomic, readwrite, strong, null_resettable) ProtosCharacteristicProperties *properties; +/** Test to see if @c properties has been set. */ +@property(nonatomic, readwrite) BOOL hasProperties; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *value; + +@end + +#pragma mark - ProtosBluetoothDescriptor + +typedef GPB_ENUM(ProtosBluetoothDescriptor_FieldNumber) { + ProtosBluetoothDescriptor_FieldNumber_Uuid = 1, + ProtosBluetoothDescriptor_FieldNumber_ServiceUuid = 2, + ProtosBluetoothDescriptor_FieldNumber_CharacteristicUuid = 3, + ProtosBluetoothDescriptor_FieldNumber_Value = 4, +}; + +@interface ProtosBluetoothDescriptor : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *uuid; + +/** The service that this descriptor belongs to. */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *serviceUuid; + +/** The characteristic that this descriptor belongs to. */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *characteristicUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *value; + +@end + +#pragma mark - ProtosCharacteristicProperties + +typedef GPB_ENUM(ProtosCharacteristicProperties_FieldNumber) { + ProtosCharacteristicProperties_FieldNumber_Broadcast = 1, + ProtosCharacteristicProperties_FieldNumber_Read = 2, + ProtosCharacteristicProperties_FieldNumber_WriteWithoutResponse = 3, + ProtosCharacteristicProperties_FieldNumber_Write = 4, + ProtosCharacteristicProperties_FieldNumber_Notify = 5, + ProtosCharacteristicProperties_FieldNumber_Indicate = 6, + ProtosCharacteristicProperties_FieldNumber_AuthenticatedSignedWrites = 7, + ProtosCharacteristicProperties_FieldNumber_ExtendedProperties = 8, + ProtosCharacteristicProperties_FieldNumber_NotifyEncryptionRequired = 9, + ProtosCharacteristicProperties_FieldNumber_IndicateEncryptionRequired = 10, +}; + +@interface ProtosCharacteristicProperties : GPBMessage + +@property(nonatomic, readwrite) BOOL broadcast; + +@property(nonatomic, readwrite) BOOL read; + +@property(nonatomic, readwrite) BOOL writeWithoutResponse; + +@property(nonatomic, readwrite) BOOL write; + +@property(nonatomic, readwrite) BOOL notify; + +@property(nonatomic, readwrite) BOOL indicate; + +@property(nonatomic, readwrite) BOOL authenticatedSignedWrites; + +@property(nonatomic, readwrite) BOOL extendedProperties; + +@property(nonatomic, readwrite) BOOL notifyEncryptionRequired; + +@property(nonatomic, readwrite) BOOL indicateEncryptionRequired; + +@end + +#pragma mark - ProtosDiscoverServicesResult + +typedef GPB_ENUM(ProtosDiscoverServicesResult_FieldNumber) { + ProtosDiscoverServicesResult_FieldNumber_RemoteId = 1, + ProtosDiscoverServicesResult_FieldNumber_ServicesArray = 2, +}; + +@interface ProtosDiscoverServicesResult : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *servicesArray; +/** The number of items in @c servicesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger servicesArray_Count; + +@end + +#pragma mark - ProtosReadCharacteristicRequest + +typedef GPB_ENUM(ProtosReadCharacteristicRequest_FieldNumber) { + ProtosReadCharacteristicRequest_FieldNumber_RemoteId = 1, + ProtosReadCharacteristicRequest_FieldNumber_CharacteristicUuid = 2, + ProtosReadCharacteristicRequest_FieldNumber_ServiceUuid = 3, + ProtosReadCharacteristicRequest_FieldNumber_SecondaryServiceUuid = 4, +}; + +@interface ProtosReadCharacteristicRequest : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *characteristicUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *serviceUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *secondaryServiceUuid; + +@end + +#pragma mark - ProtosReadCharacteristicResponse + +typedef GPB_ENUM(ProtosReadCharacteristicResponse_FieldNumber) { + ProtosReadCharacteristicResponse_FieldNumber_RemoteId = 1, + ProtosReadCharacteristicResponse_FieldNumber_Characteristic = 2, +}; + +@interface ProtosReadCharacteristicResponse : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, strong, null_resettable) ProtosBluetoothCharacteristic *characteristic; +/** Test to see if @c characteristic has been set. */ +@property(nonatomic, readwrite) BOOL hasCharacteristic; + +@end + +#pragma mark - ProtosReadDescriptorRequest + +typedef GPB_ENUM(ProtosReadDescriptorRequest_FieldNumber) { + ProtosReadDescriptorRequest_FieldNumber_RemoteId = 1, + ProtosReadDescriptorRequest_FieldNumber_DescriptorUuid = 2, + ProtosReadDescriptorRequest_FieldNumber_ServiceUuid = 3, + ProtosReadDescriptorRequest_FieldNumber_SecondaryServiceUuid = 4, + ProtosReadDescriptorRequest_FieldNumber_CharacteristicUuid = 5, +}; + +@interface ProtosReadDescriptorRequest : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *descriptorUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *serviceUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *secondaryServiceUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *characteristicUuid; + +@end + +#pragma mark - ProtosReadDescriptorResponse + +typedef GPB_ENUM(ProtosReadDescriptorResponse_FieldNumber) { + ProtosReadDescriptorResponse_FieldNumber_Request = 1, + ProtosReadDescriptorResponse_FieldNumber_Value = 2, +}; + +@interface ProtosReadDescriptorResponse : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) ProtosReadDescriptorRequest *request; +/** Test to see if @c request has been set. */ +@property(nonatomic, readwrite) BOOL hasRequest; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *value; + +@end + +#pragma mark - ProtosWriteCharacteristicRequest + +typedef GPB_ENUM(ProtosWriteCharacteristicRequest_FieldNumber) { + ProtosWriteCharacteristicRequest_FieldNumber_RemoteId = 1, + ProtosWriteCharacteristicRequest_FieldNumber_CharacteristicUuid = 2, + ProtosWriteCharacteristicRequest_FieldNumber_ServiceUuid = 3, + ProtosWriteCharacteristicRequest_FieldNumber_SecondaryServiceUuid = 4, + ProtosWriteCharacteristicRequest_FieldNumber_WriteType = 5, + ProtosWriteCharacteristicRequest_FieldNumber_Value = 6, +}; + +@interface ProtosWriteCharacteristicRequest : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *characteristicUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *serviceUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *secondaryServiceUuid; + +@property(nonatomic, readwrite) ProtosWriteCharacteristicRequest_WriteType writeType; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *value; + +@end + +/** + * Fetches the raw value of a @c ProtosWriteCharacteristicRequest's @c writeType property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t ProtosWriteCharacteristicRequest_WriteType_RawValue(ProtosWriteCharacteristicRequest *message); +/** + * Sets the raw value of an @c ProtosWriteCharacteristicRequest's @c writeType property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetProtosWriteCharacteristicRequest_WriteType_RawValue(ProtosWriteCharacteristicRequest *message, int32_t value); + +#pragma mark - ProtosWriteCharacteristicResponse + +typedef GPB_ENUM(ProtosWriteCharacteristicResponse_FieldNumber) { + ProtosWriteCharacteristicResponse_FieldNumber_Request = 1, + ProtosWriteCharacteristicResponse_FieldNumber_Success = 2, +}; + +@interface ProtosWriteCharacteristicResponse : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) ProtosWriteCharacteristicRequest *request; +/** Test to see if @c request has been set. */ +@property(nonatomic, readwrite) BOOL hasRequest; + +@property(nonatomic, readwrite) BOOL success; + +@end + +#pragma mark - ProtosWriteDescriptorRequest + +typedef GPB_ENUM(ProtosWriteDescriptorRequest_FieldNumber) { + ProtosWriteDescriptorRequest_FieldNumber_RemoteId = 1, + ProtosWriteDescriptorRequest_FieldNumber_DescriptorUuid = 2, + ProtosWriteDescriptorRequest_FieldNumber_ServiceUuid = 3, + ProtosWriteDescriptorRequest_FieldNumber_SecondaryServiceUuid = 4, + ProtosWriteDescriptorRequest_FieldNumber_CharacteristicUuid = 5, + ProtosWriteDescriptorRequest_FieldNumber_Value = 6, +}; + +@interface ProtosWriteDescriptorRequest : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *descriptorUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *serviceUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *secondaryServiceUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *characteristicUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *value; + +@end + +#pragma mark - ProtosWriteDescriptorResponse + +typedef GPB_ENUM(ProtosWriteDescriptorResponse_FieldNumber) { + ProtosWriteDescriptorResponse_FieldNumber_Request = 1, + ProtosWriteDescriptorResponse_FieldNumber_Success = 2, +}; + +@interface ProtosWriteDescriptorResponse : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) ProtosWriteDescriptorRequest *request; +/** Test to see if @c request has been set. */ +@property(nonatomic, readwrite) BOOL hasRequest; + +@property(nonatomic, readwrite) BOOL success; + +@end + +#pragma mark - ProtosSetNotificationRequest + +typedef GPB_ENUM(ProtosSetNotificationRequest_FieldNumber) { + ProtosSetNotificationRequest_FieldNumber_RemoteId = 1, + ProtosSetNotificationRequest_FieldNumber_ServiceUuid = 2, + ProtosSetNotificationRequest_FieldNumber_SecondaryServiceUuid = 3, + ProtosSetNotificationRequest_FieldNumber_CharacteristicUuid = 4, + ProtosSetNotificationRequest_FieldNumber_Enable = 5, +}; + +@interface ProtosSetNotificationRequest : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *serviceUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *secondaryServiceUuid; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *characteristicUuid; + +@property(nonatomic, readwrite) BOOL enable; + +@end + +#pragma mark - ProtosSetNotificationResponse + +typedef GPB_ENUM(ProtosSetNotificationResponse_FieldNumber) { + ProtosSetNotificationResponse_FieldNumber_RemoteId = 1, + ProtosSetNotificationResponse_FieldNumber_Characteristic = 2, + ProtosSetNotificationResponse_FieldNumber_Success = 3, +}; + +@interface ProtosSetNotificationResponse : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, strong, null_resettable) ProtosBluetoothCharacteristic *characteristic; +/** Test to see if @c characteristic has been set. */ +@property(nonatomic, readwrite) BOOL hasCharacteristic; + +@property(nonatomic, readwrite) BOOL success; + +@end + +#pragma mark - ProtosOnNotificationResponse + +typedef GPB_ENUM(ProtosOnNotificationResponse_FieldNumber) { + ProtosOnNotificationResponse_FieldNumber_RemoteId = 1, + ProtosOnNotificationResponse_FieldNumber_Characteristic = 2, +}; + +@interface ProtosOnNotificationResponse : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite, strong, null_resettable) ProtosBluetoothCharacteristic *characteristic; +/** Test to see if @c characteristic has been set. */ +@property(nonatomic, readwrite) BOOL hasCharacteristic; + +@end + +#pragma mark - ProtosDeviceStateResponse + +typedef GPB_ENUM(ProtosDeviceStateResponse_FieldNumber) { + ProtosDeviceStateResponse_FieldNumber_RemoteId = 1, + ProtosDeviceStateResponse_FieldNumber_State = 2, +}; + +@interface ProtosDeviceStateResponse : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *remoteId; + +@property(nonatomic, readwrite) ProtosDeviceStateResponse_BluetoothDeviceState state; + +@end + +/** + * Fetches the raw value of a @c ProtosDeviceStateResponse's @c state property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t ProtosDeviceStateResponse_State_RawValue(ProtosDeviceStateResponse *message); +/** + * Sets the raw value of an @c ProtosDeviceStateResponse's @c state property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetProtosDeviceStateResponse_State_RawValue(ProtosDeviceStateResponse *message, int32_t value); + +NS_ASSUME_NONNULL_END + +CF_EXTERN_C_END + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/gen/Flutterblue.pbobjc.m b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/gen/Flutterblue.pbobjc.m new file mode 100755 index 0000000..9d9e19a --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/ios/gen/Flutterblue.pbobjc.m @@ -0,0 +1,2014 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: flutterblue.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers_RuntimeSupport.h" +#endif + +#import + +#import "Flutterblue.pbobjc.h" +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +#pragma mark - ProtosFlutterblueRoot + +@implementation ProtosFlutterblueRoot + +// No extensions in the file and no imports, so no need to generate +// +extensionRegistry. + +@end + +#pragma mark - ProtosFlutterblueRoot_FileDescriptor + +static GPBFileDescriptor *ProtosFlutterblueRoot_FileDescriptor(void) { + // This is called by +initialize so there is no need to worry + // about thread safety of the singleton. + static GPBFileDescriptor *descriptor = NULL; + if (!descriptor) { + GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"" + objcPrefix:@"Protos" + syntax:GPBFileSyntaxProto3]; + } + return descriptor; +} + +#pragma mark - ProtosInt32Value + +@implementation ProtosInt32Value + +@dynamic value; + +typedef struct ProtosInt32Value__storage_ { + uint32_t _has_storage_[1]; + int32_t value; +} ProtosInt32Value__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "value", + .dataTypeSpecific.className = NULL, + .number = ProtosInt32Value_FieldNumber_Value, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosInt32Value__storage_, value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeInt32, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosInt32Value class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosInt32Value__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosBluetoothState + +@implementation ProtosBluetoothState + +@dynamic state; + +typedef struct ProtosBluetoothState__storage_ { + uint32_t _has_storage_[1]; + ProtosBluetoothState_State state; +} ProtosBluetoothState__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "state", + .dataTypeSpecific.enumDescFunc = ProtosBluetoothState_State_EnumDescriptor, + .number = ProtosBluetoothState_FieldNumber_State, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosBluetoothState__storage_, state), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), + .dataType = GPBDataTypeEnum, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothState class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosBluetoothState__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t ProtosBluetoothState_State_RawValue(ProtosBluetoothState *message) { + GPBDescriptor *descriptor = [ProtosBluetoothState descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothState_FieldNumber_State]; + return GPBGetMessageInt32Field(message, field); +} + +void SetProtosBluetoothState_State_RawValue(ProtosBluetoothState *message, int32_t value) { + GPBDescriptor *descriptor = [ProtosBluetoothState descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothState_FieldNumber_State]; + GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); +} + +#pragma mark - Enum ProtosBluetoothState_State + +GPBEnumDescriptor *ProtosBluetoothState_State_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Unknown\000Unavailable\000Unauthorized\000Turning" + "On\000On\000TurningOff\000Off\000"; + static const int32_t values[] = { + ProtosBluetoothState_State_Unknown, + ProtosBluetoothState_State_Unavailable, + ProtosBluetoothState_State_Unauthorized, + ProtosBluetoothState_State_TurningOn, + ProtosBluetoothState_State_On, + ProtosBluetoothState_State_TurningOff, + ProtosBluetoothState_State_Off, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosBluetoothState_State) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:ProtosBluetoothState_State_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL ProtosBluetoothState_State_IsValidValue(int32_t value__) { + switch (value__) { + case ProtosBluetoothState_State_Unknown: + case ProtosBluetoothState_State_Unavailable: + case ProtosBluetoothState_State_Unauthorized: + case ProtosBluetoothState_State_TurningOn: + case ProtosBluetoothState_State_On: + case ProtosBluetoothState_State_TurningOff: + case ProtosBluetoothState_State_Off: + return YES; + default: + return NO; + } +} + +#pragma mark - ProtosAdvertisementData + +@implementation ProtosAdvertisementData + +@dynamic localName; +@dynamic hasTxPowerLevel, txPowerLevel; +@dynamic connectable; +@dynamic manufacturerData, manufacturerData_Count; +@dynamic serviceData, serviceData_Count; +@dynamic serviceUuidsArray, serviceUuidsArray_Count; + +typedef struct ProtosAdvertisementData__storage_ { + uint32_t _has_storage_[1]; + NSString *localName; + ProtosInt32Value *txPowerLevel; + GPBInt32ObjectDictionary *manufacturerData; + NSMutableDictionary *serviceData; + NSMutableArray *serviceUuidsArray; +} ProtosAdvertisementData__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "localName", + .dataTypeSpecific.className = NULL, + .number = ProtosAdvertisementData_FieldNumber_LocalName, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, localName), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "txPowerLevel", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosInt32Value), + .number = ProtosAdvertisementData_FieldNumber_TxPowerLevel, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, txPowerLevel), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "connectable", + .dataTypeSpecific.className = NULL, + .number = ProtosAdvertisementData_FieldNumber_Connectable, + .hasIndex = 2, + .offset = 3, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "manufacturerData", + .dataTypeSpecific.className = NULL, + .number = ProtosAdvertisementData_FieldNumber_ManufacturerData, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, manufacturerData), + .flags = GPBFieldMapKeyInt32, + .dataType = GPBDataTypeBytes, + }, + { + .name = "serviceData", + .dataTypeSpecific.className = NULL, + .number = ProtosAdvertisementData_FieldNumber_ServiceData, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, serviceData), + .flags = GPBFieldMapKeyString, + .dataType = GPBDataTypeBytes, + }, + { + .name = "serviceUuidsArray", + .dataTypeSpecific.className = NULL, + .number = ProtosAdvertisementData_FieldNumber_ServiceUuidsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(ProtosAdvertisementData__storage_, serviceUuidsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosAdvertisementData class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosAdvertisementData__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosScanSettings + +@implementation ProtosScanSettings + +@dynamic androidScanMode; +@dynamic serviceUuidsArray, serviceUuidsArray_Count; + +typedef struct ProtosScanSettings__storage_ { + uint32_t _has_storage_[1]; + int32_t androidScanMode; + NSMutableArray *serviceUuidsArray; +} ProtosScanSettings__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "androidScanMode", + .dataTypeSpecific.className = NULL, + .number = ProtosScanSettings_FieldNumber_AndroidScanMode, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosScanSettings__storage_, androidScanMode), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeInt32, + }, + { + .name = "serviceUuidsArray", + .dataTypeSpecific.className = NULL, + .number = ProtosScanSettings_FieldNumber_ServiceUuidsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(ProtosScanSettings__storage_, serviceUuidsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosScanSettings class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosScanSettings__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosScanResult + +@implementation ProtosScanResult + +@dynamic hasDevice, device; +@dynamic hasAdvertisementData, advertisementData; +@dynamic rssi; + +typedef struct ProtosScanResult__storage_ { + uint32_t _has_storage_[1]; + int32_t rssi; + ProtosBluetoothDevice *device; + ProtosAdvertisementData *advertisementData; +} ProtosScanResult__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "device", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothDevice), + .number = ProtosScanResult_FieldNumber_Device, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosScanResult__storage_, device), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "advertisementData", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosAdvertisementData), + .number = ProtosScanResult_FieldNumber_AdvertisementData, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosScanResult__storage_, advertisementData), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "rssi", + .dataTypeSpecific.className = NULL, + .number = ProtosScanResult_FieldNumber_Rssi, + .hasIndex = 2, + .offset = (uint32_t)offsetof(ProtosScanResult__storage_, rssi), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeInt32, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosScanResult class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosScanResult__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosConnectRequest + +@implementation ProtosConnectRequest + +@dynamic remoteId; +@dynamic androidAutoConnect; + +typedef struct ProtosConnectRequest__storage_ { + uint32_t _has_storage_[1]; + NSString *remoteId; +} ProtosConnectRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosConnectRequest_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosConnectRequest__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "androidAutoConnect", + .dataTypeSpecific.className = NULL, + .number = ProtosConnectRequest_FieldNumber_AndroidAutoConnect, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosConnectRequest class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosConnectRequest__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosBluetoothDevice + +@implementation ProtosBluetoothDevice + +@dynamic remoteId; +@dynamic name; +@dynamic type; + +typedef struct ProtosBluetoothDevice__storage_ { + uint32_t _has_storage_[1]; + ProtosBluetoothDevice_Type type; + NSString *remoteId; + NSString *name; +} ProtosBluetoothDevice__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothDevice_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosBluetoothDevice__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "name", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothDevice_FieldNumber_Name, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosBluetoothDevice__storage_, name), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "type", + .dataTypeSpecific.enumDescFunc = ProtosBluetoothDevice_Type_EnumDescriptor, + .number = ProtosBluetoothDevice_FieldNumber_Type, + .hasIndex = 2, + .offset = (uint32_t)offsetof(ProtosBluetoothDevice__storage_, type), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), + .dataType = GPBDataTypeEnum, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothDevice class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosBluetoothDevice__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t ProtosBluetoothDevice_Type_RawValue(ProtosBluetoothDevice *message) { + GPBDescriptor *descriptor = [ProtosBluetoothDevice descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothDevice_FieldNumber_Type]; + return GPBGetMessageInt32Field(message, field); +} + +void SetProtosBluetoothDevice_Type_RawValue(ProtosBluetoothDevice *message, int32_t value) { + GPBDescriptor *descriptor = [ProtosBluetoothDevice descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosBluetoothDevice_FieldNumber_Type]; + GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); +} + +#pragma mark - Enum ProtosBluetoothDevice_Type + +GPBEnumDescriptor *ProtosBluetoothDevice_Type_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Unknown\000Classic\000Le\000Dual\000"; + static const int32_t values[] = { + ProtosBluetoothDevice_Type_Unknown, + ProtosBluetoothDevice_Type_Classic, + ProtosBluetoothDevice_Type_Le, + ProtosBluetoothDevice_Type_Dual, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosBluetoothDevice_Type) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:ProtosBluetoothDevice_Type_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL ProtosBluetoothDevice_Type_IsValidValue(int32_t value__) { + switch (value__) { + case ProtosBluetoothDevice_Type_Unknown: + case ProtosBluetoothDevice_Type_Classic: + case ProtosBluetoothDevice_Type_Le: + case ProtosBluetoothDevice_Type_Dual: + return YES; + default: + return NO; + } +} + +#pragma mark - ProtosBluetoothService + +@implementation ProtosBluetoothService + +@dynamic uuid; +@dynamic remoteId; +@dynamic isPrimary; +@dynamic characteristicsArray, characteristicsArray_Count; +@dynamic includedServicesArray, includedServicesArray_Count; + +typedef struct ProtosBluetoothService__storage_ { + uint32_t _has_storage_[1]; + NSString *uuid; + NSString *remoteId; + NSMutableArray *characteristicsArray; + NSMutableArray *includedServicesArray; +} ProtosBluetoothService__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "uuid", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothService_FieldNumber_Uuid, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, uuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothService_FieldNumber_RemoteId, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "isPrimary", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothService_FieldNumber_IsPrimary, + .hasIndex = 2, + .offset = 3, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "characteristicsArray", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic), + .number = ProtosBluetoothService_FieldNumber_CharacteristicsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, characteristicsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + { + .name = "includedServicesArray", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothService), + .number = ProtosBluetoothService_FieldNumber_IncludedServicesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(ProtosBluetoothService__storage_, includedServicesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothService class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosBluetoothService__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosBluetoothCharacteristic + +@implementation ProtosBluetoothCharacteristic + +@dynamic uuid; +@dynamic serviceUuid; +@dynamic secondaryServiceUuid; +@dynamic descriptorsArray, descriptorsArray_Count; +@dynamic hasProperties, properties; +@dynamic value; + +typedef struct ProtosBluetoothCharacteristic__storage_ { + uint32_t _has_storage_[1]; + NSString *uuid; + NSString *serviceUuid; + NSString *secondaryServiceUuid; + NSMutableArray *descriptorsArray; + ProtosCharacteristicProperties *properties; + NSData *value; +} ProtosBluetoothCharacteristic__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "uuid", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothCharacteristic_FieldNumber_Uuid, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, uuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "serviceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothCharacteristic_FieldNumber_ServiceUuid, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, serviceUuid), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), + .dataType = GPBDataTypeString, + }, + { + .name = "secondaryServiceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothCharacteristic_FieldNumber_SecondaryServiceUuid, + .hasIndex = 2, + .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, secondaryServiceUuid), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), + .dataType = GPBDataTypeString, + }, + { + .name = "descriptorsArray", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothDescriptor), + .number = ProtosBluetoothCharacteristic_FieldNumber_DescriptorsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, descriptorsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + { + .name = "properties", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosCharacteristicProperties), + .number = ProtosBluetoothCharacteristic_FieldNumber_Properties, + .hasIndex = 3, + .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, properties), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "value", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothCharacteristic_FieldNumber_Value, + .hasIndex = 4, + .offset = (uint32_t)offsetof(ProtosBluetoothCharacteristic__storage_, value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothCharacteristic class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosBluetoothCharacteristic__storage_) + flags:GPBDescriptorInitializationFlag_None]; +#if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS + static const char *extraTextFormatInfo = + "\002\002\013\000\003\024\000"; + [localDescriptor setupExtraTextInfo:extraTextFormatInfo]; +#endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosBluetoothDescriptor + +@implementation ProtosBluetoothDescriptor + +@dynamic uuid; +@dynamic serviceUuid; +@dynamic characteristicUuid; +@dynamic value; + +typedef struct ProtosBluetoothDescriptor__storage_ { + uint32_t _has_storage_[1]; + NSString *uuid; + NSString *serviceUuid; + NSString *characteristicUuid; + NSData *value; +} ProtosBluetoothDescriptor__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "uuid", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothDescriptor_FieldNumber_Uuid, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, uuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "serviceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothDescriptor_FieldNumber_ServiceUuid, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, serviceUuid), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), + .dataType = GPBDataTypeString, + }, + { + .name = "characteristicUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothDescriptor_FieldNumber_CharacteristicUuid, + .hasIndex = 2, + .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, characteristicUuid), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), + .dataType = GPBDataTypeString, + }, + { + .name = "value", + .dataTypeSpecific.className = NULL, + .number = ProtosBluetoothDescriptor_FieldNumber_Value, + .hasIndex = 3, + .offset = (uint32_t)offsetof(ProtosBluetoothDescriptor__storage_, value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosBluetoothDescriptor class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosBluetoothDescriptor__storage_) + flags:GPBDescriptorInitializationFlag_None]; +#if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS + static const char *extraTextFormatInfo = + "\002\002\013\000\003\022\000"; + [localDescriptor setupExtraTextInfo:extraTextFormatInfo]; +#endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosCharacteristicProperties + +@implementation ProtosCharacteristicProperties + +@dynamic broadcast; +@dynamic read; +@dynamic writeWithoutResponse; +@dynamic write; +@dynamic notify; +@dynamic indicate; +@dynamic authenticatedSignedWrites; +@dynamic extendedProperties; +@dynamic notifyEncryptionRequired; +@dynamic indicateEncryptionRequired; + +typedef struct ProtosCharacteristicProperties__storage_ { + uint32_t _has_storage_[1]; +} ProtosCharacteristicProperties__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "broadcast", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_Broadcast, + .hasIndex = 0, + .offset = 1, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "read", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_Read, + .hasIndex = 2, + .offset = 3, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "writeWithoutResponse", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_WriteWithoutResponse, + .hasIndex = 4, + .offset = 5, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "write", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_Write, + .hasIndex = 6, + .offset = 7, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "notify", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_Notify, + .hasIndex = 8, + .offset = 9, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "indicate", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_Indicate, + .hasIndex = 10, + .offset = 11, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "authenticatedSignedWrites", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_AuthenticatedSignedWrites, + .hasIndex = 12, + .offset = 13, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "extendedProperties", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_ExtendedProperties, + .hasIndex = 14, + .offset = 15, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "notifyEncryptionRequired", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_NotifyEncryptionRequired, + .hasIndex = 16, + .offset = 17, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "indicateEncryptionRequired", + .dataTypeSpecific.className = NULL, + .number = ProtosCharacteristicProperties_FieldNumber_IndicateEncryptionRequired, + .hasIndex = 18, + .offset = 19, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosCharacteristicProperties class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosCharacteristicProperties__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosDiscoverServicesResult + +@implementation ProtosDiscoverServicesResult + +@dynamic remoteId; +@dynamic servicesArray, servicesArray_Count; + +typedef struct ProtosDiscoverServicesResult__storage_ { + uint32_t _has_storage_[1]; + NSString *remoteId; + NSMutableArray *servicesArray; +} ProtosDiscoverServicesResult__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosDiscoverServicesResult_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosDiscoverServicesResult__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "servicesArray", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothService), + .number = ProtosDiscoverServicesResult_FieldNumber_ServicesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(ProtosDiscoverServicesResult__storage_, servicesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosDiscoverServicesResult class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosDiscoverServicesResult__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosReadCharacteristicRequest + +@implementation ProtosReadCharacteristicRequest + +@dynamic remoteId; +@dynamic characteristicUuid; +@dynamic serviceUuid; +@dynamic secondaryServiceUuid; + +typedef struct ProtosReadCharacteristicRequest__storage_ { + uint32_t _has_storage_[1]; + NSString *remoteId; + NSString *characteristicUuid; + NSString *serviceUuid; + NSString *secondaryServiceUuid; +} ProtosReadCharacteristicRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosReadCharacteristicRequest_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "characteristicUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosReadCharacteristicRequest_FieldNumber_CharacteristicUuid, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, characteristicUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "serviceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosReadCharacteristicRequest_FieldNumber_ServiceUuid, + .hasIndex = 2, + .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, serviceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "secondaryServiceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosReadCharacteristicRequest_FieldNumber_SecondaryServiceUuid, + .hasIndex = 3, + .offset = (uint32_t)offsetof(ProtosReadCharacteristicRequest__storage_, secondaryServiceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosReadCharacteristicRequest class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosReadCharacteristicRequest__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosReadCharacteristicResponse + +@implementation ProtosReadCharacteristicResponse + +@dynamic remoteId; +@dynamic hasCharacteristic, characteristic; + +typedef struct ProtosReadCharacteristicResponse__storage_ { + uint32_t _has_storage_[1]; + NSString *remoteId; + ProtosBluetoothCharacteristic *characteristic; +} ProtosReadCharacteristicResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosReadCharacteristicResponse_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosReadCharacteristicResponse__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "characteristic", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic), + .number = ProtosReadCharacteristicResponse_FieldNumber_Characteristic, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosReadCharacteristicResponse__storage_, characteristic), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosReadCharacteristicResponse class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosReadCharacteristicResponse__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosReadDescriptorRequest + +@implementation ProtosReadDescriptorRequest + +@dynamic remoteId; +@dynamic descriptorUuid; +@dynamic serviceUuid; +@dynamic secondaryServiceUuid; +@dynamic characteristicUuid; + +typedef struct ProtosReadDescriptorRequest__storage_ { + uint32_t _has_storage_[1]; + NSString *remoteId; + NSString *descriptorUuid; + NSString *serviceUuid; + NSString *secondaryServiceUuid; + NSString *characteristicUuid; +} ProtosReadDescriptorRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosReadDescriptorRequest_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "descriptorUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosReadDescriptorRequest_FieldNumber_DescriptorUuid, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, descriptorUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "serviceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosReadDescriptorRequest_FieldNumber_ServiceUuid, + .hasIndex = 2, + .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, serviceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "secondaryServiceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosReadDescriptorRequest_FieldNumber_SecondaryServiceUuid, + .hasIndex = 3, + .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, secondaryServiceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "characteristicUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosReadDescriptorRequest_FieldNumber_CharacteristicUuid, + .hasIndex = 4, + .offset = (uint32_t)offsetof(ProtosReadDescriptorRequest__storage_, characteristicUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosReadDescriptorRequest class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosReadDescriptorRequest__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosReadDescriptorResponse + +@implementation ProtosReadDescriptorResponse + +@dynamic hasRequest, request; +@dynamic value; + +typedef struct ProtosReadDescriptorResponse__storage_ { + uint32_t _has_storage_[1]; + ProtosReadDescriptorRequest *request; + NSData *value; +} ProtosReadDescriptorResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "request", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosReadDescriptorRequest), + .number = ProtosReadDescriptorResponse_FieldNumber_Request, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosReadDescriptorResponse__storage_, request), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "value", + .dataTypeSpecific.className = NULL, + .number = ProtosReadDescriptorResponse_FieldNumber_Value, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosReadDescriptorResponse__storage_, value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosReadDescriptorResponse class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosReadDescriptorResponse__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosWriteCharacteristicRequest + +@implementation ProtosWriteCharacteristicRequest + +@dynamic remoteId; +@dynamic characteristicUuid; +@dynamic serviceUuid; +@dynamic secondaryServiceUuid; +@dynamic writeType; +@dynamic value; + +typedef struct ProtosWriteCharacteristicRequest__storage_ { + uint32_t _has_storage_[1]; + ProtosWriteCharacteristicRequest_WriteType writeType; + NSString *remoteId; + NSString *characteristicUuid; + NSString *serviceUuid; + NSString *secondaryServiceUuid; + NSData *value; +} ProtosWriteCharacteristicRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteCharacteristicRequest_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "characteristicUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteCharacteristicRequest_FieldNumber_CharacteristicUuid, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, characteristicUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "serviceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteCharacteristicRequest_FieldNumber_ServiceUuid, + .hasIndex = 2, + .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, serviceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "secondaryServiceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteCharacteristicRequest_FieldNumber_SecondaryServiceUuid, + .hasIndex = 3, + .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, secondaryServiceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "writeType", + .dataTypeSpecific.enumDescFunc = ProtosWriteCharacteristicRequest_WriteType_EnumDescriptor, + .number = ProtosWriteCharacteristicRequest_FieldNumber_WriteType, + .hasIndex = 4, + .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, writeType), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), + .dataType = GPBDataTypeEnum, + }, + { + .name = "value", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteCharacteristicRequest_FieldNumber_Value, + .hasIndex = 5, + .offset = (uint32_t)offsetof(ProtosWriteCharacteristicRequest__storage_, value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosWriteCharacteristicRequest class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosWriteCharacteristicRequest__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t ProtosWriteCharacteristicRequest_WriteType_RawValue(ProtosWriteCharacteristicRequest *message) { + GPBDescriptor *descriptor = [ProtosWriteCharacteristicRequest descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosWriteCharacteristicRequest_FieldNumber_WriteType]; + return GPBGetMessageInt32Field(message, field); +} + +void SetProtosWriteCharacteristicRequest_WriteType_RawValue(ProtosWriteCharacteristicRequest *message, int32_t value) { + GPBDescriptor *descriptor = [ProtosWriteCharacteristicRequest descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosWriteCharacteristicRequest_FieldNumber_WriteType]; + GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); +} + +#pragma mark - Enum ProtosWriteCharacteristicRequest_WriteType + +GPBEnumDescriptor *ProtosWriteCharacteristicRequest_WriteType_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "WithResponse\000WithoutResponse\000"; + static const int32_t values[] = { + ProtosWriteCharacteristicRequest_WriteType_WithResponse, + ProtosWriteCharacteristicRequest_WriteType_WithoutResponse, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosWriteCharacteristicRequest_WriteType) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:ProtosWriteCharacteristicRequest_WriteType_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL ProtosWriteCharacteristicRequest_WriteType_IsValidValue(int32_t value__) { + switch (value__) { + case ProtosWriteCharacteristicRequest_WriteType_WithResponse: + case ProtosWriteCharacteristicRequest_WriteType_WithoutResponse: + return YES; + default: + return NO; + } +} + +#pragma mark - ProtosWriteCharacteristicResponse + +@implementation ProtosWriteCharacteristicResponse + +@dynamic hasRequest, request; +@dynamic success; + +typedef struct ProtosWriteCharacteristicResponse__storage_ { + uint32_t _has_storage_[1]; + ProtosWriteCharacteristicRequest *request; +} ProtosWriteCharacteristicResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "request", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosWriteCharacteristicRequest), + .number = ProtosWriteCharacteristicResponse_FieldNumber_Request, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosWriteCharacteristicResponse__storage_, request), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "success", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteCharacteristicResponse_FieldNumber_Success, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosWriteCharacteristicResponse class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosWriteCharacteristicResponse__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosWriteDescriptorRequest + +@implementation ProtosWriteDescriptorRequest + +@dynamic remoteId; +@dynamic descriptorUuid; +@dynamic serviceUuid; +@dynamic secondaryServiceUuid; +@dynamic characteristicUuid; +@dynamic value; + +typedef struct ProtosWriteDescriptorRequest__storage_ { + uint32_t _has_storage_[1]; + NSString *remoteId; + NSString *descriptorUuid; + NSString *serviceUuid; + NSString *secondaryServiceUuid; + NSString *characteristicUuid; + NSData *value; +} ProtosWriteDescriptorRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteDescriptorRequest_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "descriptorUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteDescriptorRequest_FieldNumber_DescriptorUuid, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, descriptorUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "serviceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteDescriptorRequest_FieldNumber_ServiceUuid, + .hasIndex = 2, + .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, serviceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "secondaryServiceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteDescriptorRequest_FieldNumber_SecondaryServiceUuid, + .hasIndex = 3, + .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, secondaryServiceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "characteristicUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteDescriptorRequest_FieldNumber_CharacteristicUuid, + .hasIndex = 4, + .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, characteristicUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "value", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteDescriptorRequest_FieldNumber_Value, + .hasIndex = 5, + .offset = (uint32_t)offsetof(ProtosWriteDescriptorRequest__storage_, value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosWriteDescriptorRequest class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosWriteDescriptorRequest__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosWriteDescriptorResponse + +@implementation ProtosWriteDescriptorResponse + +@dynamic hasRequest, request; +@dynamic success; + +typedef struct ProtosWriteDescriptorResponse__storage_ { + uint32_t _has_storage_[1]; + ProtosWriteDescriptorRequest *request; +} ProtosWriteDescriptorResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "request", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosWriteDescriptorRequest), + .number = ProtosWriteDescriptorResponse_FieldNumber_Request, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosWriteDescriptorResponse__storage_, request), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "success", + .dataTypeSpecific.className = NULL, + .number = ProtosWriteDescriptorResponse_FieldNumber_Success, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosWriteDescriptorResponse class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosWriteDescriptorResponse__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosSetNotificationRequest + +@implementation ProtosSetNotificationRequest + +@dynamic remoteId; +@dynamic serviceUuid; +@dynamic secondaryServiceUuid; +@dynamic characteristicUuid; +@dynamic enable; + +typedef struct ProtosSetNotificationRequest__storage_ { + uint32_t _has_storage_[1]; + NSString *remoteId; + NSString *serviceUuid; + NSString *secondaryServiceUuid; + NSString *characteristicUuid; +} ProtosSetNotificationRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosSetNotificationRequest_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "serviceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosSetNotificationRequest_FieldNumber_ServiceUuid, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, serviceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "secondaryServiceUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosSetNotificationRequest_FieldNumber_SecondaryServiceUuid, + .hasIndex = 2, + .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, secondaryServiceUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "characteristicUuid", + .dataTypeSpecific.className = NULL, + .number = ProtosSetNotificationRequest_FieldNumber_CharacteristicUuid, + .hasIndex = 3, + .offset = (uint32_t)offsetof(ProtosSetNotificationRequest__storage_, characteristicUuid), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "enable", + .dataTypeSpecific.className = NULL, + .number = ProtosSetNotificationRequest_FieldNumber_Enable, + .hasIndex = 4, + .offset = 5, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosSetNotificationRequest class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosSetNotificationRequest__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosSetNotificationResponse + +@implementation ProtosSetNotificationResponse + +@dynamic remoteId; +@dynamic hasCharacteristic, characteristic; +@dynamic success; + +typedef struct ProtosSetNotificationResponse__storage_ { + uint32_t _has_storage_[1]; + NSString *remoteId; + ProtosBluetoothCharacteristic *characteristic; +} ProtosSetNotificationResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosSetNotificationResponse_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosSetNotificationResponse__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "characteristic", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic), + .number = ProtosSetNotificationResponse_FieldNumber_Characteristic, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosSetNotificationResponse__storage_, characteristic), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "success", + .dataTypeSpecific.className = NULL, + .number = ProtosSetNotificationResponse_FieldNumber_Success, + .hasIndex = 2, + .offset = 3, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosSetNotificationResponse class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosSetNotificationResponse__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosOnNotificationResponse + +@implementation ProtosOnNotificationResponse + +@dynamic remoteId; +@dynamic hasCharacteristic, characteristic; + +typedef struct ProtosOnNotificationResponse__storage_ { + uint32_t _has_storage_[1]; + NSString *remoteId; + ProtosBluetoothCharacteristic *characteristic; +} ProtosOnNotificationResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosOnNotificationResponse_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosOnNotificationResponse__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "characteristic", + .dataTypeSpecific.className = GPBStringifySymbol(ProtosBluetoothCharacteristic), + .number = ProtosOnNotificationResponse_FieldNumber_Characteristic, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosOnNotificationResponse__storage_, characteristic), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosOnNotificationResponse class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosOnNotificationResponse__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - ProtosDeviceStateResponse + +@implementation ProtosDeviceStateResponse + +@dynamic remoteId; +@dynamic state; + +typedef struct ProtosDeviceStateResponse__storage_ { + uint32_t _has_storage_[1]; + ProtosDeviceStateResponse_BluetoothDeviceState state; + NSString *remoteId; +} ProtosDeviceStateResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "remoteId", + .dataTypeSpecific.className = NULL, + .number = ProtosDeviceStateResponse_FieldNumber_RemoteId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(ProtosDeviceStateResponse__storage_, remoteId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "state", + .dataTypeSpecific.enumDescFunc = ProtosDeviceStateResponse_BluetoothDeviceState_EnumDescriptor, + .number = ProtosDeviceStateResponse_FieldNumber_State, + .hasIndex = 1, + .offset = (uint32_t)offsetof(ProtosDeviceStateResponse__storage_, state), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), + .dataType = GPBDataTypeEnum, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ProtosDeviceStateResponse class] + rootClass:[ProtosFlutterblueRoot class] + file:ProtosFlutterblueRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(ProtosDeviceStateResponse__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t ProtosDeviceStateResponse_State_RawValue(ProtosDeviceStateResponse *message) { + GPBDescriptor *descriptor = [ProtosDeviceStateResponse descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosDeviceStateResponse_FieldNumber_State]; + return GPBGetMessageInt32Field(message, field); +} + +void SetProtosDeviceStateResponse_State_RawValue(ProtosDeviceStateResponse *message, int32_t value) { + GPBDescriptor *descriptor = [ProtosDeviceStateResponse descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:ProtosDeviceStateResponse_FieldNumber_State]; + GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); +} + +#pragma mark - Enum ProtosDeviceStateResponse_BluetoothDeviceState + +GPBEnumDescriptor *ProtosDeviceStateResponse_BluetoothDeviceState_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Disconnected\000Connecting\000Connected\000Discon" + "necting\000"; + static const int32_t values[] = { + ProtosDeviceStateResponse_BluetoothDeviceState_Disconnected, + ProtosDeviceStateResponse_BluetoothDeviceState_Connecting, + ProtosDeviceStateResponse_BluetoothDeviceState_Connected, + ProtosDeviceStateResponse_BluetoothDeviceState_Disconnecting, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(ProtosDeviceStateResponse_BluetoothDeviceState) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:ProtosDeviceStateResponse_BluetoothDeviceState_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL ProtosDeviceStateResponse_BluetoothDeviceState_IsValidValue(int32_t value__) { + switch (value__) { + case ProtosDeviceStateResponse_BluetoothDeviceState_Disconnected: + case ProtosDeviceStateResponse_BluetoothDeviceState_Connecting: + case ProtosDeviceStateResponse_BluetoothDeviceState_Connected: + case ProtosDeviceStateResponse_BluetoothDeviceState_Disconnecting: + return YES; + default: + return NO; + } +} + + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/flutter_ble.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/flutter_ble.dart new file mode 100755 index 0000000..796677e --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/flutter_ble.dart @@ -0,0 +1,22 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +library flutter_ble; + +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:convert/convert.dart'; +import 'package:flutter/services.dart'; +import 'package:meta/meta.dart'; + +import 'gen/flutterblue.pb.dart' as protos; + +part 'src/bluetooth_characteristic.dart'; +part 'src/bluetooth_descriptor.dart'; +part 'src/bluetooth_device.dart'; +part 'src/bluetooth_service.dart'; +part 'src/constants.dart'; +part 'src/flutter_ble.dart'; +part 'src/guid.dart'; diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pb.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pb.dart new file mode 100755 index 0000000..32cd7ac --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pb.dart @@ -0,0 +1,938 @@ +/// +// Generated code. Do not modify. +// source: flutterblue.proto +/// +// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name + +import 'dart:core' as $core show bool, Deprecated, double, int, List, Map, override, String; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'flutterblue.pbenum.dart'; + +export 'flutterblue.pbenum.dart'; + +class Int32Value extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('Int32Value') + ..a<$core.int>(1, 'value', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + Int32Value() : super(); + Int32Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + Int32Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + Int32Value clone() => Int32Value()..mergeFromMessage(this); + Int32Value copyWith(void Function(Int32Value) updates) => super.copyWith((message) => updates(message as Int32Value)); + $pb.BuilderInfo get info_ => _i; + static Int32Value create() => Int32Value(); + Int32Value createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static Int32Value getDefault() => _defaultInstance ??= create()..freeze(); + static Int32Value _defaultInstance; + + $core.int get value => $_get(0, 0); + set value($core.int v) { $_setSignedInt32(0, v); } + $core.bool hasValue() => $_has(0); + void clearValue() => clearField(1); +} + +class BluetoothState extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('BluetoothState') + ..e(1, 'state', $pb.PbFieldType.OE, BluetoothState_State.UNKNOWN, BluetoothState_State.valueOf, BluetoothState_State.values) + ..hasRequiredFields = false + ; + + BluetoothState() : super(); + BluetoothState.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + BluetoothState.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + BluetoothState clone() => BluetoothState()..mergeFromMessage(this); + BluetoothState copyWith(void Function(BluetoothState) updates) => super.copyWith((message) => updates(message as BluetoothState)); + $pb.BuilderInfo get info_ => _i; + static BluetoothState create() => BluetoothState(); + BluetoothState createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static BluetoothState getDefault() => _defaultInstance ??= create()..freeze(); + static BluetoothState _defaultInstance; + + BluetoothState_State get state => $_getN(0); + set state(BluetoothState_State v) { setField(1, v); } + $core.bool hasState() => $_has(0); + void clearState() => clearField(1); +} + +class AdvertisementData extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('AdvertisementData') + ..aOS(1, 'localName') + ..a(2, 'txPowerLevel', $pb.PbFieldType.OM, Int32Value.getDefault, Int32Value.create) + ..aOB(3, 'connectable') + ..m<$core.int, $core.List<$core.int>>(4, 'manufacturerData', 'AdvertisementData.ManufacturerDataEntry',$pb.PbFieldType.O3, $pb.PbFieldType.OY, null, null, null ) + ..m<$core.String, $core.List<$core.int>>(5, 'serviceData', 'AdvertisementData.ServiceDataEntry',$pb.PbFieldType.OS, $pb.PbFieldType.OY, null, null, null ) + ..pPS(6, 'serviceUuids') + ..hasRequiredFields = false + ; + + AdvertisementData() : super(); + AdvertisementData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + AdvertisementData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + AdvertisementData clone() => AdvertisementData()..mergeFromMessage(this); + AdvertisementData copyWith(void Function(AdvertisementData) updates) => super.copyWith((message) => updates(message as AdvertisementData)); + $pb.BuilderInfo get info_ => _i; + static AdvertisementData create() => AdvertisementData(); + AdvertisementData createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static AdvertisementData getDefault() => _defaultInstance ??= create()..freeze(); + static AdvertisementData _defaultInstance; + + $core.String get localName => $_getS(0, ''); + set localName($core.String v) { $_setString(0, v); } + $core.bool hasLocalName() => $_has(0); + void clearLocalName() => clearField(1); + + Int32Value get txPowerLevel => $_getN(1); + set txPowerLevel(Int32Value v) { setField(2, v); } + $core.bool hasTxPowerLevel() => $_has(1); + void clearTxPowerLevel() => clearField(2); + + $core.bool get connectable => $_get(2, false); + set connectable($core.bool v) { $_setBool(2, v); } + $core.bool hasConnectable() => $_has(2); + void clearConnectable() => clearField(3); + + $core.Map<$core.int, $core.List<$core.int>> get manufacturerData => $_getMap(3); + + $core.Map<$core.String, $core.List<$core.int>> get serviceData => $_getMap(4); + + $core.List<$core.String> get serviceUuids => $_getList(5); +} + +class ScanSettings extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('ScanSettings') + ..a<$core.int>(1, 'androidScanMode', $pb.PbFieldType.O3) + ..pPS(2, 'serviceUuids') + ..hasRequiredFields = false + ; + + ScanSettings() : super(); + ScanSettings.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + ScanSettings.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + ScanSettings clone() => ScanSettings()..mergeFromMessage(this); + ScanSettings copyWith(void Function(ScanSettings) updates) => super.copyWith((message) => updates(message as ScanSettings)); + $pb.BuilderInfo get info_ => _i; + static ScanSettings create() => ScanSettings(); + ScanSettings createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static ScanSettings getDefault() => _defaultInstance ??= create()..freeze(); + static ScanSettings _defaultInstance; + + $core.int get androidScanMode => $_get(0, 0); + set androidScanMode($core.int v) { $_setSignedInt32(0, v); } + $core.bool hasAndroidScanMode() => $_has(0); + void clearAndroidScanMode() => clearField(1); + + $core.List<$core.String> get serviceUuids => $_getList(1); +} + +class ScanResult extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('ScanResult') + ..a(1, 'device', $pb.PbFieldType.OM, BluetoothDevice.getDefault, BluetoothDevice.create) + ..a(2, 'advertisementData', $pb.PbFieldType.OM, AdvertisementData.getDefault, AdvertisementData.create) + ..a<$core.int>(3, 'rssi', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + ScanResult() : super(); + ScanResult.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + ScanResult.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + ScanResult clone() => ScanResult()..mergeFromMessage(this); + ScanResult copyWith(void Function(ScanResult) updates) => super.copyWith((message) => updates(message as ScanResult)); + $pb.BuilderInfo get info_ => _i; + static ScanResult create() => ScanResult(); + ScanResult createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static ScanResult getDefault() => _defaultInstance ??= create()..freeze(); + static ScanResult _defaultInstance; + + BluetoothDevice get device => $_getN(0); + set device(BluetoothDevice v) { setField(1, v); } + $core.bool hasDevice() => $_has(0); + void clearDevice() => clearField(1); + + AdvertisementData get advertisementData => $_getN(1); + set advertisementData(AdvertisementData v) { setField(2, v); } + $core.bool hasAdvertisementData() => $_has(1); + void clearAdvertisementData() => clearField(2); + + $core.int get rssi => $_get(2, 0); + set rssi($core.int v) { $_setSignedInt32(2, v); } + $core.bool hasRssi() => $_has(2); + void clearRssi() => clearField(3); +} + +class ConnectRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('ConnectRequest') + ..aOS(1, 'remoteId') + ..aOB(2, 'androidAutoConnect') + ..hasRequiredFields = false + ; + + ConnectRequest() : super(); + ConnectRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + ConnectRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + ConnectRequest clone() => ConnectRequest()..mergeFromMessage(this); + ConnectRequest copyWith(void Function(ConnectRequest) updates) => super.copyWith((message) => updates(message as ConnectRequest)); + $pb.BuilderInfo get info_ => _i; + static ConnectRequest create() => ConnectRequest(); + ConnectRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static ConnectRequest getDefault() => _defaultInstance ??= create()..freeze(); + static ConnectRequest _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + $core.bool get androidAutoConnect => $_get(1, false); + set androidAutoConnect($core.bool v) { $_setBool(1, v); } + $core.bool hasAndroidAutoConnect() => $_has(1); + void clearAndroidAutoConnect() => clearField(2); +} + +class BluetoothDevice extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('BluetoothDevice') + ..aOS(1, 'remoteId') + ..aOS(2, 'name') + ..e(3, 'type', $pb.PbFieldType.OE, BluetoothDevice_Type.UNKNOWN, BluetoothDevice_Type.valueOf, BluetoothDevice_Type.values) + ..hasRequiredFields = false + ; + + BluetoothDevice() : super(); + BluetoothDevice.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + BluetoothDevice.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + BluetoothDevice clone() => BluetoothDevice()..mergeFromMessage(this); + BluetoothDevice copyWith(void Function(BluetoothDevice) updates) => super.copyWith((message) => updates(message as BluetoothDevice)); + $pb.BuilderInfo get info_ => _i; + static BluetoothDevice create() => BluetoothDevice(); + BluetoothDevice createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static BluetoothDevice getDefault() => _defaultInstance ??= create()..freeze(); + static BluetoothDevice _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + $core.String get name => $_getS(1, ''); + set name($core.String v) { $_setString(1, v); } + $core.bool hasName() => $_has(1); + void clearName() => clearField(2); + + BluetoothDevice_Type get type => $_getN(2); + set type(BluetoothDevice_Type v) { setField(3, v); } + $core.bool hasType() => $_has(2); + void clearType() => clearField(3); +} + +class BluetoothService extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('BluetoothService') + ..aOS(1, 'uuid') + ..aOS(2, 'remoteId') + ..aOB(3, 'isPrimary') + ..pc(4, 'characteristics', $pb.PbFieldType.PM,BluetoothCharacteristic.create) + ..pc(5, 'includedServices', $pb.PbFieldType.PM,BluetoothService.create) + ..hasRequiredFields = false + ; + + BluetoothService() : super(); + BluetoothService.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + BluetoothService.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + BluetoothService clone() => BluetoothService()..mergeFromMessage(this); + BluetoothService copyWith(void Function(BluetoothService) updates) => super.copyWith((message) => updates(message as BluetoothService)); + $pb.BuilderInfo get info_ => _i; + static BluetoothService create() => BluetoothService(); + BluetoothService createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static BluetoothService getDefault() => _defaultInstance ??= create()..freeze(); + static BluetoothService _defaultInstance; + + $core.String get uuid => $_getS(0, ''); + set uuid($core.String v) { $_setString(0, v); } + $core.bool hasUuid() => $_has(0); + void clearUuid() => clearField(1); + + $core.String get remoteId => $_getS(1, ''); + set remoteId($core.String v) { $_setString(1, v); } + $core.bool hasRemoteId() => $_has(1); + void clearRemoteId() => clearField(2); + + $core.bool get isPrimary => $_get(2, false); + set isPrimary($core.bool v) { $_setBool(2, v); } + $core.bool hasIsPrimary() => $_has(2); + void clearIsPrimary() => clearField(3); + + $core.List get characteristics => $_getList(3); + + $core.List get includedServices => $_getList(4); +} + +class BluetoothCharacteristic extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('BluetoothCharacteristic') + ..aOS(1, 'uuid') + ..aOS(2, 'serviceUuid') + ..aOS(3, 'secondaryServiceUuid') + ..pc(4, 'descriptors', $pb.PbFieldType.PM,BluetoothDescriptor.create) + ..a(5, 'properties', $pb.PbFieldType.OM, CharacteristicProperties.getDefault, CharacteristicProperties.create) + ..a<$core.List<$core.int>>(6, 'value', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + BluetoothCharacteristic() : super(); + BluetoothCharacteristic.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + BluetoothCharacteristic.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + BluetoothCharacteristic clone() => BluetoothCharacteristic()..mergeFromMessage(this); + BluetoothCharacteristic copyWith(void Function(BluetoothCharacteristic) updates) => super.copyWith((message) => updates(message as BluetoothCharacteristic)); + $pb.BuilderInfo get info_ => _i; + static BluetoothCharacteristic create() => BluetoothCharacteristic(); + BluetoothCharacteristic createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static BluetoothCharacteristic getDefault() => _defaultInstance ??= create()..freeze(); + static BluetoothCharacteristic _defaultInstance; + + $core.String get uuid => $_getS(0, ''); + set uuid($core.String v) { $_setString(0, v); } + $core.bool hasUuid() => $_has(0); + void clearUuid() => clearField(1); + + $core.String get serviceUuid => $_getS(1, ''); + set serviceUuid($core.String v) { $_setString(1, v); } + $core.bool hasServiceUuid() => $_has(1); + void clearServiceUuid() => clearField(2); + + $core.String get secondaryServiceUuid => $_getS(2, ''); + set secondaryServiceUuid($core.String v) { $_setString(2, v); } + $core.bool hasSecondaryServiceUuid() => $_has(2); + void clearSecondaryServiceUuid() => clearField(3); + + $core.List get descriptors => $_getList(3); + + CharacteristicProperties get properties => $_getN(4); + set properties(CharacteristicProperties v) { setField(5, v); } + $core.bool hasProperties() => $_has(4); + void clearProperties() => clearField(5); + + $core.List<$core.int> get value => $_getN(5); + set value($core.List<$core.int> v) { $_setBytes(5, v); } + $core.bool hasValue() => $_has(5); + void clearValue() => clearField(6); +} + +class BluetoothDescriptor extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('BluetoothDescriptor') + ..aOS(1, 'uuid') + ..aOS(2, 'serviceUuid') + ..aOS(3, 'characteristicUuid') + ..a<$core.List<$core.int>>(4, 'value', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + BluetoothDescriptor() : super(); + BluetoothDescriptor.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + BluetoothDescriptor.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + BluetoothDescriptor clone() => BluetoothDescriptor()..mergeFromMessage(this); + BluetoothDescriptor copyWith(void Function(BluetoothDescriptor) updates) => super.copyWith((message) => updates(message as BluetoothDescriptor)); + $pb.BuilderInfo get info_ => _i; + static BluetoothDescriptor create() => BluetoothDescriptor(); + BluetoothDescriptor createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static BluetoothDescriptor getDefault() => _defaultInstance ??= create()..freeze(); + static BluetoothDescriptor _defaultInstance; + + $core.String get uuid => $_getS(0, ''); + set uuid($core.String v) { $_setString(0, v); } + $core.bool hasUuid() => $_has(0); + void clearUuid() => clearField(1); + + $core.String get serviceUuid => $_getS(1, ''); + set serviceUuid($core.String v) { $_setString(1, v); } + $core.bool hasServiceUuid() => $_has(1); + void clearServiceUuid() => clearField(2); + + $core.String get characteristicUuid => $_getS(2, ''); + set characteristicUuid($core.String v) { $_setString(2, v); } + $core.bool hasCharacteristicUuid() => $_has(2); + void clearCharacteristicUuid() => clearField(3); + + $core.List<$core.int> get value => $_getN(3); + set value($core.List<$core.int> v) { $_setBytes(3, v); } + $core.bool hasValue() => $_has(3); + void clearValue() => clearField(4); +} + +class CharacteristicProperties extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('CharacteristicProperties') + ..aOB(1, 'broadcast') + ..aOB(2, 'read') + ..aOB(3, 'writeWithoutResponse') + ..aOB(4, 'write') + ..aOB(5, 'notify') + ..aOB(6, 'indicate') + ..aOB(7, 'authenticatedSignedWrites') + ..aOB(8, 'extendedProperties') + ..aOB(9, 'notifyEncryptionRequired') + ..aOB(10, 'indicateEncryptionRequired') + ..hasRequiredFields = false + ; + + CharacteristicProperties() : super(); + CharacteristicProperties.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + CharacteristicProperties.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + CharacteristicProperties clone() => CharacteristicProperties()..mergeFromMessage(this); + CharacteristicProperties copyWith(void Function(CharacteristicProperties) updates) => super.copyWith((message) => updates(message as CharacteristicProperties)); + $pb.BuilderInfo get info_ => _i; + static CharacteristicProperties create() => CharacteristicProperties(); + CharacteristicProperties createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static CharacteristicProperties getDefault() => _defaultInstance ??= create()..freeze(); + static CharacteristicProperties _defaultInstance; + + $core.bool get broadcast => $_get(0, false); + set broadcast($core.bool v) { $_setBool(0, v); } + $core.bool hasBroadcast() => $_has(0); + void clearBroadcast() => clearField(1); + + $core.bool get read => $_get(1, false); + set read($core.bool v) { $_setBool(1, v); } + $core.bool hasRead() => $_has(1); + void clearRead() => clearField(2); + + $core.bool get writeWithoutResponse => $_get(2, false); + set writeWithoutResponse($core.bool v) { $_setBool(2, v); } + $core.bool hasWriteWithoutResponse() => $_has(2); + void clearWriteWithoutResponse() => clearField(3); + + $core.bool get write => $_get(3, false); + set write($core.bool v) { $_setBool(3, v); } + $core.bool hasWrite() => $_has(3); + void clearWrite() => clearField(4); + + $core.bool get notify => $_get(4, false); + set notify($core.bool v) { $_setBool(4, v); } + $core.bool hasNotify() => $_has(4); + void clearNotify() => clearField(5); + + $core.bool get indicate => $_get(5, false); + set indicate($core.bool v) { $_setBool(5, v); } + $core.bool hasIndicate() => $_has(5); + void clearIndicate() => clearField(6); + + $core.bool get authenticatedSignedWrites => $_get(6, false); + set authenticatedSignedWrites($core.bool v) { $_setBool(6, v); } + $core.bool hasAuthenticatedSignedWrites() => $_has(6); + void clearAuthenticatedSignedWrites() => clearField(7); + + $core.bool get extendedProperties => $_get(7, false); + set extendedProperties($core.bool v) { $_setBool(7, v); } + $core.bool hasExtendedProperties() => $_has(7); + void clearExtendedProperties() => clearField(8); + + $core.bool get notifyEncryptionRequired => $_get(8, false); + set notifyEncryptionRequired($core.bool v) { $_setBool(8, v); } + $core.bool hasNotifyEncryptionRequired() => $_has(8); + void clearNotifyEncryptionRequired() => clearField(9); + + $core.bool get indicateEncryptionRequired => $_get(9, false); + set indicateEncryptionRequired($core.bool v) { $_setBool(9, v); } + $core.bool hasIndicateEncryptionRequired() => $_has(9); + void clearIndicateEncryptionRequired() => clearField(10); +} + +class DiscoverServicesResult extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('DiscoverServicesResult') + ..aOS(1, 'remoteId') + ..pc(2, 'services', $pb.PbFieldType.PM,BluetoothService.create) + ..hasRequiredFields = false + ; + + DiscoverServicesResult() : super(); + DiscoverServicesResult.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + DiscoverServicesResult.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + DiscoverServicesResult clone() => DiscoverServicesResult()..mergeFromMessage(this); + DiscoverServicesResult copyWith(void Function(DiscoverServicesResult) updates) => super.copyWith((message) => updates(message as DiscoverServicesResult)); + $pb.BuilderInfo get info_ => _i; + static DiscoverServicesResult create() => DiscoverServicesResult(); + DiscoverServicesResult createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static DiscoverServicesResult getDefault() => _defaultInstance ??= create()..freeze(); + static DiscoverServicesResult _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + $core.List get services => $_getList(1); +} + +class ReadCharacteristicRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('ReadCharacteristicRequest') + ..aOS(1, 'remoteId') + ..aOS(2, 'characteristicUuid') + ..aOS(3, 'serviceUuid') + ..aOS(4, 'secondaryServiceUuid') + ..hasRequiredFields = false + ; + + ReadCharacteristicRequest() : super(); + ReadCharacteristicRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + ReadCharacteristicRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + ReadCharacteristicRequest clone() => ReadCharacteristicRequest()..mergeFromMessage(this); + ReadCharacteristicRequest copyWith(void Function(ReadCharacteristicRequest) updates) => super.copyWith((message) => updates(message as ReadCharacteristicRequest)); + $pb.BuilderInfo get info_ => _i; + static ReadCharacteristicRequest create() => ReadCharacteristicRequest(); + ReadCharacteristicRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static ReadCharacteristicRequest getDefault() => _defaultInstance ??= create()..freeze(); + static ReadCharacteristicRequest _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + $core.String get characteristicUuid => $_getS(1, ''); + set characteristicUuid($core.String v) { $_setString(1, v); } + $core.bool hasCharacteristicUuid() => $_has(1); + void clearCharacteristicUuid() => clearField(2); + + $core.String get serviceUuid => $_getS(2, ''); + set serviceUuid($core.String v) { $_setString(2, v); } + $core.bool hasServiceUuid() => $_has(2); + void clearServiceUuid() => clearField(3); + + $core.String get secondaryServiceUuid => $_getS(3, ''); + set secondaryServiceUuid($core.String v) { $_setString(3, v); } + $core.bool hasSecondaryServiceUuid() => $_has(3); + void clearSecondaryServiceUuid() => clearField(4); +} + +class ReadCharacteristicResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('ReadCharacteristicResponse') + ..aOS(1, 'remoteId') + ..a(2, 'characteristic', $pb.PbFieldType.OM, BluetoothCharacteristic.getDefault, BluetoothCharacteristic.create) + ..hasRequiredFields = false + ; + + ReadCharacteristicResponse() : super(); + ReadCharacteristicResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + ReadCharacteristicResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + ReadCharacteristicResponse clone() => ReadCharacteristicResponse()..mergeFromMessage(this); + ReadCharacteristicResponse copyWith(void Function(ReadCharacteristicResponse) updates) => super.copyWith((message) => updates(message as ReadCharacteristicResponse)); + $pb.BuilderInfo get info_ => _i; + static ReadCharacteristicResponse create() => ReadCharacteristicResponse(); + ReadCharacteristicResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static ReadCharacteristicResponse getDefault() => _defaultInstance ??= create()..freeze(); + static ReadCharacteristicResponse _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + BluetoothCharacteristic get characteristic => $_getN(1); + set characteristic(BluetoothCharacteristic v) { setField(2, v); } + $core.bool hasCharacteristic() => $_has(1); + void clearCharacteristic() => clearField(2); +} + +class ReadDescriptorRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('ReadDescriptorRequest') + ..aOS(1, 'remoteId') + ..aOS(2, 'descriptorUuid') + ..aOS(3, 'serviceUuid') + ..aOS(4, 'secondaryServiceUuid') + ..aOS(5, 'characteristicUuid') + ..hasRequiredFields = false + ; + + ReadDescriptorRequest() : super(); + ReadDescriptorRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + ReadDescriptorRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + ReadDescriptorRequest clone() => ReadDescriptorRequest()..mergeFromMessage(this); + ReadDescriptorRequest copyWith(void Function(ReadDescriptorRequest) updates) => super.copyWith((message) => updates(message as ReadDescriptorRequest)); + $pb.BuilderInfo get info_ => _i; + static ReadDescriptorRequest create() => ReadDescriptorRequest(); + ReadDescriptorRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static ReadDescriptorRequest getDefault() => _defaultInstance ??= create()..freeze(); + static ReadDescriptorRequest _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + $core.String get descriptorUuid => $_getS(1, ''); + set descriptorUuid($core.String v) { $_setString(1, v); } + $core.bool hasDescriptorUuid() => $_has(1); + void clearDescriptorUuid() => clearField(2); + + $core.String get serviceUuid => $_getS(2, ''); + set serviceUuid($core.String v) { $_setString(2, v); } + $core.bool hasServiceUuid() => $_has(2); + void clearServiceUuid() => clearField(3); + + $core.String get secondaryServiceUuid => $_getS(3, ''); + set secondaryServiceUuid($core.String v) { $_setString(3, v); } + $core.bool hasSecondaryServiceUuid() => $_has(3); + void clearSecondaryServiceUuid() => clearField(4); + + $core.String get characteristicUuid => $_getS(4, ''); + set characteristicUuid($core.String v) { $_setString(4, v); } + $core.bool hasCharacteristicUuid() => $_has(4); + void clearCharacteristicUuid() => clearField(5); +} + +class ReadDescriptorResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('ReadDescriptorResponse') + ..a(1, 'request', $pb.PbFieldType.OM, ReadDescriptorRequest.getDefault, ReadDescriptorRequest.create) + ..a<$core.List<$core.int>>(2, 'value', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + ReadDescriptorResponse() : super(); + ReadDescriptorResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + ReadDescriptorResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + ReadDescriptorResponse clone() => ReadDescriptorResponse()..mergeFromMessage(this); + ReadDescriptorResponse copyWith(void Function(ReadDescriptorResponse) updates) => super.copyWith((message) => updates(message as ReadDescriptorResponse)); + $pb.BuilderInfo get info_ => _i; + static ReadDescriptorResponse create() => ReadDescriptorResponse(); + ReadDescriptorResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static ReadDescriptorResponse getDefault() => _defaultInstance ??= create()..freeze(); + static ReadDescriptorResponse _defaultInstance; + + ReadDescriptorRequest get request => $_getN(0); + set request(ReadDescriptorRequest v) { setField(1, v); } + $core.bool hasRequest() => $_has(0); + void clearRequest() => clearField(1); + + $core.List<$core.int> get value => $_getN(1); + set value($core.List<$core.int> v) { $_setBytes(1, v); } + $core.bool hasValue() => $_has(1); + void clearValue() => clearField(2); +} + +class WriteCharacteristicRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('WriteCharacteristicRequest') + ..aOS(1, 'remoteId') + ..aOS(2, 'characteristicUuid') + ..aOS(3, 'serviceUuid') + ..aOS(4, 'secondaryServiceUuid') + ..e(5, 'writeType', $pb.PbFieldType.OE, WriteCharacteristicRequest_WriteType.WITH_RESPONSE, WriteCharacteristicRequest_WriteType.valueOf, WriteCharacteristicRequest_WriteType.values) + ..a<$core.List<$core.int>>(6, 'value', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + WriteCharacteristicRequest() : super(); + WriteCharacteristicRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + WriteCharacteristicRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + WriteCharacteristicRequest clone() => WriteCharacteristicRequest()..mergeFromMessage(this); + WriteCharacteristicRequest copyWith(void Function(WriteCharacteristicRequest) updates) => super.copyWith((message) => updates(message as WriteCharacteristicRequest)); + $pb.BuilderInfo get info_ => _i; + static WriteCharacteristicRequest create() => WriteCharacteristicRequest(); + WriteCharacteristicRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static WriteCharacteristicRequest getDefault() => _defaultInstance ??= create()..freeze(); + static WriteCharacteristicRequest _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + $core.String get characteristicUuid => $_getS(1, ''); + set characteristicUuid($core.String v) { $_setString(1, v); } + $core.bool hasCharacteristicUuid() => $_has(1); + void clearCharacteristicUuid() => clearField(2); + + $core.String get serviceUuid => $_getS(2, ''); + set serviceUuid($core.String v) { $_setString(2, v); } + $core.bool hasServiceUuid() => $_has(2); + void clearServiceUuid() => clearField(3); + + $core.String get secondaryServiceUuid => $_getS(3, ''); + set secondaryServiceUuid($core.String v) { $_setString(3, v); } + $core.bool hasSecondaryServiceUuid() => $_has(3); + void clearSecondaryServiceUuid() => clearField(4); + + WriteCharacteristicRequest_WriteType get writeType => $_getN(4); + set writeType(WriteCharacteristicRequest_WriteType v) { setField(5, v); } + $core.bool hasWriteType() => $_has(4); + void clearWriteType() => clearField(5); + + $core.List<$core.int> get value => $_getN(5); + set value($core.List<$core.int> v) { $_setBytes(5, v); } + $core.bool hasValue() => $_has(5); + void clearValue() => clearField(6); +} + +class WriteCharacteristicResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('WriteCharacteristicResponse') + ..a(1, 'request', $pb.PbFieldType.OM, WriteCharacteristicRequest.getDefault, WriteCharacteristicRequest.create) + ..aOB(2, 'success') + ..hasRequiredFields = false + ; + + WriteCharacteristicResponse() : super(); + WriteCharacteristicResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + WriteCharacteristicResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + WriteCharacteristicResponse clone() => WriteCharacteristicResponse()..mergeFromMessage(this); + WriteCharacteristicResponse copyWith(void Function(WriteCharacteristicResponse) updates) => super.copyWith((message) => updates(message as WriteCharacteristicResponse)); + $pb.BuilderInfo get info_ => _i; + static WriteCharacteristicResponse create() => WriteCharacteristicResponse(); + WriteCharacteristicResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static WriteCharacteristicResponse getDefault() => _defaultInstance ??= create()..freeze(); + static WriteCharacteristicResponse _defaultInstance; + + WriteCharacteristicRequest get request => $_getN(0); + set request(WriteCharacteristicRequest v) { setField(1, v); } + $core.bool hasRequest() => $_has(0); + void clearRequest() => clearField(1); + + $core.bool get success => $_get(1, false); + set success($core.bool v) { $_setBool(1, v); } + $core.bool hasSuccess() => $_has(1); + void clearSuccess() => clearField(2); +} + +class WriteDescriptorRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('WriteDescriptorRequest') + ..aOS(1, 'remoteId') + ..aOS(2, 'descriptorUuid') + ..aOS(3, 'serviceUuid') + ..aOS(4, 'secondaryServiceUuid') + ..aOS(5, 'characteristicUuid') + ..a<$core.List<$core.int>>(6, 'value', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + WriteDescriptorRequest() : super(); + WriteDescriptorRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + WriteDescriptorRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + WriteDescriptorRequest clone() => WriteDescriptorRequest()..mergeFromMessage(this); + WriteDescriptorRequest copyWith(void Function(WriteDescriptorRequest) updates) => super.copyWith((message) => updates(message as WriteDescriptorRequest)); + $pb.BuilderInfo get info_ => _i; + static WriteDescriptorRequest create() => WriteDescriptorRequest(); + WriteDescriptorRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static WriteDescriptorRequest getDefault() => _defaultInstance ??= create()..freeze(); + static WriteDescriptorRequest _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + $core.String get descriptorUuid => $_getS(1, ''); + set descriptorUuid($core.String v) { $_setString(1, v); } + $core.bool hasDescriptorUuid() => $_has(1); + void clearDescriptorUuid() => clearField(2); + + $core.String get serviceUuid => $_getS(2, ''); + set serviceUuid($core.String v) { $_setString(2, v); } + $core.bool hasServiceUuid() => $_has(2); + void clearServiceUuid() => clearField(3); + + $core.String get secondaryServiceUuid => $_getS(3, ''); + set secondaryServiceUuid($core.String v) { $_setString(3, v); } + $core.bool hasSecondaryServiceUuid() => $_has(3); + void clearSecondaryServiceUuid() => clearField(4); + + $core.String get characteristicUuid => $_getS(4, ''); + set characteristicUuid($core.String v) { $_setString(4, v); } + $core.bool hasCharacteristicUuid() => $_has(4); + void clearCharacteristicUuid() => clearField(5); + + $core.List<$core.int> get value => $_getN(5); + set value($core.List<$core.int> v) { $_setBytes(5, v); } + $core.bool hasValue() => $_has(5); + void clearValue() => clearField(6); +} + +class WriteDescriptorResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('WriteDescriptorResponse') + ..a(1, 'request', $pb.PbFieldType.OM, WriteDescriptorRequest.getDefault, WriteDescriptorRequest.create) + ..aOB(2, 'success') + ..hasRequiredFields = false + ; + + WriteDescriptorResponse() : super(); + WriteDescriptorResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + WriteDescriptorResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + WriteDescriptorResponse clone() => WriteDescriptorResponse()..mergeFromMessage(this); + WriteDescriptorResponse copyWith(void Function(WriteDescriptorResponse) updates) => super.copyWith((message) => updates(message as WriteDescriptorResponse)); + $pb.BuilderInfo get info_ => _i; + static WriteDescriptorResponse create() => WriteDescriptorResponse(); + WriteDescriptorResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static WriteDescriptorResponse getDefault() => _defaultInstance ??= create()..freeze(); + static WriteDescriptorResponse _defaultInstance; + + WriteDescriptorRequest get request => $_getN(0); + set request(WriteDescriptorRequest v) { setField(1, v); } + $core.bool hasRequest() => $_has(0); + void clearRequest() => clearField(1); + + $core.bool get success => $_get(1, false); + set success($core.bool v) { $_setBool(1, v); } + $core.bool hasSuccess() => $_has(1); + void clearSuccess() => clearField(2); +} + +class SetNotificationRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('SetNotificationRequest') + ..aOS(1, 'remoteId') + ..aOS(2, 'serviceUuid') + ..aOS(3, 'secondaryServiceUuid') + ..aOS(4, 'characteristicUuid') + ..aOB(5, 'enable') + ..hasRequiredFields = false + ; + + SetNotificationRequest() : super(); + SetNotificationRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + SetNotificationRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + SetNotificationRequest clone() => SetNotificationRequest()..mergeFromMessage(this); + SetNotificationRequest copyWith(void Function(SetNotificationRequest) updates) => super.copyWith((message) => updates(message as SetNotificationRequest)); + $pb.BuilderInfo get info_ => _i; + static SetNotificationRequest create() => SetNotificationRequest(); + SetNotificationRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static SetNotificationRequest getDefault() => _defaultInstance ??= create()..freeze(); + static SetNotificationRequest _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + $core.String get serviceUuid => $_getS(1, ''); + set serviceUuid($core.String v) { $_setString(1, v); } + $core.bool hasServiceUuid() => $_has(1); + void clearServiceUuid() => clearField(2); + + $core.String get secondaryServiceUuid => $_getS(2, ''); + set secondaryServiceUuid($core.String v) { $_setString(2, v); } + $core.bool hasSecondaryServiceUuid() => $_has(2); + void clearSecondaryServiceUuid() => clearField(3); + + $core.String get characteristicUuid => $_getS(3, ''); + set characteristicUuid($core.String v) { $_setString(3, v); } + $core.bool hasCharacteristicUuid() => $_has(3); + void clearCharacteristicUuid() => clearField(4); + + $core.bool get enable => $_get(4, false); + set enable($core.bool v) { $_setBool(4, v); } + $core.bool hasEnable() => $_has(4); + void clearEnable() => clearField(5); +} + +class SetNotificationResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('SetNotificationResponse') + ..aOS(1, 'remoteId') + ..a(2, 'characteristic', $pb.PbFieldType.OM, BluetoothCharacteristic.getDefault, BluetoothCharacteristic.create) + ..aOB(3, 'success') + ..hasRequiredFields = false + ; + + SetNotificationResponse() : super(); + SetNotificationResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + SetNotificationResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + SetNotificationResponse clone() => SetNotificationResponse()..mergeFromMessage(this); + SetNotificationResponse copyWith(void Function(SetNotificationResponse) updates) => super.copyWith((message) => updates(message as SetNotificationResponse)); + $pb.BuilderInfo get info_ => _i; + static SetNotificationResponse create() => SetNotificationResponse(); + SetNotificationResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static SetNotificationResponse getDefault() => _defaultInstance ??= create()..freeze(); + static SetNotificationResponse _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + BluetoothCharacteristic get characteristic => $_getN(1); + set characteristic(BluetoothCharacteristic v) { setField(2, v); } + $core.bool hasCharacteristic() => $_has(1); + void clearCharacteristic() => clearField(2); + + $core.bool get success => $_get(2, false); + set success($core.bool v) { $_setBool(2, v); } + $core.bool hasSuccess() => $_has(2); + void clearSuccess() => clearField(3); +} + +class OnNotificationResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('OnNotificationResponse') + ..aOS(1, 'remoteId') + ..a(2, 'characteristic', $pb.PbFieldType.OM, BluetoothCharacteristic.getDefault, BluetoothCharacteristic.create) + ..hasRequiredFields = false + ; + + OnNotificationResponse() : super(); + OnNotificationResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + OnNotificationResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + OnNotificationResponse clone() => OnNotificationResponse()..mergeFromMessage(this); + OnNotificationResponse copyWith(void Function(OnNotificationResponse) updates) => super.copyWith((message) => updates(message as OnNotificationResponse)); + $pb.BuilderInfo get info_ => _i; + static OnNotificationResponse create() => OnNotificationResponse(); + OnNotificationResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static OnNotificationResponse getDefault() => _defaultInstance ??= create()..freeze(); + static OnNotificationResponse _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + BluetoothCharacteristic get characteristic => $_getN(1); + set characteristic(BluetoothCharacteristic v) { setField(2, v); } + $core.bool hasCharacteristic() => $_has(1); + void clearCharacteristic() => clearField(2); +} + +class DeviceStateResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('DeviceStateResponse') + ..aOS(1, 'remoteId') + ..e(2, 'state', $pb.PbFieldType.OE, DeviceStateResponse_BluetoothDeviceState.DISCONNECTED, DeviceStateResponse_BluetoothDeviceState.valueOf, DeviceStateResponse_BluetoothDeviceState.values) + ..hasRequiredFields = false + ; + + DeviceStateResponse() : super(); + DeviceStateResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + DeviceStateResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + DeviceStateResponse clone() => DeviceStateResponse()..mergeFromMessage(this); + DeviceStateResponse copyWith(void Function(DeviceStateResponse) updates) => super.copyWith((message) => updates(message as DeviceStateResponse)); + $pb.BuilderInfo get info_ => _i; + static DeviceStateResponse create() => DeviceStateResponse(); + DeviceStateResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static DeviceStateResponse getDefault() => _defaultInstance ??= create()..freeze(); + static DeviceStateResponse _defaultInstance; + + $core.String get remoteId => $_getS(0, ''); + set remoteId($core.String v) { $_setString(0, v); } + $core.bool hasRemoteId() => $_has(0); + void clearRemoteId() => clearField(1); + + DeviceStateResponse_BluetoothDeviceState get state => $_getN(1); + set state(DeviceStateResponse_BluetoothDeviceState v) { setField(2, v); } + $core.bool hasState() => $_has(1); + void clearState() => clearField(2); +} + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbenum.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbenum.dart new file mode 100755 index 0000000..64b4fa5 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbenum.dart @@ -0,0 +1,88 @@ +/// +// Generated code. Do not modify. +// source: flutterblue.proto +/// +// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name + +// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME +import 'dart:core' as $core show int, dynamic, String, List, Map; +import 'package:protobuf/protobuf.dart' as $pb; + +class BluetoothState_State extends $pb.ProtobufEnum { + static const BluetoothState_State UNKNOWN = BluetoothState_State._(0, 'UNKNOWN'); + static const BluetoothState_State UNAVAILABLE = BluetoothState_State._(1, 'UNAVAILABLE'); + static const BluetoothState_State UNAUTHORIZED = BluetoothState_State._(2, 'UNAUTHORIZED'); + static const BluetoothState_State TURNING_ON = BluetoothState_State._(3, 'TURNING_ON'); + static const BluetoothState_State ON = BluetoothState_State._(4, 'ON'); + static const BluetoothState_State TURNING_OFF = BluetoothState_State._(5, 'TURNING_OFF'); + static const BluetoothState_State OFF = BluetoothState_State._(6, 'OFF'); + + static const $core.List values = [ + UNKNOWN, + UNAVAILABLE, + UNAUTHORIZED, + TURNING_ON, + ON, + TURNING_OFF, + OFF, + ]; + + static final $core.Map<$core.int, BluetoothState_State> _byValue = $pb.ProtobufEnum.initByValue(values); + static BluetoothState_State valueOf($core.int value) => _byValue[value]; + + const BluetoothState_State._($core.int v, $core.String n) : super(v, n); +} + +class BluetoothDevice_Type extends $pb.ProtobufEnum { + static const BluetoothDevice_Type UNKNOWN = BluetoothDevice_Type._(0, 'UNKNOWN'); + static const BluetoothDevice_Type CLASSIC = BluetoothDevice_Type._(1, 'CLASSIC'); + static const BluetoothDevice_Type LE = BluetoothDevice_Type._(2, 'LE'); + static const BluetoothDevice_Type DUAL = BluetoothDevice_Type._(3, 'DUAL'); + + static const $core.List values = [ + UNKNOWN, + CLASSIC, + LE, + DUAL, + ]; + + static final $core.Map<$core.int, BluetoothDevice_Type> _byValue = $pb.ProtobufEnum.initByValue(values); + static BluetoothDevice_Type valueOf($core.int value) => _byValue[value]; + + const BluetoothDevice_Type._($core.int v, $core.String n) : super(v, n); +} + +class WriteCharacteristicRequest_WriteType extends $pb.ProtobufEnum { + static const WriteCharacteristicRequest_WriteType WITH_RESPONSE = WriteCharacteristicRequest_WriteType._(0, 'WITH_RESPONSE'); + static const WriteCharacteristicRequest_WriteType WITHOUT_RESPONSE = WriteCharacteristicRequest_WriteType._(1, 'WITHOUT_RESPONSE'); + + static const $core.List values = [ + WITH_RESPONSE, + WITHOUT_RESPONSE, + ]; + + static final $core.Map<$core.int, WriteCharacteristicRequest_WriteType> _byValue = $pb.ProtobufEnum.initByValue(values); + static WriteCharacteristicRequest_WriteType valueOf($core.int value) => _byValue[value]; + + const WriteCharacteristicRequest_WriteType._($core.int v, $core.String n) : super(v, n); +} + +class DeviceStateResponse_BluetoothDeviceState extends $pb.ProtobufEnum { + static const DeviceStateResponse_BluetoothDeviceState DISCONNECTED = DeviceStateResponse_BluetoothDeviceState._(0, 'DISCONNECTED'); + static const DeviceStateResponse_BluetoothDeviceState CONNECTING = DeviceStateResponse_BluetoothDeviceState._(1, 'CONNECTING'); + static const DeviceStateResponse_BluetoothDeviceState CONNECTED = DeviceStateResponse_BluetoothDeviceState._(2, 'CONNECTED'); + static const DeviceStateResponse_BluetoothDeviceState DISCONNECTING = DeviceStateResponse_BluetoothDeviceState._(3, 'DISCONNECTING'); + + static const $core.List values = [ + DISCONNECTED, + CONNECTING, + CONNECTED, + DISCONNECTING, + ]; + + static final $core.Map<$core.int, DeviceStateResponse_BluetoothDeviceState> _byValue = $pb.ProtobufEnum.initByValue(values); + static DeviceStateResponse_BluetoothDeviceState valueOf($core.int value) => _byValue[value]; + + const DeviceStateResponse_BluetoothDeviceState._($core.int v, $core.String n) : super(v, n); +} + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbjson.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbjson.dart new file mode 100755 index 0000000..39bc17c --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbjson.dart @@ -0,0 +1,300 @@ +/// +// Generated code. Do not modify. +// source: flutterblue.proto +/// +// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name + +const Int32Value$json = const { + '1': 'Int32Value', + '2': const [ + const {'1': 'value', '3': 1, '4': 1, '5': 5, '10': 'value'}, + ], +}; + +const BluetoothState$json = const { + '1': 'BluetoothState', + '2': const [ + const {'1': 'state', '3': 1, '4': 1, '5': 14, '6': '.BluetoothState.State', '10': 'state'}, + ], + '4': const [BluetoothState_State$json], +}; + +const BluetoothState_State$json = const { + '1': 'State', + '2': const [ + const {'1': 'UNKNOWN', '2': 0}, + const {'1': 'UNAVAILABLE', '2': 1}, + const {'1': 'UNAUTHORIZED', '2': 2}, + const {'1': 'TURNING_ON', '2': 3}, + const {'1': 'ON', '2': 4}, + const {'1': 'TURNING_OFF', '2': 5}, + const {'1': 'OFF', '2': 6}, + ], +}; + +const AdvertisementData$json = const { + '1': 'AdvertisementData', + '2': const [ + const {'1': 'local_name', '3': 1, '4': 1, '5': 9, '10': 'localName'}, + const {'1': 'tx_power_level', '3': 2, '4': 1, '5': 11, '6': '.Int32Value', '10': 'txPowerLevel'}, + const {'1': 'connectable', '3': 3, '4': 1, '5': 8, '10': 'connectable'}, + const {'1': 'manufacturer_data', '3': 4, '4': 3, '5': 11, '6': '.AdvertisementData.ManufacturerDataEntry', '10': 'manufacturerData'}, + const {'1': 'service_data', '3': 5, '4': 3, '5': 11, '6': '.AdvertisementData.ServiceDataEntry', '10': 'serviceData'}, + const {'1': 'service_uuids', '3': 6, '4': 3, '5': 9, '10': 'serviceUuids'}, + ], + '3': const [AdvertisementData_ManufacturerDataEntry$json, AdvertisementData_ServiceDataEntry$json], +}; + +const AdvertisementData_ManufacturerDataEntry$json = const { + '1': 'ManufacturerDataEntry', + '2': const [ + const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, + const {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, + ], + '7': const {'7': true}, +}; + +const AdvertisementData_ServiceDataEntry$json = const { + '1': 'ServiceDataEntry', + '2': const [ + const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + const {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, + ], + '7': const {'7': true}, +}; + +const ScanSettings$json = const { + '1': 'ScanSettings', + '2': const [ + const {'1': 'android_scan_mode', '3': 1, '4': 1, '5': 5, '10': 'androidScanMode'}, + const {'1': 'service_uuids', '3': 2, '4': 3, '5': 9, '10': 'serviceUuids'}, + ], +}; + +const ScanResult$json = const { + '1': 'ScanResult', + '2': const [ + const {'1': 'device', '3': 1, '4': 1, '5': 11, '6': '.BluetoothDevice', '10': 'device'}, + const {'1': 'advertisement_data', '3': 2, '4': 1, '5': 11, '6': '.AdvertisementData', '10': 'advertisementData'}, + const {'1': 'rssi', '3': 3, '4': 1, '5': 5, '10': 'rssi'}, + ], +}; + +const ConnectRequest$json = const { + '1': 'ConnectRequest', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'android_auto_connect', '3': 2, '4': 1, '5': 8, '10': 'androidAutoConnect'}, + ], +}; + +const BluetoothDevice$json = const { + '1': 'BluetoothDevice', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + const {'1': 'type', '3': 3, '4': 1, '5': 14, '6': '.BluetoothDevice.Type', '10': 'type'}, + ], + '4': const [BluetoothDevice_Type$json], +}; + +const BluetoothDevice_Type$json = const { + '1': 'Type', + '2': const [ + const {'1': 'UNKNOWN', '2': 0}, + const {'1': 'CLASSIC', '2': 1}, + const {'1': 'LE', '2': 2}, + const {'1': 'DUAL', '2': 3}, + ], +}; + +const BluetoothService$json = const { + '1': 'BluetoothService', + '2': const [ + const {'1': 'uuid', '3': 1, '4': 1, '5': 9, '10': 'uuid'}, + const {'1': 'remote_id', '3': 2, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'is_primary', '3': 3, '4': 1, '5': 8, '10': 'isPrimary'}, + const {'1': 'characteristics', '3': 4, '4': 3, '5': 11, '6': '.BluetoothCharacteristic', '10': 'characteristics'}, + const {'1': 'included_services', '3': 5, '4': 3, '5': 11, '6': '.BluetoothService', '10': 'includedServices'}, + ], +}; + +const BluetoothCharacteristic$json = const { + '1': 'BluetoothCharacteristic', + '2': const [ + const {'1': 'uuid', '3': 1, '4': 1, '5': 9, '10': 'uuid'}, + const {'1': 'serviceUuid', '3': 2, '4': 1, '5': 9, '10': 'serviceUuid'}, + const {'1': 'secondaryServiceUuid', '3': 3, '4': 1, '5': 9, '10': 'secondaryServiceUuid'}, + const {'1': 'descriptors', '3': 4, '4': 3, '5': 11, '6': '.BluetoothDescriptor', '10': 'descriptors'}, + const {'1': 'properties', '3': 5, '4': 1, '5': 11, '6': '.CharacteristicProperties', '10': 'properties'}, + const {'1': 'value', '3': 6, '4': 1, '5': 12, '10': 'value'}, + ], +}; + +const BluetoothDescriptor$json = const { + '1': 'BluetoothDescriptor', + '2': const [ + const {'1': 'uuid', '3': 1, '4': 1, '5': 9, '10': 'uuid'}, + const {'1': 'serviceUuid', '3': 2, '4': 1, '5': 9, '10': 'serviceUuid'}, + const {'1': 'characteristicUuid', '3': 3, '4': 1, '5': 9, '10': 'characteristicUuid'}, + const {'1': 'value', '3': 4, '4': 1, '5': 12, '10': 'value'}, + ], +}; + +const CharacteristicProperties$json = const { + '1': 'CharacteristicProperties', + '2': const [ + const {'1': 'broadcast', '3': 1, '4': 1, '5': 8, '10': 'broadcast'}, + const {'1': 'read', '3': 2, '4': 1, '5': 8, '10': 'read'}, + const {'1': 'write_without_response', '3': 3, '4': 1, '5': 8, '10': 'writeWithoutResponse'}, + const {'1': 'write', '3': 4, '4': 1, '5': 8, '10': 'write'}, + const {'1': 'notify', '3': 5, '4': 1, '5': 8, '10': 'notify'}, + const {'1': 'indicate', '3': 6, '4': 1, '5': 8, '10': 'indicate'}, + const {'1': 'authenticated_signed_writes', '3': 7, '4': 1, '5': 8, '10': 'authenticatedSignedWrites'}, + const {'1': 'extended_properties', '3': 8, '4': 1, '5': 8, '10': 'extendedProperties'}, + const {'1': 'notify_encryption_required', '3': 9, '4': 1, '5': 8, '10': 'notifyEncryptionRequired'}, + const {'1': 'indicate_encryption_required', '3': 10, '4': 1, '5': 8, '10': 'indicateEncryptionRequired'}, + ], +}; + +const DiscoverServicesResult$json = const { + '1': 'DiscoverServicesResult', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'services', '3': 2, '4': 3, '5': 11, '6': '.BluetoothService', '10': 'services'}, + ], +}; + +const ReadCharacteristicRequest$json = const { + '1': 'ReadCharacteristicRequest', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'characteristic_uuid', '3': 2, '4': 1, '5': 9, '10': 'characteristicUuid'}, + const {'1': 'service_uuid', '3': 3, '4': 1, '5': 9, '10': 'serviceUuid'}, + const {'1': 'secondary_service_uuid', '3': 4, '4': 1, '5': 9, '10': 'secondaryServiceUuid'}, + ], +}; + +const ReadCharacteristicResponse$json = const { + '1': 'ReadCharacteristicResponse', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'characteristic', '3': 2, '4': 1, '5': 11, '6': '.BluetoothCharacteristic', '10': 'characteristic'}, + ], +}; + +const ReadDescriptorRequest$json = const { + '1': 'ReadDescriptorRequest', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'descriptor_uuid', '3': 2, '4': 1, '5': 9, '10': 'descriptorUuid'}, + const {'1': 'service_uuid', '3': 3, '4': 1, '5': 9, '10': 'serviceUuid'}, + const {'1': 'secondary_service_uuid', '3': 4, '4': 1, '5': 9, '10': 'secondaryServiceUuid'}, + const {'1': 'characteristic_uuid', '3': 5, '4': 1, '5': 9, '10': 'characteristicUuid'}, + ], +}; + +const ReadDescriptorResponse$json = const { + '1': 'ReadDescriptorResponse', + '2': const [ + const {'1': 'request', '3': 1, '4': 1, '5': 11, '6': '.ReadDescriptorRequest', '10': 'request'}, + const {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, + ], +}; + +const WriteCharacteristicRequest$json = const { + '1': 'WriteCharacteristicRequest', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'characteristic_uuid', '3': 2, '4': 1, '5': 9, '10': 'characteristicUuid'}, + const {'1': 'service_uuid', '3': 3, '4': 1, '5': 9, '10': 'serviceUuid'}, + const {'1': 'secondary_service_uuid', '3': 4, '4': 1, '5': 9, '10': 'secondaryServiceUuid'}, + const {'1': 'write_type', '3': 5, '4': 1, '5': 14, '6': '.WriteCharacteristicRequest.WriteType', '10': 'writeType'}, + const {'1': 'value', '3': 6, '4': 1, '5': 12, '10': 'value'}, + ], + '4': const [WriteCharacteristicRequest_WriteType$json], +}; + +const WriteCharacteristicRequest_WriteType$json = const { + '1': 'WriteType', + '2': const [ + const {'1': 'WITH_RESPONSE', '2': 0}, + const {'1': 'WITHOUT_RESPONSE', '2': 1}, + ], +}; + +const WriteCharacteristicResponse$json = const { + '1': 'WriteCharacteristicResponse', + '2': const [ + const {'1': 'request', '3': 1, '4': 1, '5': 11, '6': '.WriteCharacteristicRequest', '10': 'request'}, + const {'1': 'success', '3': 2, '4': 1, '5': 8, '10': 'success'}, + ], +}; + +const WriteDescriptorRequest$json = const { + '1': 'WriteDescriptorRequest', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'descriptor_uuid', '3': 2, '4': 1, '5': 9, '10': 'descriptorUuid'}, + const {'1': 'service_uuid', '3': 3, '4': 1, '5': 9, '10': 'serviceUuid'}, + const {'1': 'secondary_service_uuid', '3': 4, '4': 1, '5': 9, '10': 'secondaryServiceUuid'}, + const {'1': 'characteristic_uuid', '3': 5, '4': 1, '5': 9, '10': 'characteristicUuid'}, + const {'1': 'value', '3': 6, '4': 1, '5': 12, '10': 'value'}, + ], +}; + +const WriteDescriptorResponse$json = const { + '1': 'WriteDescriptorResponse', + '2': const [ + const {'1': 'request', '3': 1, '4': 1, '5': 11, '6': '.WriteDescriptorRequest', '10': 'request'}, + const {'1': 'success', '3': 2, '4': 1, '5': 8, '10': 'success'}, + ], +}; + +const SetNotificationRequest$json = const { + '1': 'SetNotificationRequest', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'service_uuid', '3': 2, '4': 1, '5': 9, '10': 'serviceUuid'}, + const {'1': 'secondary_service_uuid', '3': 3, '4': 1, '5': 9, '10': 'secondaryServiceUuid'}, + const {'1': 'characteristic_uuid', '3': 4, '4': 1, '5': 9, '10': 'characteristicUuid'}, + const {'1': 'enable', '3': 5, '4': 1, '5': 8, '10': 'enable'}, + ], +}; + +const SetNotificationResponse$json = const { + '1': 'SetNotificationResponse', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'characteristic', '3': 2, '4': 1, '5': 11, '6': '.BluetoothCharacteristic', '10': 'characteristic'}, + const {'1': 'success', '3': 3, '4': 1, '5': 8, '10': 'success'}, + ], +}; + +const OnNotificationResponse$json = const { + '1': 'OnNotificationResponse', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'characteristic', '3': 2, '4': 1, '5': 11, '6': '.BluetoothCharacteristic', '10': 'characteristic'}, + ], +}; + +const DeviceStateResponse$json = const { + '1': 'DeviceStateResponse', + '2': const [ + const {'1': 'remote_id', '3': 1, '4': 1, '5': 9, '10': 'remoteId'}, + const {'1': 'state', '3': 2, '4': 1, '5': 14, '6': '.DeviceStateResponse.BluetoothDeviceState', '10': 'state'}, + ], + '4': const [DeviceStateResponse_BluetoothDeviceState$json], +}; + +const DeviceStateResponse_BluetoothDeviceState$json = const { + '1': 'BluetoothDeviceState', + '2': const [ + const {'1': 'DISCONNECTED', '2': 0}, + const {'1': 'CONNECTING', '2': 1}, + const {'1': 'CONNECTED', '2': 2}, + const {'1': 'DISCONNECTING', '2': 3}, + ], +}; + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbserver.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbserver.dart new file mode 100755 index 0000000..c9e5666 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/gen/flutterblue.pbserver.dart @@ -0,0 +1,8 @@ +/// +// Generated code. Do not modify. +// source: flutterblue.proto +/// +// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name + +export 'flutterblue.pb.dart'; + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_characteristic.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_characteristic.dart new file mode 100755 index 0000000..94a2425 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_characteristic.dart @@ -0,0 +1,93 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of flutter_ble; + +class BluetoothCharacteristic { + final Guid uuid; + final Guid serviceUuid; // The service that this characteristic belongs to. + final Guid + secondaryServiceUuid; // The nested service that this characteristic belongs to. + final CharacteristicProperties properties; + final List descriptors; + bool get isNotifying { + try { + var cccd = + descriptors.singleWhere((d) => d.uuid == BluetoothDescriptor.CCCD); + return ((cccd.value[0] & 0x01) > 0 || (cccd.value[0] & 0x02) > 0); + } catch (e) { + return false; + } + } + + List value; + + BluetoothCharacteristic( + {@required this.uuid, + @required this.serviceUuid, + this.secondaryServiceUuid, + @required this.descriptors, + @required this.properties}); + + BluetoothCharacteristic.fromProto(protos.BluetoothCharacteristic p) + : uuid = new Guid(p.uuid), + serviceUuid = new Guid(p.serviceUuid), + secondaryServiceUuid = (p.secondaryServiceUuid.length > 0) + ? new Guid(p.secondaryServiceUuid) + : null, + descriptors = p.descriptors + .map((d) => new BluetoothDescriptor.fromProto(d)) + .toList(), + properties = new CharacteristicProperties.fromProto(p.properties), + value = p.value; + + void updateDescriptors(List newDescriptors) { + for (var d in descriptors) { + for (var newD in newDescriptors) { + if (d.uuid == newD.uuid) { + d.value = newD.value; + } + } + } + } +} + +enum CharacteristicWriteType { withResponse, withoutResponse } + +class CharacteristicProperties { + final bool broadcast; + final bool read; + final bool writeWithoutResponse; + final bool write; + final bool notify; + final bool indicate; + final bool authenticatedSignedWrites; + final bool extendedProperties; + final bool notifyEncryptionRequired; + final bool indicateEncryptionRequired; + + CharacteristicProperties( + {this.broadcast = false, + this.read = false, + this.writeWithoutResponse = false, + this.write = false, + this.notify = false, + this.indicate = false, + this.authenticatedSignedWrites = false, + this.extendedProperties = false, + this.notifyEncryptionRequired = false, + this.indicateEncryptionRequired = false}); + + CharacteristicProperties.fromProto(protos.CharacteristicProperties p) + : broadcast = p.broadcast, + read = p.read, + writeWithoutResponse = p.writeWithoutResponse, + write = p.write, + notify = p.notify, + indicate = p.indicate, + authenticatedSignedWrites = p.authenticatedSignedWrites, + extendedProperties = p.extendedProperties, + notifyEncryptionRequired = p.notifyEncryptionRequired, + indicateEncryptionRequired = p.indicateEncryptionRequired; +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_descriptor.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_descriptor.dart new file mode 100755 index 0000000..945a1ef --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_descriptor.dart @@ -0,0 +1,26 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of flutter_ble; + +class BluetoothDescriptor { + static final Guid CCCD = new Guid("00002902-0000-1000-8000-00805f9b34fb"); + + final Guid uuid; + final Guid serviceUuid; // The service that this descriptor belongs to. + final Guid + characteristicUuid; // The characteristic that this descriptor belongs to. + List value; + + BluetoothDescriptor( + {@required this.uuid, + @required this.serviceUuid, + @required this.characteristicUuid}); + + BluetoothDescriptor.fromProto(protos.BluetoothDescriptor p) + : uuid = new Guid(p.uuid), + serviceUuid = new Guid(p.serviceUuid), + characteristicUuid = new Guid(p.characteristicUuid), + value = p.value; +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_device.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_device.dart new file mode 100755 index 0000000..9101ea2 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_device.dart @@ -0,0 +1,238 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of flutter_ble; + +class BluetoothDevice { + final DeviceIdentifier id; + final String name; + final BluetoothDeviceType type; + + BluetoothDevice( + {@required this.id, this.name, this.type = BluetoothDeviceType.unknown}); + + BluetoothDevice.fromProto(protos.BluetoothDevice p) + : id = new DeviceIdentifier(p.remoteId), + name = p.name, + type = BluetoothDeviceType.values[p.type.value]; + + /// Discovers services offered by the remote device as well as their characteristics and descriptors + Future> discoverServices() async { + var response = FlutterBle.instance._servicesDiscoveredChannel + .receiveBroadcastStream() + .map((buffer) => new protos.DiscoverServicesResult.fromBuffer(buffer)) + .where((p) => p.remoteId == id.toString()) + .map((p) => p.services) + .map((s) => s.map((p) => new BluetoothService.fromProto(p)).toList()) + .first; + + await FlutterBle.instance._channel + .invokeMethod('discoverServices', id.toString()); + + return response; + } + + /// Returns a list of Bluetooth GATT services offered by the remote device + /// This function requires that discoverServices has been completed for this device + Future> get services { + return FlutterBle.instance._channel + .invokeMethod('services', id.toString()) + .then((buffer) => + new protos.DiscoverServicesResult.fromBuffer(buffer).services) + .then((i) => i.map((s) => new BluetoothService.fromProto(s)).toList()); + } + + /// Retrieves the value of a specified characteristic + Future> readCharacteristic( + BluetoothCharacteristic characteristic) async { + var request = protos.ReadCharacteristicRequest.create() + ..remoteId = id.toString() + ..characteristicUuid = characteristic.uuid.toString() + ..serviceUuid = characteristic.serviceUuid.toString(); + FlutterBle.instance._log(LogLevel.info, + 'remoteId: ${id.toString()} characteristicUuid: ${characteristic.uuid.toString()} serviceUuid: ${characteristic.serviceUuid.toString()}'); + + await FlutterBle.instance._channel + .invokeMethod('readCharacteristic', request.writeToBuffer()); + + return await FlutterBle.instance._characteristicReadChannel + .receiveBroadcastStream() + .map((buffer) => + new protos.ReadCharacteristicResponse.fromBuffer(buffer)) + .where((p) => + (p.remoteId == request.remoteId) && + (p.characteristic.uuid == request.characteristicUuid) && + (p.characteristic.serviceUuid == request.serviceUuid)) + .map((p) => p.characteristic.value) + .first + .then((d) => characteristic.value = d); + } + + /// Retrieves the value of a specified descriptor + Future> readDescriptor(BluetoothDescriptor descriptor) async { + var request = protos.ReadDescriptorRequest.create() + ..remoteId = id.toString() + ..descriptorUuid = descriptor.uuid.toString() + ..characteristicUuid = descriptor.characteristicUuid.toString() + ..serviceUuid = descriptor.serviceUuid.toString(); + + await FlutterBle.instance._channel + .invokeMethod('readDescriptor', request.writeToBuffer()); + + return await FlutterBle.instance._descriptorReadChannel + .receiveBroadcastStream() + .map((buffer) => new protos.ReadDescriptorResponse.fromBuffer(buffer)) + .where((p) => + (p.request.remoteId == request.remoteId) && + (p.request.descriptorUuid == request.descriptorUuid) && + (p.request.characteristicUuid == request.characteristicUuid) && + (p.request.serviceUuid == request.serviceUuid)) + .map((d) => d.value) + .first + .then((d) => descriptor.value = d); + } + + /// Writes the value of a characteristic. + /// [CharacteristicWriteType.withoutResponse]: the write is not + /// guaranteed and will return immediately with success. + /// [CharacteristicWriteType.withResponse]: the method will return after the + /// write operation has either passed or failed. + Future writeCharacteristic( + BluetoothCharacteristic characteristic, List value, + {CharacteristicWriteType type = + CharacteristicWriteType.withoutResponse}) async { + var request = protos.WriteCharacteristicRequest.create() + ..remoteId = id.toString() + ..characteristicUuid = characteristic.uuid.toString() + ..serviceUuid = characteristic.serviceUuid.toString() + ..writeType = + protos.WriteCharacteristicRequest_WriteType.valueOf(type.index) + ..value = value; + + var result = await FlutterBle.instance._channel + .invokeMethod('writeCharacteristic', request.writeToBuffer()); + + if (type == CharacteristicWriteType.withoutResponse) { + return result; + } + + return await FlutterBle.instance._methodStream + .where((m) => m.method == "WriteCharacteristicResponse") + .map((m) => m.arguments) + .map((buffer) => + new protos.WriteCharacteristicResponse.fromBuffer(buffer)) + .where((p) => + (p.request.remoteId == request.remoteId) && + (p.request.characteristicUuid == request.characteristicUuid) && + (p.request.serviceUuid == request.serviceUuid)) + .first + .then((w) => w.success) + .then((success) => (!success) + ? throw new Exception('Failed to write the characteristic') + : null) + .then((_) => characteristic.value = value) + .then((_) => null); + } + + /// Writes the value of a descriptor + Future writeDescriptor( + BluetoothDescriptor descriptor, List value) async { + var request = protos.WriteDescriptorRequest.create() + ..remoteId = id.toString() + ..descriptorUuid = descriptor.uuid.toString() + ..characteristicUuid = descriptor.characteristicUuid.toString() + ..serviceUuid = descriptor.serviceUuid.toString() + ..value = value; + + await FlutterBle.instance._channel + .invokeMethod('writeDescriptor', request.writeToBuffer()); + + return await FlutterBle.instance._methodStream + .where((m) => m.method == "WriteDescriptorResponse") + .map((m) => m.arguments) + .map((buffer) => new protos.WriteDescriptorResponse.fromBuffer(buffer)) + .where((p) => + (p.request.remoteId == request.remoteId) && + (p.request.descriptorUuid == request.descriptorUuid) && + (p.request.characteristicUuid == request.characteristicUuid) && + (p.request.serviceUuid == request.serviceUuid)) + .first + .then((w) => w.success) + .then((success) => (!success) + ? throw new Exception('Failed to write the descriptor') + : null) + .then((_) => descriptor.value = value) + .then((_) => null); + } + + /// Sets notifications or indications for the value of a specified characteristic + Future setNotifyValue( + BluetoothCharacteristic characteristic, bool notify) async { + var request = protos.SetNotificationRequest.create() + ..remoteId = id.toString() + ..serviceUuid = characteristic.serviceUuid.toString() + ..characteristicUuid = characteristic.uuid.toString() + ..enable = notify; + + await FlutterBle.instance._channel + .invokeMethod('setNotification', request.writeToBuffer()); + + return await FlutterBle.instance._methodStream + .where((m) => m.method == "SetNotificationResponse") + .map((m) => m.arguments) + .map((buffer) => new protos.SetNotificationResponse.fromBuffer(buffer)) + .where((p) => + (p.remoteId == request.remoteId) && + (p.characteristic.uuid == request.characteristicUuid) && + (p.characteristic.serviceUuid == request.serviceUuid)) + .first + .then((p) => new BluetoothCharacteristic.fromProto(p.characteristic)) + .then((c) { + characteristic.updateDescriptors(c.descriptors); + characteristic.value = c.value; + return (c.isNotifying == notify); + }); + } + + /// Notifies when the characteristic's value has changed. + /// setNotification() should be run first to enable them on the peripheral + Stream> onValueChanged(BluetoothCharacteristic characteristic) { + return FlutterBle.instance._methodStream + .where((m) => m.method == "OnValueChanged") + .map((m) => m.arguments) + .map((buffer) => new protos.OnNotificationResponse.fromBuffer(buffer)) + .where((p) => p.remoteId == id.toString()) + .map((p) => new BluetoothCharacteristic.fromProto(p.characteristic)) + .where((c) => c.uuid == characteristic.uuid) + .map((c) { + characteristic.updateDescriptors(c.descriptors); + characteristic.value = c.value; + return c.value; + }); + } + + /// The current connection state of the device + Future get state => FlutterBle.instance._channel + .invokeMethod('deviceState', id.toString()) + .then((buffer) => new protos.DeviceStateResponse.fromBuffer(buffer)) + .then((p) => BluetoothDeviceState.values[p.state.value]); + + /// Notifies when the device connection state has changed + Stream onStateChanged() { + return FlutterBle.instance._methodStream + .where((m) => m.method == "DeviceState") + .map((m) => m.arguments) + .map((buffer) => new protos.DeviceStateResponse.fromBuffer(buffer)) + .where((p) => p.remoteId == id.toString()) + .map((p) => BluetoothDeviceState.values[p.state.value]); + } + + /// Indicates whether the Bluetooth Device can send a write without response + Future get canSendWriteWithoutResponse => + new Future.error(new UnimplementedError()); +} + +enum BluetoothDeviceType { unknown, classic, le, dual } + +enum BluetoothDeviceState { disconnected, connecting, connected, disconnecting } diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_service.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_service.dart new file mode 100755 index 0000000..56e1dc7 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/bluetooth_service.dart @@ -0,0 +1,31 @@ + // Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of flutter_ble; + +class BluetoothService { + final Guid uuid; + final DeviceIdentifier deviceId; + final bool isPrimary; + final List characteristics; + final List includedServices; + + BluetoothService( + {@required this.uuid, + @required this.deviceId, + @required this.isPrimary, + @required this.characteristics, + @required this.includedServices}); + + BluetoothService.fromProto(protos.BluetoothService p) + : uuid = new Guid(p.uuid), + deviceId = new DeviceIdentifier(p.remoteId), + isPrimary = p.isPrimary, + characteristics = p.characteristics + .map((c) => new BluetoothCharacteristic.fromProto(c)) + .toList(), + includedServices = p.includedServices + .map((s) => new BluetoothService.fromProto(s)) + .toList(); +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/constants.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/constants.dart new file mode 100755 index 0000000..ed708ea --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/constants.dart @@ -0,0 +1,7 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of flutter_ble; + +const NAMESPACE = 'ai.longev.flutter/flutter_ble'; diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/flutter_ble.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/flutter_ble.dart new file mode 100755 index 0000000..ab54248 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/flutter_ble.dart @@ -0,0 +1,252 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of flutter_ble; + +class FlutterBle { + final MethodChannel _channel = const MethodChannel('$NAMESPACE/methods'); + final EventChannel _stateChannel = const EventChannel('$NAMESPACE/state'); + final EventChannel _scanResultChannel = + const EventChannel('$NAMESPACE/scanResult'); + final EventChannel _servicesDiscoveredChannel = + const EventChannel('$NAMESPACE/servicesDiscovered'); + final EventChannel _characteristicReadChannel = + const EventChannel('$NAMESPACE/characteristicRead'); + final EventChannel _descriptorReadChannel = + const EventChannel('$NAMESPACE/descriptorRead'); + final StreamController _methodStreamController = + new StreamController.broadcast(); // ignore: close_sinks + Stream get _methodStream => _methodStreamController + .stream; // Used internally to dispatch methods from platform. + + /// Singleton boilerplate + FlutterBle._() { + _channel.setMethodCallHandler((MethodCall call) { + _methodStreamController.add(call); + }); + + // Send the log level to the underlying platforms. + setLogLevel(logLevel); + } + static FlutterBle _instance = new FlutterBle._(); + static FlutterBle get instance => _instance; + + /// Log level of the instance, default is all messages (debug). + LogLevel _logLevel = LogLevel.debug; + LogLevel get logLevel => _logLevel; + + /// Checks whether the device supports Bluetooth + Future get isAvailable => + _channel.invokeMethod('isAvailable').then((d) => d); + + /// Checks if Bluetooth functionality is turned on + Future get isOn => _channel.invokeMethod('isOn').then((d) => d); + + /// Gets the current state of the Bluetooth module + Future get state { + return _channel + .invokeMethod('state') + .then((buffer) => new protos.BluetoothState.fromBuffer(buffer)) + .then((s) => BluetoothState.values[s.state.value]); + } + + /// Occurs when the bluetooth state has changed + Stream onStateChanged() { + return _stateChannel + .receiveBroadcastStream() + .map((buffer) => new protos.BluetoothState.fromBuffer(buffer)) + .map((s) => BluetoothState.values[s.state.value]); + } + + /// Starts a scan for Bluetooth Low Energy devices + /// Timeout closes the stream after a specified [Duration] + Stream scan({ + ScanMode scanMode = ScanMode.lowLatency, + List withServices = const [], + List withDevices = const [], + Duration timeout, + }) async* { + var settings = protos.ScanSettings.create() + ..androidScanMode = scanMode.value + ..serviceUuids.addAll(withServices.map((g) => g.toString()).toList()); + StreamSubscription subscription; + StreamController controller; + controller = new StreamController( + onListen: () { + if (timeout != null) { + new Future.delayed(timeout, () => controller.close()); + } + }, + onCancel: () { + _stopScan(); + subscription.cancel(); + }, + ); + + await _channel.invokeMethod('startScan', settings.writeToBuffer()); + + subscription = _scanResultChannel.receiveBroadcastStream().listen( + controller.add, + onError: controller.addError, + onDone: controller.close, + ); + + yield* controller.stream + .map((buffer) => new protos.ScanResult.fromBuffer(buffer)) + .map((p) => new ScanResult.fromProto(p)); + } + + /// Stops a scan for Bluetooth Low Energy devices + Future _stopScan() => _channel.invokeMethod('stopScan'); + + /// Establishes a connection to the Bluetooth Device. + /// Returns a stream of [BluetoothDeviceState] + /// Timeout closes the stream after a specified [Duration] + /// To cancel connection to device, simply cancel() the stream subscription + Stream connect( + BluetoothDevice device, { + Duration timeout, + bool autoConnect = true, + }) async* { + var request = protos.ConnectRequest.create() + ..remoteId = device.id.toString() + ..androidAutoConnect = autoConnect; + var connected = false; + StreamSubscription subscription; + StreamController controller; + controller = new StreamController( + onListen: () { + if (timeout != null) { + new Future.delayed( + timeout, () => (!connected) ? controller.close() : null); + } + }, + onCancel: () { + _cancelConnection(device); + subscription.cancel(); + }, + ); + + await _channel.invokeMethod('connect', request.writeToBuffer()); + + subscription = device.onStateChanged().listen( + (data) { + if (data == BluetoothDeviceState.connected) { + _log(LogLevel.info, 'connected!'); + connected = true; + } + controller.add(data); + }, + onError: controller.addError, + onDone: controller.close, + ); + + yield* controller.stream; + } + + /// Cancels connection to the Bluetooth Device + Future _cancelConnection(BluetoothDevice device) => + _channel.invokeMethod('disconnect', device.id.toString()); + + /// Sets the log level of the FlutterBle instance + /// Messages equal or below the log level specified are stored/forwarded, + /// messages above are dropped. + void setLogLevel(LogLevel level) async { + await _channel.invokeMethod('setLogLevel', level.index); + _logLevel = level; + } + + void _log(LogLevel level, String message) { + if (level.index <= _logLevel.index) { + print(message); + } + } +} + +/// Log levels for FlutterBle +enum LogLevel { + emergency, + alert, + critical, + error, + warning, + notice, + info, + debug, +} + +/// State of the bluetooth adapter. +enum BluetoothState { + unknown, + unavailable, + unauthorized, + turningOn, + on, + turningOff, + off +} + +class ScanMode { + const ScanMode(this.value); + static const lowPower = const ScanMode(0); + static const balanced = const ScanMode(1); + static const lowLatency = const ScanMode(2); + static const opportunistic = const ScanMode(-1); + final int value; +} + +class DeviceIdentifier { + final String id; + const DeviceIdentifier(this.id); + + @override + String toString() => id; + + @override + int get hashCode => id.hashCode; + + @override + bool operator ==(other) => + other is DeviceIdentifier && compareAsciiLowerCase(id, other.id) == 0; +} + +class ScanResult { + const ScanResult({this.device, this.advertisementData, this.rssi}); + + ScanResult.fromProto(protos.ScanResult p) + : device = new BluetoothDevice.fromProto(p.device), + advertisementData = + new AdvertisementData.fromProto(p.advertisementData), + rssi = p.rssi; + + final BluetoothDevice device; + final AdvertisementData advertisementData; + final int rssi; +} + +class AdvertisementData { + final String localName; + final int txPowerLevel; + final bool connectable; + final Map> manufacturerData; + final Map> serviceData; + final List serviceUuids; + + AdvertisementData( + {this.localName, + this.txPowerLevel, + this.connectable, + this.manufacturerData, + this.serviceData, + this.serviceUuids}); + + AdvertisementData.fromProto(protos.AdvertisementData p) + : localName = p.localName, + txPowerLevel = + (p.txPowerLevel.hasValue()) ? p.txPowerLevel.value : null, + connectable = p.connectable, + manufacturerData = p.manufacturerData, + serviceData = p.serviceData, + serviceUuids = p.serviceUuids; +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/guid.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/guid.dart new file mode 100755 index 0000000..733c2d4 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/lib/src/guid.dart @@ -0,0 +1,102 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +part of flutter_ble; + + +class Guid { + final List _bytes; + final int _hashCode; + + Guid._internal(List bytes) + : _bytes = bytes, + _hashCode = _calcHashCode(bytes); + + Guid(String input) : this._internal(_fromString(input)); + + Guid.fromMac(String input) : this._internal(_fromMacString(input)); + + Guid.empty() : this._internal(new List.filled(16, 0)); + + static List _fromMacString(input) { + var bytes = new List.filled(16, 0); + + if (input == null) { + throw new ArgumentError("Input was null"); + } + input = input.toLowerCase(); + + final RegExp regex = new RegExp('[0-9a-f]{2}'); + Iterable matches = regex.allMatches(input); + + if (matches.length != 6) { + throw new FormatException("The format is invalid: " + input); + } + + int i = 0; + for (Match match in matches) { + var hexString = input.substring(match.start, match.end); + bytes[i] = hex.decode(hexString)[0]; + i++; + } + + return bytes; + } + + static List _fromString(input) { + var bytes = new List.filled(16, 0); + if (input == null) { + throw new ArgumentError("Input was null"); + } + if (input.length < 32) { + throw new FormatException("The format is invalid"); + } + input = input.toLowerCase(); + + final RegExp regex = new RegExp('[0-9a-f]{2}'); + Iterable matches = regex.allMatches(input); + if (matches.length != 16) { + throw new FormatException("The format is invalid"); + } + int i = 0; + for (Match match in matches) { + var hexString = input.substring(match.start, match.end); + bytes[i] = hex.decode(hexString)[0]; + i++; + } + return bytes; + } + + static int _calcHashCode(List bytes) { + const equality = const ListEquality(); + return equality.hash(bytes); + } + + @override + String toString() { + String one = hex.encode(_bytes.sublist(0, 4)); + String two = hex.encode(_bytes.sublist(4, 6)); + String three = hex.encode(_bytes.sublist(6, 8)); + String four = hex.encode(_bytes.sublist(8, 10)); + String five = hex.encode(_bytes.sublist(10, 16)); + return "$one-$two-$three-$four-$five"; + } + + String toMac() { + String one = hex.encode(_bytes.sublist(0, 1)); + String two = hex.encode(_bytes.sublist(1, 2)); + String three = hex.encode(_bytes.sublist(2, 3)); + String four = hex.encode(_bytes.sublist(3, 4)); + String five = hex.encode(_bytes.sublist(4, 5)); + String six = hex.encode(_bytes.sublist(5, 6)); + return "$one:$two:$three:$four:$five:$six".toUpperCase(); + } + + List toByteArray() { + return _bytes; + } + + operator ==(other) => other is Guid && this.hashCode == other.hashCode; + + int get hashCode => _hashCode; +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/protos/flutterblue.proto b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/protos/flutterblue.proto new file mode 100755 index 0000000..c36dc9a --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/protos/flutterblue.proto @@ -0,0 +1,198 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto3"; + +option java_package = "ai.longev.flutter.flutter_ble"; +option java_outer_classname = "Protos"; +option objc_class_prefix = "Protos"; + + +// Wrapper message for `int32`. +// +// Allows for nullability of fields in messages +message Int32Value { + // The int32 value. + int32 value = 1; +} + +message BluetoothState { + enum State { + UNKNOWN = 0; + UNAVAILABLE = 1; + UNAUTHORIZED = 2; + TURNING_ON = 3; + ON = 4; + TURNING_OFF = 5; + OFF = 6; + }; + State state = 1; +} + +message AdvertisementData { + string local_name = 1; + Int32Value tx_power_level = 2; + bool connectable = 3; + map manufacturer_data = 4; // Map of manufacturers to their data + map service_data = 5; // Map of service UUIDs to their data. + repeated string service_uuids = 6; +} + +message ScanSettings { + int32 android_scan_mode = 1; + repeated string service_uuids = 2; +} + +message ScanResult { + BluetoothDevice device = 1; // The received peer's ID. + AdvertisementData advertisement_data = 2; + int32 rssi = 3; +} + +message ConnectRequest { + string remote_id = 1; + bool android_auto_connect = 2; +} + +message BluetoothDevice { + enum Type { + UNKNOWN = 0; + CLASSIC = 1; + LE = 2; + DUAL = 3; + }; + + string remote_id = 1; + string name = 2; + Type type = 3; +} + +message BluetoothService { + string uuid = 1; + string remote_id = 2; + bool is_primary = 3; // Indicates whether the type of service is primary or secondary. + repeated BluetoothCharacteristic characteristics = 4; // A list of characteristics that have been discovered in this service. + repeated BluetoothService included_services = 5; // A list of included services that have been discovered in this service. +} + +message BluetoothCharacteristic { + string uuid = 1; + string serviceUuid = 2; // The service that this characteristic belongs to. + string secondaryServiceUuid = 3; // The secondary service if nested + repeated BluetoothDescriptor descriptors = 4; // A list of descriptors that have been discovered in this characteristic. + CharacteristicProperties properties = 5; // The properties of the characteristic. + bytes value = 6; +} + +message BluetoothDescriptor { + string uuid = 1; + string serviceUuid = 2; // The service that this descriptor belongs to. + string characteristicUuid = 3; // The characteristic that this descriptor belongs to. + bytes value = 4; +} + +message CharacteristicProperties { + bool broadcast = 1; + bool read = 2; + bool write_without_response = 3; + bool write = 4; + bool notify = 5; + bool indicate = 6; + bool authenticated_signed_writes = 7; + bool extended_properties = 8; + bool notify_encryption_required = 9; + bool indicate_encryption_required = 10; +} + +message DiscoverServicesResult { + string remote_id = 1; + repeated BluetoothService services = 2; +} + +message ReadCharacteristicRequest { + string remote_id = 1; + string characteristic_uuid = 2; + string service_uuid = 3; + string secondary_service_uuid = 4; +} + +message ReadCharacteristicResponse { + string remote_id = 1; + BluetoothCharacteristic characteristic = 2; +} + +message ReadDescriptorRequest { + string remote_id = 1; + string descriptor_uuid = 2; + string service_uuid = 3; + string secondary_service_uuid = 4; + string characteristic_uuid = 5; +} + +message ReadDescriptorResponse { + ReadDescriptorRequest request = 1; + bytes value = 2; +} + +message WriteCharacteristicRequest { + enum WriteType { + WITH_RESPONSE = 0; + WITHOUT_RESPONSE = 1; + } + string remote_id = 1; + string characteristic_uuid = 2; + string service_uuid = 3; + string secondary_service_uuid = 4; + WriteType write_type = 5; + bytes value = 6; +} + +message WriteCharacteristicResponse { + WriteCharacteristicRequest request = 1; + bool success = 2; +} + +message WriteDescriptorRequest { + string remote_id = 1; + string descriptor_uuid = 2; + string service_uuid = 3; + string secondary_service_uuid = 4; + string characteristic_uuid = 5; + bytes value = 6; +} + +message WriteDescriptorResponse { + WriteDescriptorRequest request = 1; + bool success = 2; +} + +message SetNotificationRequest { + string remote_id = 1; + string service_uuid = 2; + string secondary_service_uuid = 3; + string characteristic_uuid = 4; + bool enable = 5; +} + +message SetNotificationResponse { + string remote_id = 1; + BluetoothCharacteristic characteristic = 2; + bool success = 3; +} + +message OnNotificationResponse { + string remote_id = 1; + BluetoothCharacteristic characteristic = 2; +} + +message DeviceStateResponse { + enum BluetoothDeviceState { + DISCONNECTED = 0; + CONNECTING = 1; + CONNECTED = 2; + DISCONNECTING = 3; + } + string remote_id = 1; + BluetoothDeviceState state = 2; +} \ No newline at end of file diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/protos/regenerate.md b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/protos/regenerate.md new file mode 100755 index 0000000..57972b4 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/protos/regenerate.md @@ -0,0 +1,14 @@ +// Copyright 2017, Paul DeMarco.\ +// All rights reserved. Use of this source code is governed by a\ +// BSD-style license that can be found in the LICENSE file. + +# Generate protobuf files in Dart +1. If upgrading, delete all proto files from /home/.pub-cache/bin +1. Clone the latest dart-protoc-plugin from https://github.com/dart-lang/dart-protoc-plugin +1. Run `pub install` inside dart-protoc-plugin +1. Run `pub global activate protoc_plugin` to get .dart files into /home/.pub-cache/bin/ +1. Get the latest linux protoc compiler from https://github.com/google/protobuf/releases/ (protoc-X.X.X-linux-x86_64.zip) +1. Copy /bin/protoc into /home/.pub-cache/bin/ +1. Run the following commands from the protos folder +```protoc --dart_out=../lib/gen ./flutterblue.proto``` +```protoc --objc_out=../ios/gen ./flutterblue.proto``` \ No newline at end of file diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/pubspec.lock b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/pubspec.lock new file mode 100755 index 0000000..6894c1f --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/pubspec.lock @@ -0,0 +1,160 @@ +# Generated by pub +# See https://www.dartlang.org/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: "direct main" + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.0" + protobuf: + dependency: "direct main" + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.11" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.4" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" +sdks: + dart: ">=2.2.0 <3.0.0" diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/pubspec.yaml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/pubspec.yaml new file mode 100755 index 0000000..569783e --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/pubspec.yaml @@ -0,0 +1,64 @@ +name: flutter_ble +description: A new Flutter plugin for longev.ai. +version: 0.5.1 +authors: + - Paul DeMarco + - Jonathan Andrade +homepage: https://gitlab.longev.ai/open-source/flutter_ble + +environment: + sdk: ">=2.1.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + convert: '^2.1.1' + protobuf: '^0.13.11' + +dev_dependencies: + flutter_test: + sdk: flutter + +# For information on the generic Dart part of this file, see the +# following page: https://www.dartlang.org/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + # This section identifies this Flutter project as a plugin project. + # The androidPackage and pluginClass identifiers should not ordinarily + # be modified. They are used by the tooling to maintain consistency when + # adding or updating assets for this project. + plugin: + androidPackage: ai.longev.flutter.flutter_ble + pluginClass: FlutterBlePlugin + + # To add assets to your plugin package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/assets-and-images/#from-packages + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # To add custom fonts to your plugin package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/custom-fonts/#from-packages diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/test/flutter_ble_test.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/test/flutter_ble_test.dart new file mode 100755 index 0000000..e5a2f89 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/flutter_ble-master/test/flutter_ble_test.dart @@ -0,0 +1,62 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:flutter_ble/flutter_ble.dart'; +import 'package:flutter_test/flutter_test.dart'; + +main() { + group("Guid", () { + test('equality', () { + var guid = new Guid("{00002a43-0000-1000-8000-00805f9b34fb}"); + var guid2 = new Guid("00002a43-0000-1000-8000-00805f9b34fb"); + expect(guid, guid2); + + var mac = new Guid.fromMac("01:02:03:04:05:06"); + var mac2 = new Guid.fromMac("01:02:03:04:05:06"); + expect(mac, mac2); + }); + + test('empty()', () { + var guid = new Guid.empty(); + expect("[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]", + guid.toByteArray().toString()); + }); + + test('toByteArray()', () { + var guid = new Guid("{00002a43-0000-1000-8000-00805f9b34fb}"); + expect("[0, 0, 42, 67, 0, 0, 16, 0, 128, 0, 0, 128, 95, 155, 52, 251]", + guid.toByteArray().toString()); + }); + + test('toString()', () { + var guid = new Guid("{00002a43-0000-1000-8000-00805f9b34fb}"); + expect("00002a43-0000-1000-8000-00805f9b34fb", guid.toString()); + }); + + test('fromMac()', () { + var guid = new Guid.fromMac("24:0A:64:50:A4:67"); + expect("[36, 10, 100, 80, 164, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]", + guid.toByteArray().toString()); + }); + + test('fromMac()', () { + var guid = new Guid.fromMac("24:0A:64:50:A4:67"); + expect("24:0A:64:50:A4:67", guid.toMac()); + }); + + test('hashCode', () { + var guid = new Guid.fromMac("24:0A:64:50:A4:67"); + var guid2 = new Guid.fromMac("24:0A:64:50:A4:67"); + expect(guid.hashCode, guid2.hashCode); + }); + + test('empty() equality', () { + var guid = new Guid.empty(); + var guid2 = new Guid.empty(); + var guid3 = new Guid.fromMac("24:0A:64:50:A4:67"); + expect(guid == guid2, true); + expect(guid == guid3, false); + }); + }); +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/images/humidity.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/images/humidity.png new file mode 100644 index 0000000000000000000000000000000000000000..0f8ba69534907d8ab61da1f54c24ecff545cc32f GIT binary patch literal 4579 zcmeHKc|4SB`+sK0T1+Ui&7g(Eh-|~yB}-XOWGOS&N%mzBh7rP#QYgKWHKD9$l#*#i z3LRuDS+WdgDumD&+sriY=$!Yw@B8QP_uudHInU>FKhO1C_xIZF`?{a!x-uQkS?v>& z76JfZpY<6FC+>4~cL?xt??%oGxc~r42rxHyur@b`IYfl|2L$;6fbwl0H2S#p3FU4t zFEqNlPgO-IBE~5rBijj0>LB-#J790nZ(+svE?%6Gg3NT_#S>n3k_F1)i`RN>=&Y+l zkDey{IH=R`j|i6|i06!CP>ju$a7`W_CH`9vikymygnj3Lam2elmPbrB_QE_`+8zRL zj6l9w5+FGNUn;0+NMT777A@Jn(u{vrG|k?+1tEAN$I^2{E!}vSdHfz${P2yq%>SL=QZ{2 zK6J^)OCaVX&mZ)AgvnRd1DoqOx9c0Xlr|rJdd8|<3+`rb)!t2}01rhZFpvsk{^YY5 z34xU87vj+97;GgVnu!L%sdfV}rxEXaF#bMR3VrzbG$QY;aIW zBqA26_!EKP(z|T9BJ3w5DiEpYde#AE9va~X(^fyFuAyio1cSj0BYgc4P8O&C6z9Gn z6)#6cg(2YZn3x##7%lbC2n_tBzP>(OLlds4sm4X9MP3bw@`_apiB$SS$-nei_(l3e z1cXHegoeO&^?G@SVxy3Xio1sXy8iGpD!~8WmO>)`42v5ee0K(ZQe6Z7mu{}8;Vu_p z9}(ckwY;m}=%nFKqOC?Xb${#!b$50q!NByb7^02u3O6WGBZB~i&L4`{U|VAD}@1FvpggJ zzW+I`bNs$VzEkP8w_@e_-1CVOoEP!P=9O9G3UNh0W`)36Ng(ObMl z)6XdFlRbu9V3>w!;sY0fzV?44HmxjB|r2vwr8 z)6OsqEu8#LK(7s&DPNrF1Sz@UF6qwC@Qp|IZ&JltJ_xLllht@{7U4VMeTv50hcw4q zbjNc_k|JfAnEDZ*A_&-7FxJ0K6JRO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R@;l!geAE2X?$f6t+z?Ut#m+bH zXY^7oHIX(Yy!9$`p$IQwbGOBT08(H&$O#n{Gg%OWhDqO`H;B9XH-y7r zhN6TT7K9u-;7~8VoSjBgQ;IctXm*2zfD6>tamAAMv*p1-U-zwb7p;hD8Q_)v1o{Am z)sNWqJp?y0U?>_~()9J}n&K6*Benl0cgg)5^)*fY>&+k{u)67iJy_ltbV~#CPlb!L zp{kQM#AyU8#d&psB}}b-wf_3#Pozl$x*iE>8Fv#)@Kaj{We;Bxgd~U%|0Q~SEqvf5 z_%i39isV*q&a6-osY5)%TuBYaM{w8xmbN2Yq&8?*{zUWCcyp;$!@q83>OC+ zd_;8$-PTgU>xdO(tb8mVOW;@2+OG&JJ>x=Z4F+U>ehHl2gKSEC51MX0#-7c^WQ*U*o>m(`^ z{TWUdKyK^QL@T%N{jd_Pd#yE}w9|yHLp+=W(nerGGfo*~{rPa7-sX8?=yQ9z9>$=Q zr5)K$nD=>9B7ghoBj=eAR^iVnCr3tfU&`Zb0-UfKoSHs=uYk+xGWBKUnB1mQ?>Ne$ yg^-=90uTSImo5FnYH5zoekJ2oZF@BB=`#R7hTiMSP5fV$r>vBc + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Flutter/Debug.xcconfig b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..e8efba1 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Flutter/Release.xcconfig b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..399e934 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Podfile b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Podfile new file mode 100644 index 0000000..64ba749 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Podfile @@ -0,0 +1,72 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def parse_KV_file(file, separator='=') + file_abs_path = File.expand_path(file) + if !File.exists? file_abs_path + return []; + end + pods_ary = [] + skip_line_start_symbols = ["#", "/"] + File.foreach(file_abs_path) { |line| + next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } + plugin = line.split(pattern=separator) + if plugin.length == 2 + podname = plugin[0].strip() + path = plugin[1].strip() + podpath = File.expand_path("#{path}", file_abs_path) + pods_ary.push({:name => podname, :path => podpath}); + else + puts "Invalid plugin specification: #{line}" + end + } + return pods_ary +end + +target 'Runner' do + # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock + # referring to absolute paths on developers' machines. + system('rm -rf .symlinks') + system('mkdir -p .symlinks/plugins') + + # Flutter Pods + generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') + if generated_xcode_build_settings.empty? + puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." + end + generated_xcode_build_settings.map { |p| + if p[:name] == 'FLUTTER_FRAMEWORK_DIR' + symlink = File.join('.symlinks', 'flutter') + File.symlink(File.dirname(p[:path]), symlink) + pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) + end + } + + # Plugin Pods + plugin_pods = parse_KV_file('../.flutter-plugins') + plugin_pods.map { |p| + symlink = File.join('.symlinks', 'plugins', p[:name]) + File.symlink(p[:path], symlink) + pod p[:name], :path => File.join(symlink, 'ios') + } +end + +# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. +install! 'cocoapods', :disable_input_output_paths => true + +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['ENABLE_BITCODE'] = 'NO' + end + end +end diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Podfile.lock b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Podfile.lock new file mode 100644 index 0000000..97cafb8 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Podfile.lock @@ -0,0 +1,44 @@ +PODS: + - "!ProtoCompiler (3.7.0)": + - Protobuf (~> 3.0) + - Flutter (1.0.0) + - flutter_ble (0.5.1): + - "!ProtoCompiler" + - Flutter + - flutter_ble/Protos (= 0.5.1) + - flutter_ble/Protos (0.5.1): + - "!ProtoCompiler" + - Flutter + - Protobuf + - Protobuf (3.7.0) + - shared_preferences (0.0.1): + - Flutter + +DEPENDENCIES: + - Flutter (from `.symlinks/flutter/ios`) + - flutter_ble (from `.symlinks/plugins/flutter_ble/ios`) + - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - "!ProtoCompiler" + - Protobuf + +EXTERNAL SOURCES: + Flutter: + :path: ".symlinks/flutter/ios" + flutter_ble: + :path: ".symlinks/plugins/flutter_ble/ios" + shared_preferences: + :path: ".symlinks/plugins/shared_preferences/ios" + +SPEC CHECKSUMS: + "!ProtoCompiler": efc8ba4dceb16b48f6b366a08500871c8d3ff8d2 + Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a + flutter_ble: 5835e4f47597ddc12fdc6ccef9a45df28511246f + Protobuf: 7a877b7f3e5964e3fce995e2eb323dbc6831bb5a + shared_preferences: 1feebfa37bb57264736e16865e7ffae7fc99b523 + +PODFILE CHECKSUM: 7fb83752f59ead6285236625b82473f90b1cb932 + +COCOAPODS: 1.6.1 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/project.pbxproj b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f25c40d --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,581 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; + 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + CEF4E2AFCCE9458056A2FBDF /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9155B6072303629BFE98BD57 /* libPods-Runner.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0FC47F599271A0AE2AE0E72D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 9155B6072303629BFE98BD57 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 93242ACB57A231778A1F0011 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BD4D948EE35E335BCE7DC2D9 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, + CEF4E2AFCCE9458056A2FBDF /* libPods-Runner.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4233C5787CEBD4F7BB092079 /* Pods */ = { + isa = PBXGroup; + children = ( + 0FC47F599271A0AE2AE0E72D /* Pods-Runner.debug.xcconfig */, + 93242ACB57A231778A1F0011 /* Pods-Runner.release.xcconfig */, + BD4D948EE35E335BCE7DC2D9 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + 664112EFAAAF1C7519E3B709 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 9155B6072303629BFE98BD57 /* libPods-Runner.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B80C3931E831B6300D905FE /* App.framework */, + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEBA1CF902C7004384FC /* Flutter.framework */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 4233C5787CEBD4F7BB092079 /* Pods */, + 664112EFAAAF1C7519E3B709 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 97C146F21CF9000F007C117D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + AA19592D0AE26B6348B9AD90 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + B73D9724B9BC85A7BB1A6F5F /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = "The Chromium Authors"; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + AA19592D0AE26B6348B9AD90 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + B73D9724B9BC85A7BB1A6F5F /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, + 97C146F31CF9000F007C117D /* main.m in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = S8QB4VV633; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.eric.flutterBleApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.eric.flutterBleApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.eric.flutterBleApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..a28140c --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcworkspace/contents.xcworkspacedata b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/AppDelegate.h b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/AppDelegate.h new file mode 100644 index 0000000..36e21bb --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/AppDelegate.h @@ -0,0 +1,6 @@ +#import +#import + +@interface AppDelegate : FlutterAppDelegate + +@end diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/AppDelegate.m b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/AppDelegate.m new file mode 100644 index 0000000..59a72e9 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/AppDelegate.m @@ -0,0 +1,13 @@ +#include "AppDelegate.h" +#include "GeneratedPluginRegistrant.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [GeneratedPluginRegistrant registerWithRegistry:self]; + // Override point for customization after application launch. + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +@end diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..3d43d11e66f4de3da27ed045ca4fe38ad8b48094 GIT binary patch literal 11112 zcmeHN3sh5A)((b(k1DoWZSj%R+R=^`Y(b;ElB$1^R>iT7q6h&WAVr806i~>Gqn6rM z>3}bMG&oq%DIriqR35=rtEdos5L6z)YC*Xq0U-$_+Il@RaU zXYX%+``hR28`(B*uJ6G9&iz>|)PS%!)9N`7=LcmcxH}k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xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..28c6bf03016f6c994b70f38d1b7346e5831b531f GIT binary patch literal 564 zcmV-40?Yl0P)Px$?ny*JR5%f>l)FnDQ543{x%ZCiu33$Wg!pQFfT_}?5Q|_VSlIbLC`dpoMXL}9 zHfd9&47Mo(7D231gb+kjFxZHS4-m~7WurTH&doVX2KI5sU4v(sJ1@T9eCIKPjsqSr z)C01LsCxk=72-vXmX}CQD#BD;Cthymh&~=f$Q8nn0J<}ZrusBy4PvRNE}+1ceuj8u z0mW5k8fmgeLnTbWHGwfKA3@PdZxhn|PypR&^p?weGftrtCbjF#+zk_5BJh7;0`#Wr zgDpM_;Ax{jO##IrT`Oz;MvfwGfV$zD#c2xckpcXC6oou4ML~ezCc2EtnsQTB4tWNg z?4bkf;hG7IMfhgNI(FV5Gs4|*GyMTIY0$B=_*mso9Ityq$m^S>15>-?0(zQ<8Qy<_TjHE33(?_M8oaM zyc;NxzRVK@DL6RJnX%U^xW0Gpg(lXp(!uK1v0YgHjs^ZXSQ|m#lV7ip7{`C_J2TxPmfw%h$|%acrYHt)Re^PB%O&&=~a zhS(%I#+V>J-vjIib^<+s%ludY7y^C(P8nmqn9fp!i+?vr`bziDE=bx`%2W#Xyrj|i z!XQ4v1%L`m{7KT7q+LZNB^h8Ha2e=`Wp65^0;J00)_^G=au=8Yo;1b`CV&@#=jIBo zjN^JNVfYSs)+kDdGe7`1&8!?MQYKS?DuHZf3iogk_%#9E|5S zWeHrmAo>P;ejX7mwq#*}W25m^ZI+{(Z8fI?4jM_fffY0nok=+88^|*_DwcW>mR#e+ zX$F_KMdb6sRz!~7KkyN0G(3XQ+;z3X%PZ4gh;n-%62U<*VUKNv(D&Q->Na@Xb&u5Q3`3DGf+a8O5x7c#7+R+EAYl@R5us)CIw z7sT@_y~Ao@uL#&^LIh&QceqiT^+lb0YbFZt_SHOtWA%mgPEKVNvVgCsXy{5+zl*X8 zCJe)Q@y>wH^>l4;h1l^Y*9%-23TSmE>q5nI@?mt%n;Sj4Qq`Z+ib)a*a^cJc%E9^J zB;4s+K@rARbcBLT5P=@r;IVnBMKvT*)ew*R;&8vu%?Z&S>s?8?)3*YawM0P4!q$Kv zMmKh3lgE~&w&v%wVzH3Oe=jeNT=n@Y6J6TdHWTjXfX~-=1A1Bw`EW8rn}MqeI34nh zexFeA?&C3B2(E?0{drE@DA2pu(A#ElY&6el60Rn|Qpn-FkfQ8M93AfWIr)drgDFEU zghdWK)^71EWCP(@(=c4kfH1Y(4iugD4fve6;nSUpLT%!)MUHs1!zJYy4y||C+SwQ! z)KM&$7_tyM`sljP2fz6&Z;jxRn{Wup8IOUx8D4uh&(=O zx-7$a;U><*5L^!%xRlw)vAbh;sdlR||& ze}8_8%)c2Fwy=F&H|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}JeGuMZk~LPi7{cidvUGB zAJ4LVeNV%XO>LTrklB#^-;8nb;}6l;1oW&WS=Mz*Az!4cqqQzbOSFq`$Q%PfD7srM zpKgP-D_0XPTRX*hAqeq0TDkJ;5HB1%$3Np)99#16c{ zJImlNL(npL!W|Gr_kxl1GVmF5&^$^YherS7+~q$p zt}{a=*RiD2Ikv6o=IM1kgc7zqpaZ;OB)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..f091b6b0bca859a3f474b03065bef75ba58a9e4c GIT binary patch literal 1588 zcmV-42Fv-0P)C1SqPt}wig>|5Crh^=oyX$BK<}M8eLU3e2hGT;=G|!_SP)7zNI6fqUMB=)y zRAZ>eDe#*r`yDAVgB_R*LB*MAc)8(b{g{9McCXW!lq7r(btRoB9!8B-#AI6JMb~YFBEvdsV)`mEQO^&#eRKx@b&x- z5lZm*!WfD8oCLzfHGz#u7sT0^VLMI1MqGxF^v+`4YYnVYgk*=kU?HsSz{v({E3lb9 z>+xILjBN)t6`=g~IBOelGQ(O990@BfXf(DRI5I$qN$0Gkz-FSc$3a+2fX$AedL4u{ z4V+5Ong(9LiGcIKW?_352sR;LtDPmPJXI{YtT=O8=76o9;*n%_m|xo!i>7$IrZ-{l z-x3`7M}qzHsPV@$v#>H-TpjDh2UE$9g6sysUREDy_R(a)>=eHw-WAyfIN z*qb!_hW>G)Tu8nSw9yn#3wFMiLcfc4pY0ek1}8(NqkBR@t4{~oC>ryc-h_ByH(Cg5 z>ao-}771+xE3um9lWAY1FeQFxowa1(!J(;Jg*wrg!=6FdRX+t_<%z&d&?|Bn){>zm zZQj(aA_HeBY&OC^jj*)N`8fa^ePOU72VpInJoI1?`ty#lvlNzs(&MZX+R%2xS~5Kh zX*|AU4QE#~SgPzOXe9>tRj>hjU@c1k5Y_mW*Jp3fI;)1&g3j|zDgC+}2Q_v%YfDax z!?umcN^n}KYQ|a$Lr+51Nf9dkkYFSjZZjkma$0KOj+;aQ&721~t7QUKx61J3(P4P1 zstI~7-wOACnWP4=8oGOwz%vNDqD8w&Q`qcNGGrbbf&0s9L0De{4{mRS?o0MU+nR_! zrvshUau0G^DeMhM_v{5BuLjb#Hh@r23lDAk8oF(C+P0rsBpv85EP>4CVMx#04MOfG z;P%vktHcXwTj~+IE(~px)3*MY77e}p#|c>TD?sMatC0Tu4iKKJ0(X8jxQY*gYtxsC z(z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perature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d0ef06e7edb86cdfe0d15b4b0d98334a86163658 GIT binary patch literal 1716 zcmds$`#;kQ7{|XelZftyR5~xW7?MLxS4^|Hw3&P7^y)@A9Fj{Xm1~_CIV^XZ%SLBn zA;!r`GqGHg=7>xrB{?psZQs88ZaedDoagm^KF{a*>G|dJWRSe^I$DNW008I^+;Kjt z>9p3GNR^I;v>5_`+91i(*G;u5|L+Bu6M=(afLjtkya#yZ175|z$pU~>2#^Z_pCZ7o z1c6UNcv2B3?; zX%qdxCXQpdKRz=#b*q0P%b&o)5ZrNZt7$fiETSK_VaY=mb4GK`#~0K#~9^ zcY!`#Af+4h?UMR-gMKOmpuYeN5P*RKF!(tb`)oe0j2BH1l?=>y#S5pMqkx6i{*=V9JF%>N8`ewGhRE(|WohnD59R^$_36{4>S zDFlPC5|k?;SPsDo87!B{6*7eqmMdU|QZ84>6)Kd9wNfh90=y=TFQay-0__>=<4pk& zYDjgIhL-jQ9o>z32K)BgAH+HxamL{ZL~ozu)Qqe@a`FpH=oQRA8=L-m-1dam(Ix2V z?du;LdMO+ooBelr^_y4{|44tmgH^2hSzPFd;U^!1p>6d|o)(-01z{i&Kj@)z-yfWQ)V#3Uo!_U}q3u`(fOs`_f^ueFii1xBNUB z6MecwJN$CqV&vhc+)b(p4NzGGEgwWNs z@*lUV6LaduZH)4_g!cE<2G6#+hJrWd5(|p1Z;YJ7ifVHv+n49btR}dq?HHDjl{m$T z!jLZcGkb&XS2OG~u%&R$(X+Z`CWec%QKt>NGYvd5g20)PU(dOn^7%@6kQb}C(%=vr z{?RP(z~C9DPnL{q^@pVw@|Vx~@3v!9dCaBtbh2EdtoNHm4kGxp>i#ct)7p|$QJ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ER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c8f9ed8f5cee1c98386d13b17e89f719e83555b2 GIT binary patch literal 1895 zcmV-t2blPYP)FQtfgmafE#=YDCq`qUBt#QpG%*H6QHY765~R=q zZ6iudfM}q!Pz#~9JgOi8QJ|DSu?1-*(kSi1K4#~5?#|rh?sS)(-JQqX*}ciXJ56_H zdw=^s_srbAdqxlvGyrgGet#6T7_|j;95sL%MtM;q86vOxKM$f#puR)Bjv9Zvz9-di zXOTSsZkM83)E9PYBXC<$6(|>lNLVBb&&6y{NByFCp%6+^ALR@NCTse_wqvNmSWI-m z!$%KlHFH2omF!>#%1l3LTZg(s7eof$7*xB)ZQ0h?ejh?Ta9fDv59+u#MokW+1t8Zb zgHv%K(u9G^Lv`lh#f3<6!JVTL3(dCpxHbnbA;kKqQyd1~^Xe0VIaYBSWm6nsr;dFj z4;G-RyL?cYgsN1{L4ZFFNa;8)Rv0fM0C(~Tkit94 zz#~A)59?QjD&pAPSEQ)p8gP|DS{ng)j=2ux)_EzzJ773GmQ_Cic%3JJhC0t2cx>|v zJcVusIB!%F90{+}8hG3QU4KNeKmK%T>mN57NnCZ^56=0?&3@!j>a>B43pi{!u z7JyDj7`6d)qVp^R=%j>UIY6f+3`+qzIc!Y_=+uN^3BYV|o+$vGo-j-Wm<10%A=(Yk^beI{t%ld@yhKjq0iNjqN4XMGgQtbKubPM$JWBz}YA65k%dm*awtC^+f;a-x4+ddbH^7iDWGg&N0n#MW{kA|=8iMUiFYvMoDY@sPC#t$55gn6ykUTPAr`a@!(;np824>2xJthS z*ZdmT`g5-`BuJs`0LVhz+D9NNa3<=6m;cQLaF?tCv8)zcRSh66*Z|vXhG@$I%U~2l z?`Q zykI#*+rQ=z6Jm=Bui-SfpDYLA=|vzGE(dYm=OC8XM&MDo7ux4UF1~0J1+i%aCUpRe zt3L_uNyQ*cE(38Uy03H%I*)*Bh=Lb^Xj3?I^Hnbeq72(EOK^Y93CNp*uAA{5Lc=ky zx=~RKa4{iTm{_>_vSCm?$Ej=i6@=m%@VvAITnigVg{&@!7CDgs908761meDK5azA} z4?=NOH|PdvabgJ&fW2{Mo$Q0CcD8Qc84%{JPYt5EiG{MdLIAeX%T=D7NIP4%Hw}p9 zg)==!2Lbp#j{u_}hMiao9=!VSyx0gHbeCS`;q&vzeq|fs`y&^X-lso(Ls@-706qmA z7u*T5PMo_w3{se1t2`zWeO^hOvTsohG_;>J0wVqVe+n)AbQCx)yh9;w+J6?NF5Lmo zecS@ieAKL8%bVd@+-KT{yI|S}O>pYckUFs;ry9Ow$CD@ztz5K-*D$^{i(_1llhSh^ zEkL$}tsQt5>QA^;QgjgIfBDmcOgi5YDyu?t6vSnbp=1+@6D& z5MJ}B8q;bRlVoxasyhcUF1+)o`&3r0colr}QJ3hcSdLu;9;td>kf@Tcn<@9sIx&=m z;AD;SCh95=&p;$r{Xz3iWCO^MX83AGJ(yH&eTXgv|0=34#-&WAmw{)U7OU9!Wz^!7 zZ%jZFi@JR;>Mhi7S>V7wQ176|FdW2m?&`qa(ScO^CFPR80HucLHOTy%5s*HR0^8)i h0WYBP*#0Ks^FNSabJA*5${_#%002ovPDHLkV1oKhTl@e3 literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22 GIT binary patch literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`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XJnxajt0K%3M6Bd&YFNy9}tWG^aovK2eX z1aL1%7;KRDrA@eG-Wr6w+;*H_VD~qLiVI`{_;>o)k`{8xa3EJT1O_>#iy_?va0eR? zDV=N%;Zjb%Z2s$@O>w@iqt!I}tLjGk!=p`D23I}N4Be@$(|iSA zf3Ih7b<{zqpDB4WF_5X1(peKe+rASze%u8eKLn#KKXt;UZ+Adf$_TO+vTqshLLJ5c z52HucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22 GIT binary patch literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`sk6!QYtBa ztlZI#nu$8lJ^q2Z79UTgZe>BU73(Aospiq+?SdMt8lDZ;*?@tyWVZVS_Q7S&*tJaiRlJ z+aSMOmbg3@h5}v;A*c8SbqM3icg-`Cnwl;7Ts%A1RkNIp+Txl-Ckkvg4oxrqGA5ewEgYqwtECD<_3Egu)xGllKt&J8g&+=ac@Jq4-?w6M3b*>w5 z69N3O%=I^6&UL5gZ!}trC7bU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ucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..75b2d164a5a98e212cca15ea7bf2ab5de5108680 GIT binary patch literal 3831 zcmVjJBgitF5mAp-i>4+KS_oR{|13AP->1TD4=w)g|)JHOx|a2Wk1Va z!k)vP$UcQ#mdj%wNQoaJ!w>jv_6&JPyutpQps?s5dmDQ>`%?Bvj>o<%kYG!YW6H-z zu`g$@mp`;qDR!51QaS}|ZToSuAGcJ7$2HF0z`ln4t!#Yg46>;vGG9N9{V@9z#}6v* zfP?}r6b{*-C*)(S>NECI_E~{QYzN5SXRmVnP<=gzP+_Sp(Aza_hKlZ{C1D&l*(7IKXxQC1Z9#6wx}YrGcn~g%;icdw>T0Rf^w0{ z$_wn1J+C0@!jCV<%Go5LA45e{5gY9PvZp8uM$=1}XDI+9m7!A95L>q>>oe0$nC->i zeexUIvq%Uk<-$>DiDb?!In)lAmtuMWxvWlk`2>4lNuhSsjAf2*2tjT`y;@d}($o)S zn(+W&hJ1p0xy@oxP%AM15->wPLp{H!k)BdBD$toBpJh+crWdsNV)qsHaqLg2_s|Ih z`8E9z{E3sA!}5aKu?T!#enD(wLw?IT?k-yWVHZ8Akz4k5(TZJN^zZgm&zM28sfTD2BYJ|Fde3Xzh;;S` z=GXTnY4Xc)8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=O zKCNsxsgt@|&nKMC=*+ZqmLHhX1KHbAJs{nGVMs6~TiF%Q)P@>!koa$%oS zjXa=!5>P`vC-a}ln!uH1ooeI&v?=?v7?1n~P(wZ~0>xWxd_Aw;+}9#eULM7M8&E?Y zC-ZLhi3RoM92SXUb-5i-Lmt5_rfjE{6y^+24`y$1lywLyHO!)Boa7438K4#iLe?rh z2O~YGSgFUBH?og*6=r9rme=peP~ah`(8Zt7V)j5!V0KPFf_mebo3z95U8(up$-+EA^9dTRLq>Yl)YMBuch9%=e5B`Vnb>o zt03=kq;k2TgGe4|lGne&zJa~h(UGutjP_zr?a7~#b)@15XNA>Dj(m=gg2Q5V4-$)D|Q9}R#002ovPDHLkV1o7DH3k3x literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..c4df70d39da7941ef3f6dcb7f06a192d8dcb308d GIT binary patch literal 1888 zcmV-m2cP(fP)x~L`~4d)Rspd&<9kFh{hn*KP1LP0~$;u(LfAu zp%fx&qLBcRHx$G|3q(bv@+b;o0*D|jwD-Q9uQR(l*ST}s+uPgQ-MeFwZ#GS?b332? z&Tk$&_miXn3IGq)AmQ)3sisq{raD4(k*bHvpCe-TdWq^NRTEVM)i9xbgQ&ccnUVx* zEY%vS%gDcSg=!tuIK8$Th2_((_h^+7;R|G{n06&O2#6%LK`a}n?h_fL18btz<@lFG za}xS}u?#DBMB> zw^b($1Z)`9G?eP95EKi&$eOy@K%h;ryrR3la%;>|o*>CgB(s>dDcNOXg}CK9SPmD? zmr-s{0wRmxUnbDrYfRvnZ@d z6johZ2sMX{YkGSKWd}m|@V7`Degt-43=2M?+jR%8{(H$&MLLmS;-|JxnX2pnz;el1jsvqQz}p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ry>MIPWL> iW8Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Base.lproj/Main.storyboard b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Info.plist b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Info.plist new file mode 100644 index 0000000..82dc4d0 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + flutter_ble_app + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/main.m b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/main.m new file mode 100644 index 0000000..dff6597 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/ios/Runner/main.m @@ -0,0 +1,9 @@ +#import +#import +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/lib/main.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/lib/main.dart new file mode 100644 index 0000000..a644c65 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/lib/main.dart @@ -0,0 +1,483 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert' show utf8; + +import 'package:flutter/material.dart'; +import 'package:flutter_ble/flutter_ble.dart'; +import 'package:flutter_ble_app/widgets.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +void main() { + runApp(new FlutterBleApp()); +} + +class FlutterBleApp extends StatefulWidget { + FlutterBleApp({Key key, this.title}) : super(key: key); + + final String title; + + @override + _FlutterBleAppState createState() => new _FlutterBleAppState(); +} + +class _FlutterBleAppState extends State { + Future _prefs = SharedPreferences.getInstance(); + FlutterBle _flutterBlue = FlutterBle.instance; + + /// Scanning + StreamSubscription _scanSubscription; + Map scanResults = new Map(); + bool isScanning = false; + + /// State + StreamSubscription _stateSubscription; + BluetoothState state = BluetoothState.unknown; + + /// Device + BluetoothDevice device; + + bool get isConnected => (device != null); + StreamSubscription deviceConnection; + StreamSubscription deviceStateSubscription; + List services = new List(); + Map valueChangedSubscriptions = {}; + BluetoothDeviceState deviceState = BluetoothDeviceState.disconnected; + + static const String CHARACTERISTIC_UUID = + "beb5483e-36e1-4688-b7f5-ea07361b26a8"; + static const String kMYDEVICE = "myDevice"; + String _myDeviceId; + String _temperature = "?"; + String _humidity = "?"; + + @override + void initState() { + super.initState(); + // Immediately get the state of FlutterBle + _flutterBlue.state.then((s) { + setState(() { + state = s; + }); + }); + // Subscribe to state changes + _stateSubscription = _flutterBlue.onStateChanged().listen((s) { + setState(() { + state = s; + }); + }); + + _loadMyDeviceId(); + } + + _loadMyDeviceId() async { + SharedPreferences prefs = await _prefs; + _myDeviceId = prefs.getString(kMYDEVICE) ?? ""; + print("_myDeviceId : " + _myDeviceId); + + if (_myDeviceId.isNotEmpty) { + _startScan(); + } + } + + @override + void dispose() { + _stateSubscription?.cancel(); + _stateSubscription = null; + _scanSubscription?.cancel(); + _scanSubscription = null; + deviceConnection?.cancel(); + deviceConnection = null; + super.dispose(); + } + + _startScan() { + _scanSubscription = _flutterBlue + .scan( + timeout: const Duration(seconds: 5), + /*withServices: [ + new Guid('0000180F-0000-1000-8000-00805F9B34FB') + ]*/ + ) + .listen((scanResult) { +// print('localName: ${scanResult.advertisementData.localName}'); +// print( +// 'manufacturerData: ${scanResult.advertisementData.manufacturerData}'); +// print('serviceData: ${scanResult.advertisementData.serviceData}'); + + if (_myDeviceId == scanResult.device.id.toString()) { + _stopScan(); + _connect(scanResult.device); + } + + setState(() { + scanResults[scanResult.device.id] = scanResult; + }); + }, onDone: _stopScan); + + setState(() { + isScanning = true; + }); + } + + _stopScan() { + _scanSubscription?.cancel(); + _scanSubscription = null; + setState(() { + isScanning = false; + }); + } + + _connect(BluetoothDevice d) async { + device = d; + // Connect to device + deviceConnection = _flutterBlue + .connect(device, timeout: const Duration(seconds: 4)) + .listen( + null, + onDone: _disconnect, + ); + + // Update the connection state immediately + device.state.then((s) { + setState(() { + deviceState = s; + }); + }); + + // Subscribe to connection changes + deviceStateSubscription = device.onStateChanged().listen((s) { + setState(() { + deviceState = s; + }); + if (s == BluetoothDeviceState.connected) { + device.discoverServices().then((s) { + setState(() { + services = s; + + print("*** device.id : ${device.id.toString()}"); + + _restoreDeviceId(device.id.toString()); + _TurnOnCharacterService(); + }); + }); + } + }); + } + + _disconnect() { + // Remove all value changed listeners + valueChangedSubscriptions.forEach((uuid, sub) => sub.cancel()); + valueChangedSubscriptions.clear(); + deviceStateSubscription?.cancel(); + deviceStateSubscription = null; + deviceConnection?.cancel(); + deviceConnection = null; + setState(() { + device = null; + }); + } + + _readCharacteristic(BluetoothCharacteristic c) async { + await device.readCharacteristic(c); + setState(() {}); + } + + _writeCharacteristic(BluetoothCharacteristic c) async { + await device.writeCharacteristic(c, [0x12, 0x34], + type: CharacteristicWriteType.withResponse); + setState(() {}); + } + + _readDescriptor(BluetoothDescriptor d) async { + await device.readDescriptor(d); + setState(() {}); + } + + _writeDescriptor(BluetoothDescriptor d) async { + await device.writeDescriptor(d, [0x12, 0x34]); + setState(() {}); + } + + _setNotification(BluetoothCharacteristic c) async { + if (c.isNotifying) { + await device.setNotifyValue(c, false); + // Cancel subscription + valueChangedSubscriptions[c.uuid]?.cancel(); + valueChangedSubscriptions.remove(c.uuid); + } else { + await device.setNotifyValue(c, true); + // ignore: cancel_subscriptions + final sub = device.onValueChanged(c).listen((d) { + final decoded = utf8.decode(d); + _DataParser(decoded); + +// setState(() { +// print('onValueChanged $d'); +// }); + }); + // Add to map + valueChangedSubscriptions[c.uuid] = sub; + } + setState(() {}); + } + + _refreshDeviceState(BluetoothDevice d) async { + var state = await d.state; + setState(() { + deviceState = state; + print('State refreshed: $deviceState'); + }); + } + + _buildScanningButton() { + if (isConnected || state != BluetoothState.on) { + return null; + } + if (isScanning) { + return new FloatingActionButton( + child: new Icon(Icons.stop), + onPressed: _stopScan, + backgroundColor: Colors.red, + ); + } else { + return new FloatingActionButton( + child: new Icon(Icons.search), onPressed: _startScan); + } + } + + _buildScanResultTiles() { + return scanResults.values + .map((r) => ScanResultTile( + result: r, + onTap: () => _connect(r.device), + )) + .toList(); + } + + List _buildServiceTiles() { + return services + .map( + (s) => new ServiceTile( + service: s, + characteristicTiles: s.characteristics + .map( + (c) => new CharacteristicTile( + characteristic: c, + onReadPressed: () => _readCharacteristic(c), + onWritePressed: () => _writeCharacteristic(c), + onNotificationPressed: () => _setNotification(c), + descriptorTiles: c.descriptors + .map( + (d) => new DescriptorTile( + descriptor: d, + onReadPressed: () => _readDescriptor(d), + onWritePressed: () => _writeDescriptor(d), + ), + ) + .toList(), + ), + ) + .toList(), + ), + ) + .toList(); + } + + _buildActionButtons() { + if (isConnected) { + return [ + new IconButton( + icon: const Icon(Icons.cancel), + onPressed: () => _disconnect(), + ) + ]; + } + } + + _buildAlertTile() { + return new Container( + color: Colors.redAccent, + child: new ListTile( + title: new Text( + 'Bluetooth adapter is ${state.toString().substring(15)}', + style: Theme.of(context).primaryTextTheme.subhead, + ), + trailing: new Icon( + Icons.error, + color: Theme.of(context).primaryTextTheme.subhead.color, + ), + ), + ); + } + + _buildDeviceStateTile() { + return new ListTile( + leading: (deviceState == BluetoothDeviceState.connected) + ? const Icon(Icons.bluetooth_connected) + : const Icon(Icons.bluetooth_disabled), + title: new Text('Device is ${deviceState.toString().split('.')[1]}.'), + subtitle: new Text('${device.id}'), + trailing: new IconButton( + icon: const Icon(Icons.refresh), + onPressed: () => _refreshDeviceState(device), + color: Theme.of(context).iconTheme.color.withOpacity(0.5), + )); + } + + _buildProgressBarTile() { + return new LinearProgressIndicator(); + } + + @override + Widget build(BuildContext context) { + var tiles = new List(); + if (state != BluetoothState.on) { + tiles.add(_buildAlertTile()); + } + if (isConnected) { +// tiles.add(_buildDeviceStateTile()); +// tiles.addAll(_buildServiceTiles()); + } else { + tiles.addAll(_buildScanResultTiles()); + } + return new MaterialApp( + debugShowCheckedModeBanner: false, + home: new Scaffold( + appBar: new AppBar( + title: const Text('ESP32 MY DHT APP'), + actions: _buildActionButtons(), + backgroundColor: Colors.blueGrey, + centerTitle: true, + ), + backgroundColor: Colors.red, + floatingActionButton: _buildScanningButton(), + body: new Stack( + children: [ + (isScanning) ? _buildProgressBarTile() : new Container(), + isConnected + ? _bulldMyWidget() + : new ListView( + children: tiles, + ) + ], + ), + ), + ); + } + + Future _restoreDeviceId(String id) async { + final SharedPreferences prefs = await _prefs; + prefs.setString(kMYDEVICE, id); + } + + _TurnOnCharacterService() { + services.forEach((service) { + service.characteristics.forEach((character) { + if (character.uuid.toString() == CHARACTERISTIC_UUID) { + _setNotification(character); + } + }); + }); + } + + _bulldMyWidget() { + return Center( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Card( + child: Container( + width: 150, + height: 200, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 10, + ), + Container( + width: 100, + height: 100, + child: Image.asset('images/temperature.png'), + ), + SizedBox( + height: 10, + ), + Text( + "Temperature", + style: TextStyle(fontWeight: FontWeight.bold), + ), + Expanded( + child: Container(), + ), + Text( + _temperature, + style: TextStyle(fontSize: 30), + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ), + Card( + child: Container( + width: 150, + height: 200, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 10, + ), + Container( + width: 100, + height: 100, + child: Image.asset('images/humidity.png'), + ), + SizedBox( + height: 10, + ), + Text( + "Humidity", + style: TextStyle(fontWeight: FontWeight.bold), + ), + Expanded( + child: Container(), + ), + Text( + _humidity, + style: TextStyle(fontSize: 30), + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ) + ], + ), + ); + } + + _DataParser(String data) { + if (data.isNotEmpty) { + var tempValue = data.split(",")[0]; + var humidityValue = data.split(",")[1]; + + print("tempValue: ${tempValue}"); + print("humidityValue: ${humidityValue}"); + + setState(() { + _temperature = tempValue + "'C"; + _humidity = humidityValue + "%"; + }); + } + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/lib/widgets.dart b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/lib/widgets.dart new file mode 100644 index 0000000..1071143 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/lib/widgets.dart @@ -0,0 +1,280 @@ +// Copyright 2017, Paul DeMarco. +// All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:flutter_ble/flutter_ble.dart'; + +class ScanResultTile extends StatelessWidget { + const ScanResultTile({Key key, this.result, this.onTap}) : super(key: key); + + final ScanResult result; + final VoidCallback onTap; + + Widget _buildTitle(BuildContext context) { + if (result.device.name.length > 0) { + return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(result.device.name), + Text( + result.device.id.toString(), + style: Theme.of(context).textTheme.caption, + ) + ], + ); + } else { + return Text(result.device.id.toString()); + } + } + + Widget _buildAdvRow(BuildContext context, String title, String value) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 4.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(title, style: Theme.of(context).textTheme.caption), + SizedBox( + width: 12.0, + ), + Expanded( + child: Text( + value, + style: Theme.of(context) + .textTheme + .caption + .apply(color: Colors.black), + softWrap: true, + ), + ), + ], + ), + ); + } + + String getNiceHexArray(List bytes) { + return '[${bytes.map((i) => i.toRadixString(16).padLeft(2, '0')).join(', ')}]' + .toUpperCase(); + } + + String getNiceManufacturerData(Map> data) { + if (data.isEmpty) { + return null; + } + List res = []; + data.forEach((id, bytes) { + res.add( + '${id.toRadixString(16).toUpperCase()}: ${getNiceHexArray(bytes)}'); + }); + return res.join(', '); + } + + String getNiceServiceData(Map> data) { + if (data.isEmpty) { + return null; + } + List res = []; + data.forEach((id, bytes) { + res.add('${id.toUpperCase()}: ${getNiceHexArray(bytes)}'); + }); + return res.join(', '); + } + + @override + Widget build(BuildContext context) { + return ExpansionTile( + title: _buildTitle(context), + leading: Text(result.rssi.toString()), + trailing: RaisedButton( + child: Text('CONNECT'), + color: Colors.black, + textColor: Colors.white, + onPressed: (result.advertisementData.connectable) ? onTap : null, + ), + children: [ + _buildAdvRow( + context, 'Complete Local Name', result.advertisementData.localName), + _buildAdvRow(context, 'Tx Power Level', + '${result.advertisementData.txPowerLevel ?? 'N/A'}'), + _buildAdvRow( + context, + 'Manufacturer Data', + getNiceManufacturerData( + result.advertisementData.manufacturerData) ?? + 'N/A'), + _buildAdvRow( + context, + 'Service UUIDs', + (result.advertisementData.serviceUuids.isNotEmpty) + ? result.advertisementData.serviceUuids.join(', ').toUpperCase() + : 'N/A'), + _buildAdvRow(context, 'Service Data', + getNiceServiceData(result.advertisementData.serviceData) ?? 'N/A'), + ], + ); + } +} + +class ServiceTile extends StatelessWidget { + final BluetoothService service; + final List characteristicTiles; + + const ServiceTile({Key key, this.service, this.characteristicTiles}) + : super(key: key); + + @override + Widget build(BuildContext context) { + if (characteristicTiles.length > 0) { + return new ExpansionTile( + title: new Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Service'), + new Text( + '0x${service.uuid.toString().toUpperCase().substring(4, 8)}', + style: Theme.of(context) + .textTheme + .body1 + .copyWith(color: Theme.of(context).textTheme.caption.color)) + ], + ), + children: characteristicTiles, + ); + } else { + return new ListTile( + title: const Text('Service'), + subtitle: new Text( + '0x${service.uuid.toString().toUpperCase().substring(4, 8)}'), + ); + } + } +} + +class CharacteristicTile extends StatelessWidget { + final BluetoothCharacteristic characteristic; + final List descriptorTiles; + final VoidCallback onReadPressed; + final VoidCallback onWritePressed; + final VoidCallback onNotificationPressed; + + const CharacteristicTile( + {Key key, + this.characteristic, + this.descriptorTiles, + this.onReadPressed, + this.onWritePressed, + this.onNotificationPressed}) + : super(key: key); + + @override + Widget build(BuildContext context) { + var actions = new Row( + mainAxisSize: MainAxisSize.min, + children: [ + new IconButton( + icon: new Icon( + Icons.file_download, + color: Theme.of(context).iconTheme.color.withOpacity(0.5), + ), + onPressed: onReadPressed, + ), + new IconButton( + icon: new Icon(Icons.file_upload, + color: Theme.of(context).iconTheme.color.withOpacity(0.5)), + onPressed: onWritePressed, + ), + new IconButton( + icon: new Icon( + characteristic.isNotifying ? Icons.sync_disabled : Icons.sync, + color: Theme.of(context).iconTheme.color.withOpacity(0.5)), + onPressed: onNotificationPressed, + ) + ], + ); + + var title = new Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Characteristic'), + new Text( + '0x${characteristic.uuid.toString().toUpperCase().substring(4, 8)}', + style: Theme.of(context) + .textTheme + .body1 + .copyWith(color: Theme.of(context).textTheme.caption.color)) + ], + ); + + if (descriptorTiles.length > 0) { + return new ExpansionTile( + title: new ListTile( + title: title, + subtitle: new Text(characteristic.value.toString()), + contentPadding: EdgeInsets.all(0.0), + ), + trailing: actions, + children: descriptorTiles, + ); + } else { + return new ListTile( + title: title, + subtitle: new Text(characteristic.value.toString()), + trailing: actions, + ); + } + } +} + +class DescriptorTile extends StatelessWidget { + final BluetoothDescriptor descriptor; + final VoidCallback onReadPressed; + final VoidCallback onWritePressed; + + const DescriptorTile( + {Key key, this.descriptor, this.onReadPressed, this.onWritePressed}) + : super(key: key); + + @override + Widget build(BuildContext context) { + var title = new Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text('Descriptor'), + new Text( + '0x${descriptor.uuid.toString().toUpperCase().substring(4, 8)}', + style: Theme.of(context) + .textTheme + .body1 + .copyWith(color: Theme.of(context).textTheme.caption.color)) + ], + ); + return new ListTile( + title: title, + subtitle: new Text(descriptor.value.toString()), + trailing: new Row( + mainAxisSize: MainAxisSize.min, + children: [ + new IconButton( + icon: new Icon( + Icons.file_download, + color: Theme.of(context).iconTheme.color.withOpacity(0.5), + ), + onPressed: onReadPressed, + ), + new IconButton( + icon: new Icon( + Icons.file_upload, + color: Theme.of(context).iconTheme.color.withOpacity(0.5), + ), + onPressed: onWritePressed, + ) + ], + ), + ); + } +} diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/pubspec.lock b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/pubspec.lock new file mode 100644 index 0000000..efc41f3 --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/pubspec.lock @@ -0,0 +1,182 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.9" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_ble: + dependency: "direct main" + description: + path: flutter_ble-master + relative: true + source: path + version: "0.5.1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.2" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0+1" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.15" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.3+2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.5" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.5" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" +sdks: + dart: ">=2.2.2 <3.0.0" + flutter: ">=1.5.0 <2.0.0" diff --git a/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/pubspec.yaml b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/pubspec.yaml new file mode 100644 index 0000000..fdec06c --- /dev/null +++ b/Esp32_temperature_humidity_ble_FLUTTER/flutter_ble_app/pubspec.yaml @@ -0,0 +1,75 @@ +name: flutter_ble_app +description: A new Flutter application. + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.1.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^0.1.2 + shared_preferences: ^0.5.3+2 + flutter_ble: + path: ./flutter_ble-master + +dev_dependencies: + flutter_test: + sdk: flutter + + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + assets: + - images/humidity.png + - images/temperature.png + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages