From 534b300931a4f0366619a395ca9eaa586f54b989 Mon Sep 17 00:00:00 2001 From: Tobias Ollive Date: Sat, 22 Jan 2022 15:10:59 +0100 Subject: [PATCH] .initial commit [x] connect to the device [x] find service and characteristic --- src/main.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 99a2e58..26dc67a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,7 @@ async fn main() -> bluer::Result<()> { let device = adapter.device(addr)?; match find_neopixel_service(&device).await { Ok(Some(char)) => { - send seg + send_seq(char) println!("found characteristic"); } Ok(None) => { @@ -49,6 +49,15 @@ async fn main() -> bluer::Result<()> { Ok(()) } +async fn send_seq(char: &Characteristic) -> { + println!(" Characteristic flags : {:?}, ", char.flags().await?); + + let base_data = vec![0x00, 0x00, 0x01]; + for i in 0..10 { +# base_data. + } +} + async fn connect(device: &Device, retries: u8) -> bluer::Result<()> { if device.is_connected().await? { return Ok(())