4412 Using Xiaodu wifi

Publisher:变形金刚Latest update time:2022-01-17 Source: eefocusKeywords:wifi Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

FS_4412 can be connected to a USB-Wifi module to achieve wireless Internet access. This section mainly describes how to transplant the driver of the USB-Wifi module and related WPA encryption tools on the FS_4412 development board.


1. Get the RT2780 driver

The USB-Wifi module we use uses the RT2780 chip. The relevant driver source code is in the USB-Wifi_driver directory under the Wifi directory of the Cortex-A9 transplantation section. Or you can download it from the official website and go to http://www.mediatek.com/en/downloads/ to download the required driver

Copy USB-Wifi_driver to the working directory.

Unzip the driver source package

tar -jxvf USB-Wifi_driver.bz2

After decompression, you can see the directory DPO_MT7601U_LinuxSTA_3.0.0.4_20130913

2. Porting RT2780 driver

2.1 Modify Makefile

2.1.1 Modify the Makefile in the DPO_MT7601U_LinuxSTA_3.0.0.4_20130913 directory

viMakefile Modify         #PLATFORM = SMDK
        in line 49         to         PLATFORM = SMDK


Before the change, as shown below

The modified image is as follows:

2.1.2 In line 275, modify the Linux source directory and cross tool chain

275 ifeq ($(PLATFORM),SMDK) 
        276 LINUX_SRC = /home/bhushan/itcenter/may28/linux-2.6-samsung
        277 CROSS_COMPILE = /usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-
        278 endif

Change to

275 ifeq ($(PLATFORM),SMDK)
        276LINUX_SRC = /home/linux/work/4412/linux-3.0-fs4412_V3
        277 CROSS_COMPILE = arm-cortex_a8-linux-gnueabi-
        278 endif

As shown before modification:

After modification, as shown in the figure:

2.1.3 Modify line 1604 in include/rtmp_def.h

Change ra in lines 1604 and 1605 in the above figure to wlan

The changes are as shown below:

2.1.4 View os/linux/config.mk file

Make sure the WPA_SUPPLICANT configuration in the config.mk file is as shown below.

3 Compile the source code

Execute the following command in the DPO_MT7601U_LinuxSTA_3.0.0.4_20130913 directory to compile the source code

make clean
        make -j2

After successful compilation, the following figure is shown

The generated mt7601Usta.ko file is the driver we need

Copy /home/linux/work/4412/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/mt7601Usta.ko to our root file system (the root file system of the development board).


4. Copy the required data file RT2870STA.dat

Create a directory /etc/Wireless/RT2870STA/ in the root file system of the development board (note that this directory is the root file system of the development board)

mkdiretc/Wireless/RT2870STA/ -p

Copy RT2870STA.dat in the source directory (as shown below) to the etc/Wireless/RT2870STA/directory just created

5. Testing

Please make sure the above steps have been completed

5.1 Plug in the USB-Wifi module

Plug the USB-Wifi module into the USB port of the development board, and you can see the following printed information on the port:

 

Then enter lsusb in the development board

Then modify vim common/rtusb_dev_id.c in the driver source code

Find line 42 and add the IDs you just added. You can actually add all of them. These are the IDs you usually use.

/* module table */USB_DEVICE_ID rtusb_dev_id[] = {
#ifdef RT6570
    {USB_DEVICE(0x148f,0x6570)}, /* Ralink 6570 */#endif /* RT6570 */
    {USB_DEVICE(0x148f, 0x7650)}, /* MT7650 */#ifdef MT7601U
    {USB_DEVICE(0x148f,0x6370)}, /* Ralink 6370 */
    {USB_DEVICE(0x148f,0x7601)}, /* MT 6370 */
    {USB_DEVICE(0x2955,0x1001)}, /* XiaoDu Wifi */#endif /* MT7601U */
    { }/* Terminating entry */};

  • Compile make -j2

  • Then there is a kernel module in os/linux/mt7601Usta.ko, which is used to load

  • Then start wlan0: ifconfig wlan0 up

  • To solve the debug output problem, modify the global variable ULONG RTDebugLevel = RT_DEBUG_ERROR; or cancel the DBG macro definition

 

After transplanting wiconfig, the command used

    iwpriv wlan0 set NetworkType=Infra
    iwpriv wlan0 set AuthMode=WPA2PSK
    iwpriv wlan0 set EncrypType=TKIP
    iwpriv wlan0 set SSID="CMCC-WEIHUA"
    iwpriv wlan0 set WPAPSK=1112223334
    iwpriv wlan0 set SSID="CMCC-WEIHUA"

    iwpriv wlan0 connStatus

 I found that the connection was disconnected, and I don't know why. I think the reasons may be:

1) No DHCP to automatically obtain IP.

2) iwpriv is not configured correctly

3) The driver does not work properly


Keywords:wifi Reference address:4412 Using Xiaodu wifi

Previous article:4412 Try to transplant mpu9250
Next article:4412 gpio read pwm

Recommended ReadingLatest update time:2024-11-15 09:12

Huawei's spring launch of all-scenario smart home solutions is officially held, opening up the future of smart home
Huawei's whole-home intelligence evolves again, opening up the future of smart homes Huawei's whole-home smart home upgrades to revolutionize spatial interaction The new generation of Huawei's whole-home smart home is launched, and the smart central control screen equipped with HarmonyOS makes its debut Price
[Internet of Things]
Huawei's spring launch of all-scenario smart home solutions is officially held, opening up the future of smart home
Transplantation and use of wifi network card RT3070 in S3C2440
1. Configure the kernel to select the WIFI driver 1. Plug the usb wifi into the computer and use the command on ubuntu: # lsusb to check the wifi’s PID: 0x148f, VID: 0x3070 2. Set up the environment (Using arm-linux-gcc 4.3.2, kernel: linux 3.4.2) 1) Kernel source code patching  Execute the following commands in the t
[Microcontroller]
Transplantation and use of wifi network card RT3070 in S3C2440
In Qorvo's view, what are the opportunities and challenges of WiFi 6?
Recently, Xiaomi and Huawei have launched a number of WiFi 6 routers, and the FCC has allowed the 6Ghz frequency band to be opened for WiFi use, which has aroused great interest in WiFi 6 and WiFi 6E in the industry. Seeing the unlimited opportunities brought by the new standard, many chip companies and related termin
[Network Communication]
In Qorvo's view, what are the opportunities and challenges of WiFi 6?
tiny4412 solves the problem of kernel compilation version number
Kernel version: linux-3.5 Development board: tiny4412 Author: Peng Donglin Email: pengdonglin137@163.com Problem: Since I use git to manage the kernel code, the kernel version becomes the following form after compilation is completed: Linux version 3.5.0-FriendlyARM-g5291689 The built-in ko file only recognizes Lin
[Microcontroller]
4412 Process
Basic concepts of process • Process is a very important concept in Linux system programming • The most important difference between embedded Linux and embedded MCU – Embedded is very easy to implement multitasking • Several basic concepts – Program – Application – Process • Top command – Execute top command on x86-Ubu
[Microcontroller]
4412 Process
What are the features of WiFi6+? Huawei explains
We all know that WiFi6 is the next-generation WiFi standard. The biggest change is the introduction of 5G homologous technology OFDMA. Compared with WiFi5, it has the advantages of two highs and two lows (high bandwidth, high concurrency, low latency, and low power consumption), and is called indoor "5G". At present,
[Mobile phone portable]
What are the features of WiFi6+? Huawei explains
Introduction and operation of the serial port of tiny4412 development board
UART principle description: Universal Asynchronous Receiver Transmitter is abbreviated as UART, which is "Universal Asynchronous Receiver Transmitter". It is used to transmit serial data: when sending data, the CPU writes parallel data into UART, and UART sends it serially on one wire according to a certain format;
[Microcontroller]
Introduction and operation of the serial port of tiny4412 development board
Situational LED lights combined with WiFi technology are popular
Foreign designers use Arduino and WiFi technology to make LED lights that can be freely controlled by iPhone or Android. It not only saves electricity but also creates a romantic atmosphere. Each light bulb is only sold for $60 USD and is sold for tens of millions of Taiwan dollars on foreign websites. It is said that
[Analog Electronics]
Situational LED lights combined with WiFi technology are popular
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号