#scan #access #discovery

nightly bin+lib ble

Rust library for BLE access

2 releases

Uses old Rust 2015

0.1.1 Sep 15, 2016
0.1.0 Sep 13, 2016

#109 in #scan

MIT license

5KB
125 lines

rust-ble

Future cross-platform BLE library. Currently you can run this on a Linux platform, provided you have hdiutil installed:

extern crate ble;

use std::thread;
use std::time::Duration;

fn main() {
    println!("Starting scan...");

    let mut scan = ble::scan().unwrap();

    // Comment out these lines to let scan go on forever.
    thread::sleep(Duration::from_millis(3000));
    scan.stop();

    println!("Results:");
    for discovery in scan {
        println!("{:?}", discovery);
    }

    println!("... done.");
}

License

MIT or Apache-2.0, at your option.

Dependencies

~3.5MB
~76K SLoC