Giter Club home page Giter Club logo

bluez-async's People

Contributors

alsuren avatar anarsoul avatar blandger avatar dependabot[bot] avatar greendjango avatar kw217 avatar lcsfelix avatar matteswhite avatar nzsmartie avatar qwandor avatar robbym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bluez-async's Issues

`WakeAllowed` property appears to not be mandatory

Hey, I was checking out mijia-homie and running into issues setting it up--seemingly no devices are being found by the bluez-async scan at all (never mind whether they're the thermometers).

After some debugging, I've figured they get culled out in DeviceInfo::from_properties, specifically when we try to read the WakeAllowed field from the properties map. Looking at the devices in gdbus I see the property declared but without a value under devices: readwrite b WakeAllowed; (which is to say, it's not an ancient bluez version predating the field existing or so)

I searched around but couldn't really find any indication on whether some fields are mandatory and others optional. The network/bluetooth controller on this laptop is apparently Qualcomm QCA6390, if it somehow turns out to depend on controller hardware...

Simply changing to device_properties.wake_allowed().unwrap_or(false) seems to work fine (and would probably be a sensible default).

Way to check weather bluetooth is on

Add a way to check whether bluetooth is currently on.
Something equivalent to:

bluetoothctl show
Controller ...
...
Powered: no/yes

I want to be able to alert the user when they are trying to use my program without Bluetooth enabled.

Add feature flags?

I'm using bluez-async through btleplug and bluez-async is by far the biggest crate in my project because of all its dependencies. I recognize that some of these dependencies are absolutely necessary (dbus, futures), but I don't think that serde or serde-xml-rs are required for every use of this crate. Would it be possible to put serde functionality behind a feature flag so that bluez-async's dependencies can be limited as needed?

tokio feature 'rt' required for building

While building bluez-async v0.5.1, I encountered the following errors:
error[E0432]: unresolved import 'tokio::task::JoinError'
error[E0425]: cannot find function 'spawn' in crate 'tokio'

After inspecting the cargo.toml I found that in tokio v1.0.1, which is used by the most recent bluez-async, both the import and the function specified by the errors require the feature 'rt'. However, this function is only under the dev-dependencies for tokio, causing both errors:

[dependencies.tokio] version = "1.0.1"

[dev-dependencies.tokio] version = "1.0.1" features = ["macros", "rt", "rt-multi-thread", "time"]

How to fix:
Specify 'rt' as a feature with tokio, under the normal dependencies.

(This is my first time opening an issue on GitHub, and I didn't find any guidelines for creating an issue, so please leave constructive feedback if possible.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.