Q2-Add SSID IE =========================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Version Info ` * :ref:`Problem Statement ` * :ref:`Approach and code flow ` * :ref:`Actual change and Patch ` * :ref:`Wireshark capture ` .. _wifi_ldd_wi-fi_dev_sta_ques2_step_1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * How to add multiple SSID IE elements in Probe-Request and Association-Request .. _wifi_ldd_wi-fi_dev_sta_ques2_step_2: .. tab-set:: .. tab-item:: Version Info =============================== ======================================= # Version =============================== ======================================= Ubuntu Ubuntu 22.04 64 bit Linux Kernel 6.9.2 Supplicant wpa_supplicant 2.10 =============================== ======================================= .. _wifi_ldd_wi-fi_dev_sta_ques2_step_3: .. tab-set:: .. tab-item:: Problem Statement .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * Add multiple SSID IE elements in Probe-Request, Association-Request .. _wifi_ldd_wi-fi_dev_sta_ques2_step_4: .. tab-set:: .. tab-item:: Approach and code flow * Call flow for add multiple SSID IE elements in Probe-Request .. literalinclude:: multiple_ssid_in_prob_req_callflow.txt * Call flow for add multiple SSID IE elements in Association-Request .. literalinclude:: multiple_ssid_in_assoc_req_callflow.txt .. _wifi_ldd_wi-fi_dev_sta_ques2_step_5: .. tab-set:: .. tab-item:: Actual change and Patch * Download the below patch file :download:`add_multiple_ssid_ie_prob_assoc_req.patch ` .. dropdown:: See the full content of patch file .. literalinclude:: add_multiple_ssid_ie_prob_assoc_req.patch .. code-block:: shell test:~$ pwd /home/test * Make sure internet is available in laptop to download supplicant package .. code-block:: shell test:~$ sudo wget https://w1.fi/releases/wpa_supplicant-2.10.tar.gz * Create a directory .. code-block:: shell test:~$ mkdir supplicant * Change directory to supplicant .. code-block:: shell test:~$ cd supplicant * Note : Your present working directory should be supplicant .. code-block:: shell test:~$ pwd /home/test/supplicant/ * Extract wpa_supplicant .. code-block:: shell test:~$ sudo tar -xvf ~/wpa_supplicant-2.10.tar.gz * Run the below command to apply patch .. code-block:: shell test:~$ patch -p1 < add_multiple_ssid_ie_prob_assoc_req.patch patching file wpa_supplicant-2.10/wpa_supplicant/scan.c patching file wpa_supplicant-2.10/wpa_supplicant/sme.c * Change directory to wpa_supplicant .. code-block:: shell test:~$ cd wpa_supplicant-2.10/wpa_supplicant/ * Check the current working directory using pwd command * Make sure your current working directory is wpa_supplicant .. code-block:: shell test:~$ pwd /home/test/supplicant/wpa_supplicant-2.10/wpa_supplicant * Copy the contents of defconfig file to .config file .. code-block:: shell test:~$ sudo cp defconfig .config * Compile wpa_supplicant .. code-block:: shell test:~$ sudo make * Create run_supplicant.conf .. code-block:: shell test:~$ sudo vim ./run_supplicant.conf ctrl_interface=/run/wpa_supplicant update_config=1 network={ ssid="test_open" key_mgmt=NONE } * Run wpa_supplicant .. code-block:: shell test:~$ sudo ./wpa_supplicant -Dnl80211 -i wlan1 -c ./run_supplicant.conf .. _wifi_ldd_wi-fi_dev_sta_ques2_step_6: .. tab-set:: .. tab-item:: Wireshark capture * Download file to check wireshark output :download:`add_multiple_ssid_ie_prob_assoc_req.pcapng ` .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * Check for probe request packet * Click on packet No.25 as shown in the image below .. image:: prob_req_wireshark.png :alt: Diagram :width: 800 :height: 400 .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * Click on IEEE 802.11 Wireless Management * Click on Tagged parameters * Click on Tag: SSID parameter set : Undecoded .. image:: multiple_ssid_ie_prob_req_wireshark.png :alt: Diagram :width: 800 :height: 400 .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * Check for association request packet * Click on packet No.62 as shown in the image below .. image:: assoc_req_wireshark.png :alt: Diagram :width: 800 :height: 400 .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * Click on IEEE 802.11 Wireless Management * Click on Tagged parameters * Click on Tag: SSID parameter set : Undecoded .. image:: multiple_ssid_ie_assoc_req_wireshark.png :alt: Diagram :width: 800 :height: 400