flutter_reactive_ble
flutter_reactive_ble copied to clipboard
Implement Linux support
https://github.com/PhilipsHue/flutter_reactive_ble/issues/246
This branch isn't 100% there, but probably a good time for a review! @remonh87
Some issues I encountered:
- In the example program, if you discover new devices with BlueZ, then try and connect to them they are no longer available. It seems the BlueZ technique is to enable discovery and then connect during the discovery phase. Paired devices are always available.
- We can't currently subscribe to notifications, this requires more work in dbus.dart.
This builds on the old PR https://github.com/PhilipsHue/flutter_reactive_ble/pull/245 pre-federation.
Our preference is option 1 - keep the plugin in the flutter_reactive_ble repository, thanks!
Now builds in CI, licensing updated.
Outstanding:
- Currently doesn't have any tests.
- No specific Linux documentation added - I'm not sure what to write for these? You shouldn't need any specific actions to make this work, it will just work if BlueZ is present on the system.
Now builds in CI, licensing updated.
Outstanding:
- Currently doesn't have any tests.
- No specific Linux documentation added - I'm not sure what to write for these? You shouldn't need any specific actions to make this work, it will just work if BlueZ is present on the system.
Great progress awesome! About the docs: I was thinking if there were some specific instructions needed to run it besides starting the app on your linux machine. If there aren't then no need to add it :)
I'm able to run the example app provided, however i seem to be having issues running it in my own application that already uses flutter_reactive_ble. I seem to be seeing the errors:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method initialize on channel flutter_reactive_ble_method)[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method c on channel flutter_reactive_ble_method)
when starting to scan for devices. Bluez appears to be installed on my system and i have made sure that my linux platform directory matches the one from the example (most changes seem to be comments though). Is there something i'm missing?
- ``
when starting to scan for devices.
Bluezappears to be installed on my system and i have made sure that mylinuxplatform directory matches the one from the example (most changes seem to be comments though). Is there something i'm missing?
@MoralCode It works fine for me on desktop and device. Does it work in debug, or issue is limted to AOT?
@remonh87 is this going to get merged? What's the holdup?
It works fine for me on desktop and device. Does it work in debug, or issue is limted to AOT?
I was most likely running it in debug mode when i posted my previous comments. I dont remember there being a difference between running via hot reload (which i assume is what you mean by AOT) vs doing a full build and run. I'm in the process of polishing the code up and making it open source, so I'll likely be working on a branch with my actual code sometime soon.