Impl task1 some part of task2

This commit is contained in:
ti_mo
2026-05-19 21:56:06 +02:00
parent fca31532d1
commit 1561016689
8 changed files with 849 additions and 187 deletions
+29
View File
@@ -0,0 +1,29 @@
channel_bandwidth = "CBW20"; % 20MHz
rxFrame1 = trace1.iq(:);
rxFrame2 = trace2.iq(:);
rxFrame3 = trace3.iq(:);
rxFrame4 = trace4.iq(:);
function beaconFrames = extractBeaconFrames(rxFrame)
beaconFrames = [];
searchOffset = 0;
while searchOffset < length(rxFrame)
[bitsData, decParams, searchOffset, res] = recoverOFDMBits(rxFrame, searchOffset);
if isempty(bitsData)
continue;
end
[cfgMAC, ~, decodeStatus] = wlanMPDUDecode(bitsData, SuppressWarnings=true);
if ~decodeStatus && matches(cfgMAC.FrameType, "Beacon")
disp("Beacon at " + searchOffset);
beaconFrames(end + 1) = cfgMAC;
end
end
end
beaconFrames1 = extractBeaconFrames(rxFrame1);