diff --git a/examples/apps/src/ble_l2cap_central.rs b/examples/apps/src/ble_l2cap_central.rs index 03919bd8..44858a68 100644 --- a/examples/apps/src/ble_l2cap_central.rs +++ b/examples/apps/src/ble_l2cap_central.rs @@ -26,7 +26,7 @@ where } = stack.build(); // NOTE: Modify this to match the address of the peripheral you want to connect to. - // Currently it matches the address used by the peripheral examples + // Currently, it matches the address used by the peripheral examples let target: Address = Address::random([0xff, 0x8f, 0x1a, 0x05, 0xe4, 0xff]); let config = ConnectConfig { @@ -49,7 +49,7 @@ where info!("New l2cap channel created, sending some data!"); for i in 0..10 { let tx = [i; PAYLOAD_LEN]; - ch1.send::<_, PAYLOAD_LEN>(&stack, &tx).await.unwrap(); + ch1.send::<_, L2CAP_MTU>(&stack, &tx).await.unwrap(); } info!("Sent data, waiting for them to be sent back"); let mut rx = [0; PAYLOAD_LEN]; diff --git a/examples/apps/src/ble_l2cap_peripheral.rs b/examples/apps/src/ble_l2cap_peripheral.rs index f4c0de7d..da173196 100644 --- a/examples/apps/src/ble_l2cap_peripheral.rs +++ b/examples/apps/src/ble_l2cap_peripheral.rs @@ -70,7 +70,7 @@ where Timer::after(Duration::from_secs(1)).await; for i in 0..10 { let tx = [i; PAYLOAD_LEN]; - ch1.send::<_, PAYLOAD_LEN>(&stack, &tx).await.unwrap(); + ch1.send::<_, L2CAP_MTU>(&stack, &tx).await.unwrap(); } info!("L2CAP data echoed");