Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syfaro/wible
Windows Bluetooth Low Energy access
https://github.com/syfaro/wible
ble windows
Last synced: about 1 month ago
JSON representation
Windows Bluetooth Low Energy access
- Host: GitHub
- URL: https://github.com/syfaro/wible
- Owner: Syfaro
- Created: 2020-06-12T08:13:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-12T08:31:03.000Z (over 4 years ago)
- Last Synced: 2024-04-14T03:58:27.058Z (7 months ago)
- Topics: ble, windows
- Language: Rust
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wible
**Wi**ndows **B**luetooth **L**ow **E**nergy access.
Provides read and write access (including notifications) for BLE devices on
Windows with a simple API.To see what information can easily be obtained, try running the examples.
* `cargo run --example nearby_devices` will discover devices sending advertisements and display MAC addresses
* `cargo run --example discover [MAC]` will enumerate all services, characteristics, and descriptors on the device with the provided MAC address## Examples
This example watches for advertisements, connects to any discovered devices, and counts the available services on each.
```rust
use wible::AdvertisementWatcher;let watcher = AdvertisementWatcher::new().expect("Unable to create AdvertisementWatcher");
for advertisement in &watcher {
println!("Saw advertisement: {:?}", advertisement);
println!(
"Saw {} services",
advertisement
.device()
.expect("Unable to get device")
.services()
.map(|services| services.len())
.unwrap_or(0)
);
}
```