You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here you are using blurz, inside dependencies, which has the dependency of dbus-1, not being included in Mac OS ( 10.14.6 )
....., output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package dbus-1 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `dbus-1.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'dbus-1\' found\nPackage dbus-1 was not found in the pkg-config search path.\n.......
warning: build failed, waiting for other jobs to finish...
error: build failed
"Fix" of that issue was just running brew install dbus
followed by brew services start dbus to avoid following error:
dbus[11416]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: D-Bus error
And even after that, there were further errors running the GW on mac - as i had predicted.
Makes sense, because dbus and especially bluez for bluetooth connections is for Linux kernel BLE communication only.
See here:
❯ brew services start dbus
==> Successfully started `dbus` (label: org.freedesktop.dbus-session)
❯ cargo run --release --bin scan
Finished release [optimized] target(s) in 0.47s
Running `target/release/scan`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: D-Bus error: Failed to connect to socket /usr/local/var/run/dbus/system_bus_socket: No such file or directory (org.freedesktop.DBus.Error.FileNotFound)', bin/scan.rs:10:59
To scale and being able to run the Gateway crossplatform, we have multiple options.
Detect running OS at runtime, switching the library to be used ( will fail, as compilation will fail as described above )
Remove the dependency of blurz completely, and using another RUST BLE implementation, that coveres those cases
( On OSX, you have to use the native interface CoreBluetooth | IOBluetooth | bluetoothd )
btleplug is a Rust BLE library, support Windows 10, macOS, Linux, and possibly iOS. It is currently made up of parts of other abandoned projects with a goal of building a fully cross platform proof of concept.
Our goal is the bring in some of the outstanding PRs from other projects, expand the platform support, and possibly make the API surface more ergonomic for being a truly cross-platform library.
That btleplug library seems promising, having support for windows, android, mac os, linux, even iOS but has some limitations for each platforms especially async:
Another options would by some python wrapper accessiong Mac OS BLE, parsing output of blueutil for mac os (https://github.com/toy/blueutil) or like noble library for node.js solved, connecting via XpcConnection to the native Mac OS bluetoothd daemon service.
--- or creating platform specific repos / build configs ála make and ./configure.
Just giving some feedback and ideas to solve those issues, to be more flexible to more endusers.
Maybe someone knows right away, which BLE functions are essential, and check that embedded image, if it would be an option trying to replace blurz with btleplug in some development branch.
The text was updated successfully, but these errors were encountered:
Looking at this repo, it is not usable as is, but i like the abstraction of a generic interface, so the high-level code does not need to care about the underlaying implementation. Thinking further, looking at the core lib for streams, we could also create some core library abstracted, to have one unified BLE lib working crossplatform.
Here you are using blurz, inside dependencies, which has the dependency of dbus-1, not being included in Mac OS ( 10.14.6 )
Streams-ble-gateway/Cargo.lock
Line 217 in 4169b54
Streams-ble-gateway/Cargo.toml
Line 20 in 4169b54
"Fix" of that issue was just running
brew install dbus
followed by
brew services start dbus
to avoid following error:And even after that, there were further errors running the GW on mac - as i had predicted.
Makes sense, because dbus and especially bluez for bluetooth connections is for Linux kernel BLE communication only.
See here:
https://stackoverflow.com/a/63136987
To scale and being able to run the Gateway crossplatform, we have multiple options.
( On OSX, you have to use the native interface CoreBluetooth | IOBluetooth | bluetoothd )
Checking the crates for CoreBluetooth https://crates.io/keywords/CoreBluetooth gives us 3 options, with one being very active in development, worth a look at: https://crates.io/crates/btleplug
Quote:
That btleplug library seems promising, having support for windows, android, mac os, linux, even iOS but has some limitations for each platforms especially async:
Another options would by some python wrapper accessiong Mac OS BLE, parsing output of blueutil for mac os (https://github.com/toy/blueutil) or like noble library for node.js solved, connecting via XpcConnection to the native Mac OS bluetoothd daemon service.
https://github.com/noble/noble/blob/master/lib/mac/highsierra.js#L18
--- or creating platform specific repos / build configs ála make and ./configure.
Just giving some feedback and ideas to solve those issues, to be more flexible to more endusers.
Maybe someone knows right away, which BLE functions are essential, and check that embedded image, if it would be an option trying to replace blurz with btleplug in some development branch.
The text was updated successfully, but these errors were encountered: