seems finished
This commit is contained in:
+17
-9
@@ -1,23 +1,27 @@
|
||||
addpath("from_matlab_example");
|
||||
|
||||
rxFrame1 = trace1.iq(:);
|
||||
rxFrame2 = trace2.iq(:);
|
||||
rxFrame3 = trace3.iq(:);
|
||||
rxFrame4 = trace4.iq(:);
|
||||
rxFrame1 = res1.iq(:);
|
||||
rxFrame2 = res2.iq(:);
|
||||
rxFrame3 = res3.iq(:);
|
||||
rxFrame4 = res4.iq(:);
|
||||
|
||||
beaconFrames1 = extractBeaconFrames(rxFrame1);
|
||||
beaconFrames2 = extractBeaconFrames(rxFrame2);
|
||||
beaconFrames3 = extractBeaconFrames(rxFrame3);
|
||||
beaconFrames4 = extractBeaconFrames(rxFrame4);
|
||||
disp("Results Task 2:" + newline)
|
||||
|
||||
% 1.
|
||||
disp("Beacon Frame 1")
|
||||
beaconFrames1 = extractBeaconFrames(rxFrame1);
|
||||
printBeaconTable(beaconFrames1);
|
||||
|
||||
disp("Beacon Frame 2")
|
||||
beaconFrames2 = extractBeaconFrames(rxFrame2);
|
||||
printBeaconTable(beaconFrames2);
|
||||
|
||||
disp("Beacon Frame 3")
|
||||
beaconFrames3 = extractBeaconFrames(rxFrame3);
|
||||
printBeaconTable(beaconFrames3);
|
||||
|
||||
disp("Beacon Frame 4")
|
||||
beaconFrames4 = extractBeaconFrames(rxFrame4);
|
||||
printBeaconTable(beaconFrames4);
|
||||
|
||||
% 2.
|
||||
@@ -71,7 +75,7 @@ function beaconFrames = extractBeaconFrames(rxFrame)
|
||||
|
||||
while searchOffset < length(rxFrame)
|
||||
oldOffset = searchOffset;
|
||||
[bitsData, decParams, searchOffset, res] = recoverOFDMBits(rxFrame, searchOffset);
|
||||
[bitsData, ~, searchOffset, res] = recoverOFDMBits(rxFrame, searchOffset);
|
||||
|
||||
if searchOffset <= oldOffset
|
||||
searchOffset = oldOffset + 1;
|
||||
@@ -83,6 +87,10 @@ function beaconFrames = extractBeaconFrames(rxFrame)
|
||||
|
||||
[cfgMAC, ~, decodeStatus] = wlanMPDUDecode(bitsData, SuppressWarnings=true);
|
||||
|
||||
if ~decodeStatus
|
||||
disp(cfgMAC.FrameType + " at " + res.PacketOffset / 20e6 * 1000 + "ms")
|
||||
end
|
||||
|
||||
if ~decodeStatus && matches(cfgMAC.FrameType, "Beacon")
|
||||
if isempty(cfgMAC.ManagementConfig.SSID)
|
||||
ssid = "Hidden";
|
||||
|
||||
Reference in New Issue
Block a user