[Beijing Xunwei] i.MX6ULL Terminator Linux WIFI driver experiment Wireless Tools tool porting and testing

1 Wireless tools tool migration


Wireless tools is a collection of tools for operating WIFI, including the following tools: ① iwconfig: Set wireless network related parameters.
② iwlist: Scan the current wireless network information to obtain WIFI hotspots.
③ iwspy: Get the quality of each node link.
④ iwpriv: Operate the specific driver of WirelessExtensions.
⑤ ifrename: Name the interface based on various static standards.
The two tools we use most often are iwlist and iwconfig. First obtain the corresponding source code package. The network disk data path: i.MX6UL Terminator CD data/06_Linux driver routines/third-party library source code/iwlist_for_visteon-master.tar. Then copy the source code package to the Ubuntu system and unzip it to get the iwlist_for_visteon-master folder, and enter the iwlist_for_visteon-master directory as shown in Figure 1.1:
Insert picture description here

Figure 1.1

Then open the Makefile file and modify the three variables CC, AR and RANLIB in the file, as shown in Figure 1.2 after modification:
Insert picture description here

Figure 1.2

Among them, the three variables of CC, AR and RANLIB are the compiler tools used, which can be changed to the arm-linux-gnueabihf-xxx tool we used. After the modification is completed, you can use the following command to compile:

make clean 	//先清理一下工程
make		//编译

After the compilation is completed, 5 tools such as iwlist, iwconfig, iwspy, iwpriv, and ifrename will be generated in the current directory, and there is also a very important library file called libiw.so.29. Copy these 5 tools to the /usr/bin directory under the development board root file system, and copy the library file libiw.so.29 to the /usr/lib directory under the development board root file system. After the copy is complete, you can test whether the iwlist command is working properly.

2 wireless tools tool test

After copying the tools compiled and generated in the previous section to the development board, and then mainly test the iwlist tool, enter the iwlist command in the terminal, as shown in Figure 2.1:
Insert picture description here

Figure 2.1

Before using the iwlist command, first open the wlan0 network card:

ifconfig wlan0 up

After the wlan0 network card device is successfully turned on, you can use the iwlist command to find the wifi hotspot information in the current environment, enter the following command:
iwlist wlan0 scan After
entering the above command, it will search for all wifi hotspot information in the current environment, and then set these hotspots The information is agreed, including MAC address, ESSID (WIFI name), frequency, rate, signal quality, etc., as shown in Figure 2.2:
Insert picture description here

Figure 2.2

It can be seen that there are many wifi hotspots in the current environment, and then find the wifi hotspot you want to connect to among these wifi hotspots. For example, I want to connect to the hotspot "XW", which is represented by "cell 03", which contains the information of the wifi hotspot. .
To connect to the designated WiFi hotspot, you need to use the wpa_supplicant tool, so the next step is to transplant this tool.

Insert picture description here

Guess you like

Origin blog.csdn.net/BeiJingXunWei/article/details/112916805