From 83ff626c4745d73def4e0cf88ea64c21a19d6d1f Mon Sep 17 00:00:00 2001 From: xoviat Date: Thu, 20 Jul 2023 17:00:03 -0500 Subject: [PATCH] wpan/mac: incr. runner msdu handle --- embassy-stm32-wpan/src/mac/runner.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/embassy-stm32-wpan/src/mac/runner.rs b/embassy-stm32-wpan/src/mac/runner.rs index a0090012e..007544c67 100644 --- a/embassy-stm32-wpan/src/mac/runner.rs +++ b/embassy-stm32-wpan/src/mac/runner.rs @@ -46,6 +46,8 @@ impl<'a> Runner<'a> { } }, async { + let mut msdu_handle = 0x02; + loop { let (buf, len) = self.tx_channel.recv().await; @@ -56,7 +58,7 @@ impl<'a> Runner<'a> { dst_addr_mode: AddressMode::Short, dst_pan_id: PanId([0x1A, 0xAA]), dst_address: MacAddress::BROADCAST, - msdu_handle: 0x02, + msdu_handle: msdu_handle, ack_tx: 0x00, gts_tx: false, security_level: SecurityLevel::Unsecure, @@ -67,6 +69,8 @@ impl<'a> Runner<'a> { .await .unwrap(); + msdu_handle += 1; + // The tx channel should always be of equal capacity to the tx_buf channel self.tx_buf_channel.try_send(buf).unwrap(); }