In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is the method of transplanting QtE-WiFi_mt6620". In the daily operation, I believe that many people have doubts about the method of transplanting QtE-WiFi_mt6620. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what is the method of transplanting QtE-WiFi_mt6620?" Next, please follow the editor to study!
This document introduces the migration method of SDIO WIFI in 6818 development board and QtE. Please note: some of the libraries and tools in the migration process may already exist in the source code or image, you can use your own generated overlay. Documents provided
As shown in the following figure, there are three source compression packages, the compiled library is located in the lib folder, the wpa_supplicant tool is located in the sbin folder, 6620_launcher, and script make_mt6620.sh.
The driver module we use here corresponds to the device/nexell/s5p6818_drone/mt6620_6818/ directory in the Android source code. Users only need to set WiFi to module mode (M), and then after compiling the Android source code, you can
Find the driver modules that can be used in this directory. The same required drivers are provided directly in the wpa_driver folder for ease of use.
1 6620_launcher
The 6620_launcher tool runs as a service program in the background, which configures the working parameters of the serial port and downloads the firmware patch to MT6620. It is located in the "/ usr/bin/" directory of the development board and is built in the system, and the user can directly overwrite it.
2 migrate wpa_supplicant
Before compiling, you should first modify the compiler to version 4.3.2. How to set up the compiler can be found in Section 7.1 of the manual, "installation of the Qt/E4.7.1 Compiler". In addition, in order to avoid the possible problems of using environment variables to set up the compiler, most of the compilers in the document use the absolute path of the compiler, and users should first find the absolute path of their own compiler for use. The following figure shows the compiler and compiler package used for this compilation.
From the figure above, we can see that the absolute path of the compiler is "/ usr/local/arm/4.3.2/bin/ arm-none-linux-gnueabi-gcc".
Users need to copy the source code package provided to the working directory of Ubuntu and decompress it separately, as shown in the following figure.
2.1 migrate OpenSSL
First enter the directory openssl-1.1.0g, which is shown in the following figure.
Execute the following instructions and configure accordingly.
. / config no-asm shared-- prefix=$ (pwd) / _ _ install
After the execution is completed, it is shown in the following figure.
No-asm: does not use assembly code to speed up the compilation process during cross-compilation because its assembly code does not support the arm format.
Shared: generate dynamic link libraries. -- prefix: specify the path to the directory generated after make install. If you do not modify this item, the default is the OPENSSLDIR directory (/ usr/local/ssl).
Use the command "vim Makefile" to open Makefile, search for CFLAG, and navigate to the location shown in the following figure.
Delete the "- M64" in the red box in the image above, and the CFLAG should be as shown in the following figure.
Execute the following command to compile the OpenSSL library, and note that the absolute path of the cross-compiler is used here.
Make CROSS_COMPILE=/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-
After the compilation is completed, it is shown in the following figure.
Execute the following command to copy the compiled library file to the directory specified in step 1
Make install
As shown in the following figure, header files and library files are generated in the _ _ install directory under the current directory:
Files under include need to specify the path to the include when compiling the program. Lib will be used when the program is running, so you need to copy all the files under lib, including folders, to the development board / lib folder.
2.2 migrate libnl
Libnl is a library developed to facilitate applications to use the netlink interface. This library provides a unified interface for raw netlink messaging and different netlink family proprietary interfaces. Enter the directory "libnl-1.1.4/", as shown in the following figure.
Execute the following instructions to configure the compilation architecture.
. / configure-prefix=$ (pwd) / _ _ install-enable-shared-enable-static
Where-prefix=$ (pwd) / _ _ install specifies the storage path of the compiled library, which is generally placed in the _ _ install directory under the current directory. The execution result is shown in the following figure.
Execute the following command to compile the library
Make CC=/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc
When finished, it is shown in the following figure.
Use the command "make install" to copy the compiled library files to the specified directory. Header files and library files are generated in the _ _ install directory under the current directory, as shown in the following figure.
Files in the include directory are used when compiling the program, while files in lib are used when the program is running. Therefore, when porting hostapd, you need to specify the path of include, and you need to copy all files under the lib directory, including folders, to the / lib folder in the development board.
2.3 migrate wpa_supplicant
Wpa_supplicant is located in the hostap directory as part of hostap. Use the command "cdhostap/wpa_supplicant/" to enter the wpa_supplicant directory, as shown in the following figure.
Use the command "cp defconfig. Config" to copy a default configuration file. Then use the command "vimMakefile" to modify the Makefile, as shown in the following figure.
Set
Ifndef CC
CC=gcc
Endif
Modify to
CFLAGS + =-I../../libnl-1.1.4/__install/include/
CFLAGS + =-I../../openssl-1.1.0g/__install/include/
LIBS + =-L../../libnl-1.1.4/__install/lib/
LIBS + =-L../../openssl-1.1.0g/__install/lib/
# ifndef CC
CC=/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc
# endif
Note that the CC path is a cross-tool chain path in your environment.
After modification, the Makefile is shown in the following figure.
Next, compile with the command "make", and the result is shown in the following figure.
The "wpa_supplicant" tool appears in the current directory, as shown in the following figure.
Copy the compiled wpa_supplicant tools to the "/ usr/sbin" directory on the development board.
3 Direct copy
To skip the compilation step, you can directly copy the library files in the lib folder in the package to the / lib directory of the development board, copy the files in the sbin folder to the / usr/sbin directory of the development board, copy 6620_launcher to the / usr/bin directory of the development board, copy all the files in wpa_driver to the / lib/modules/mt6620/ directory, and copy the script make_mt6620.sh to any directory on the development board. Then proceed to the next chapter.
4 the development board connects to WiFi
Execute the following instructions on the development board to update the WiFi boot script.
Cat / etc/init.d/mt6620
#! / bin/sh
# support MT6620 WIFI Module
Mknod / dev/stpwmt c 190 0
Mknod / dev/stpgps c 191 0
Mknod / dev/fm c 193 0
Mknod / dev/wmtWifi c 194 0
Insmod / lib/modules/mt6620/mtk_hif_sdio.ko
Insmod / lib/modules/mt6620/mtk_stp_wmt.ko
Insmod / lib/modules/mt6620/mtk_stp_uart.ko
Insmod / lib/modules/mt6620/mtk_stp_gps.ko
# insmod / lib/modules/mt6620/hci_stp.ko
# insmod / lib/modules/mt6620/mt6620_fm_drv.ko
# insmod / lib/modules/mt6620/mtk_fm_priv.ko
Insmod / lib/modules/mt6620/mtk_wmt_wifi.ko WIFI_major=194
Insmod / lib/modules/mt6620/wlan_mt6620.ko
Chmod 0666 / dev/stpwmt
Chmod 0666 / dev/stpgps
Chmod 0666 / dev/fm
Chmod 0666 / dev/wmtWifi
Chmod 0666 / dev/gps
Chmod 0660 / dev/ttySAC2
/ usr/bin/6620_launcher-M1-b 921600-n / etc/firmware/mt6620_patch_hdr.bin-d / dev/ttySAC2 &
Sleep 4
Echo 1 > / dev/wmtWifi
Wpa_supplicant-iwlan0-Dnl80211-c/etc/wpa_supplicant.conf &
Sleep 3
Udhcpc-I wlan0 > / var/udhcpc_log &
EOF
Paste to the development board and press enter, as shown in the following figure.
Or execute the "make_mt6620.sh" we provide on the development board to have the same effect.
Then execute the following instructions
Wpa_passphrase XXX "YYY" > / etc/wpa_supplicant.conf
Where XXX represents the WiF network name, and YYY represents the WPA-PSK or WPA2-PSK encrypted password. Then execute the command ". / etc/init.d/mt6620" to connect to the WiFi network, and the configuration time is about 30 seconds.
You can see that wlan0 is successfully assigned to the IP address, shut down eth0, execute the command "ping www.baidu.com-c 4", and you can see that you can connect to the Internet through WiFi, as shown in the following figure.
At this point, the study on "what is the method of transplanting QtE-WiFi_mt6620" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.