%% Write WLAN MAC Packet Data to PCAP File Using WLAN PCAP Writer
% Create a default WLAN PCAP file writer object.

obj = wlanPCAPWriter;

% Generate a WLAN MAC packet of type QoS Data. Specify the frame format as HT-Mixed.

macConfig = wlanMACFrameConfig('FrameType','QoS Data','FrameFormat','HT-Mixed');
payload ='00576000103afffe80';
mpdu = wlanMACFrame(payload,macConfig);

% Write the WLAN MAC packet data to the PCAP file.

timestamp = 0; % Number of microseconds
write(obj,mpdu,timestamp);

% Copyright 2020 The MathWorks, Inc.
%