Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
taks committed Sep 29, 2024
1 parent 7716cc1 commit facf7bc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/ble_l2cap_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ fn main() {
client.connect(device.addr()).await.unwrap();

let mut l2cap = L2capClient::connect(&client, 0x1002, 512).await.unwrap();
l2cap.on_data_received(|x| {
::log::info!("Data received(0x1001): {:X?}", data.sdu_rx());
});
for i in 0..4 {
l2cap.send(format!("test{}", i).as_bytes()).unwrap();
l2cap.tx(format!("test{}", i).as_bytes()).unwrap();
::log::info!("< {:#?}", l2cap.rx().await.data());
esp_idf_hal::delay::FreeRtos::delay_ms(1000);
}
l2cap.disconnect().await.unwrap();
Expand Down

0 comments on commit facf7bc

Please sign in to comment.