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
Previous article:4412 Try to transplant mpu9250
Next article:4412 gpio read pwm
Recommended ReadingLatest update time:2024-11-15 09:12
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- MSP432UART Test
- ESP32, only one timer is turned on, the power consumption is very high, what should I do
- [TI recommended course] #Power Tips — Power management design tips series#
- STM32 allows pyb, uos, utime, machine and onewire modules to be configurable
- FAQ Sharing: Frequently Asked Questions about TI Wireless Product RF Hardware
- 【TGF4042 Signal Generator】+ Noise Test
- Authoritative sharing of Lingdong Microelectronics MM32 MCU information
- ESP8266WiFi module (IoT switch) test (AP mode)
- CAN communication design, please help
- How to make component packages with multiple pins connected internally in Allegro