Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Linux support #347

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

robert-ancell
Copy link
Contributor

@robert-ancell
Copy link
Contributor Author

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
Copy link
Contributor Author

This builds on the old PR #245 pre-federation.

Copy link
Contributor

@remonh87 remonh87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robert-ancell Thanks for this PR!! I really like the fact that the native platform support is in a separate plugin because we lack the knowledge about the linux BLE stack. That said it made me think about some things:

  • How are we going to do the maintenance and release of the plugin? I can see two approaches:
    - we go for this approach and make you contributor to this repo and make it official part of the repo or..
    - The advantage of the federated structure is that you can keep full control of the linux plugin and we treat it as an non endorsed plugin. Which we will fully promote and add our example app and docs.

Let me know what you prefer.

I set the pr to request changes because:

  • it is not finished (see previous comment)
  • Need to fix CI
  • Add the BSD license to the package
  • Add some docs about how to run it on linux and reference to the BlueZ plugin.

@remonh87 remonh87 mentioned this pull request Aug 30, 2021
@robert-ancell
Copy link
Contributor Author

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

@robert-ancell robert-ancell force-pushed the linux-federated branch 7 times, most recently from fab74e4 to 44d78d2 Compare November 2, 2021 04:23
@robert-ancell robert-ancell force-pushed the linux-federated branch 2 times, most recently from 340a310 to 9dcef30 Compare November 2, 2021 04:35
@robert-ancell
Copy link
Contributor Author

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.

@remonh87
Copy link
Contributor

remonh87 commented Nov 3, 2021

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

@MoralCode
Copy link

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?

@jwinarske
Copy link

jwinarske commented Nov 4, 2023

  • ``

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?

@MoralCode
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants