Welcome to the Radio Frequency Fingerprinting Recognition of WLAN Routers Using Convolutional Networks Project! This supporting material is organized into two main parts: one for generating WiFi data frames using GNURadio, and another for training neural networks using the generated data.
This folder contains two essential GRC files for generating WiFi data frames:
- wifi_loopback.grc
- wifi_phy_hier.grc
- Initial Setup:
If this is your first time running the project, you need to set the file path for data collection in the
file sinkblock located after theWiFi Sync Longblock in thewifi_phy_hier.grcfile. Set the path to theori_datafolder as follows:'/home/buan/Supporting Material/LeNet/initial_data/ori_data/'+phase_noise_string+'_'+fre_offset_string+'_'+DC_offset_string - Run the Scripts:
Once the path is correctly set, open and run the
wifi_loopback.grcfile in GNURadio Companion to start collecting WiFi data frames.
This section contains scripts for training neural networks, including LeNet and GoogLeNet. The process for both models is similar; however, the instructions below focus on LeNet as an example.
- Data Extraction:
- Run
extract.pyto extract LTF OFDM symbols from the collected data frames stored in theori_datafolder underinitial_data. - The extracted data will be saved in the
extracted_datafolder.
- Data Partitioning:
- Run
data_partitioning.pyto split the dataset into training and testing sets. - The partitioned data will be saved in the
mode_datafolder.
- Model Training:
- Run
model_train.pyto start training the model. You can set the number of epochs and the path for the log file within this script. - Example code:
train_process = train_model_process(LeNet, train_data, val_data, num_epochs=50) log_file = open("b4_20.txt", "w")
- Model Testing:
- After training, run
model_test.pyto validate the model using the testing set and obtain accuracy metrics.
- LTF Signal Plotting:
- The
LTF_plot.pyunderinitial_datacontains scripts to plot the IQ signals and OFDM symbols of the LTF.
- Result Visualization:
- The
Resultfolder stores data results, with each subfolder corresponding to results from different convolutional or pooling layer changes. - The
view_complexNpy.pyscript can be used to view the extracted LTF OFDM symbols saved in.npyformat. - Use
viewResult.pyto visualize the training results for a specific round. - The
LeNetAverageResult.pyin theResultfolder contains visualizations of the aggregated results.
If you have any questions or need further assistance, feel free to reach out to me at: Email: b.gu@hss23.qmul.ac.uk
Thank you for using this project!