flutter_reactive_ble icon indicating copy to clipboard operation
flutter_reactive_ble copied to clipboard

Implement Linux support

Open robert-ancell opened this issue 4 years ago • 8 comments

https://github.com/PhilipsHue/flutter_reactive_ble/issues/246

robert-ancell avatar Aug 25 '21 05:08 robert-ancell

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.

robert-ancell avatar Aug 25 '21 05:08 robert-ancell

This builds on the old PR https://github.com/PhilipsHue/flutter_reactive_ble/pull/245 pre-federation.

robert-ancell avatar Aug 25 '21 05:08 robert-ancell

Our preference is option 1 - keep the plugin in the flutter_reactive_ble repository, thanks!

robert-ancell avatar Aug 31 '21 04:08 robert-ancell

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.

robert-ancell avatar Nov 03 '21 03:11 robert-ancell

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 :)

remonh87 avatar Nov 03 '21 05:11 remonh87

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?

MoralCode avatar Aug 28 '23 17:08 MoralCode

  • ``

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?

@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?

jwinarske avatar Nov 04 '23 17:11 jwinarske

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.

MoralCode avatar Nov 04 '23 17:11 MoralCode