Skip to content

Commit

Permalink
Entering name works, not MAC address
Browse files Browse the repository at this point in the history
  • Loading branch information
lukipuki committed Nov 24, 2024
1 parent 7fe006e commit 072574b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/basic_ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ use meshtastic::utils;
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let stream_api = StreamApi::new();

println!("Enter the MAC address of a BLE device to connect to:");
println!("Enter the short name of a BLE device to connect to:");

let stdin = io::stdin();
let entered_address = stdin
let entered_name = stdin
.lock()
.lines()
.next()
.expect("Failed to find next line")
.expect("Could not read next line");

let ble_stream = utils::stream::build_ble_stream(entered_address).await?;
let ble_stream = utils::stream::build_ble_stream(entered_name).await?;
let (mut decoded_listener, stream_api) = stream_api.connect(ble_stream).await;

let config_id = utils::generate_rand_id();
Expand Down

0 comments on commit 072574b

Please sign in to comment.