Transplantation of USB WiFi module rt3070 driver on the Apsara stack E9 Platform

Source: Internet
Author: User

Due to project work requirements, point-to-point and multi-point transmission of wifi must be implemented on the embedded E9 platform.

WiFi module chip: Reiling 3070 Chip

Embedded platform: E9 (ARM)

Cross-compilation environment: Arm-None-Linux-gnueabi



1. First download the driver for the Wi-Fi module


2. Cross-compile the driver

A. open the file after decompression of the driver file. If you need WPA and other functions, you can enable./OS/Linux/config. mk for editing. If you do not need to directly go to step B

B. Open the makefile in the root directory of the driver file and modify it. First, change chipset to 3070.

Then configure the cross-compilation environment. The default platform is PC. we modify the PC Code as follows:

ifeq ($(PLATFORM),PC)# Linux 2.6LINUX_SRC = /opt/E9_CD/Linux/linux_E9_3.0.35_for_Linux# Linux 2.4 Change to your local setting#LINUX_SRC = /usr/src/linux-2.4LINUX_SRC_MODULE = /opt/E9_CD/Linux/linux_E9_3.0.35_for_Linux/drivers/net/wireless/CROSS_COMPILE = /opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-none-linux-gnueabi-endif
Save and run sudo make
Linux_e9_3.0.35 is the directory where the Linux kernel source code is located.


3. After compilation, copy rt2870sta. dat and rt30870.sta. KO in the root directory to the board.

mkdir –p /etc/Wireless/RT2870STA/cp RT2870STA.dat / etc/Wireless/RT2870STA/cp rt3070sta.ko /usr

4. Load the driver
insmod /usr/rt3070sta.ko 


5. Then, you can see through ifconfig-A that the system has correctly identified the NIC, named ra0.


6. Start the NIC ifconfig ra0 up and see the data output. The port is successfully transplanted.


Certificate ---------------------------------------------------------------------------------------------------------------------------------------------------

Possible problems:

1 rtmp_chip.c: 470: Error: Implicit declaration of function 'rt33xx _ init'

Solution: comment out the rt33xx_init (PAD) of line 470th in rtmp_chip.c under the chips directory)

2. Problems with insmod

Solution: Generally, the problem is that the kernel version used in the Board kernel is inconsistent with that used during cross-compilation. You can view the Board kernel version uname-A and modinfo rt3070sta. ko: Check the generated driver version to see if it is consistent. I encountered this problem and solved it one morning. I found that the version number was armv5 and armv7, and finally compiled the Linux source code (set the cross-compilation environment and run the build. SH), and then compile the WiFi module. When compiling the kernel, pay attention to setting the cross-compiling environment.



Related blog recommendations:

1 http://blog.chinaunix.net/uid-28599023-id-3483821.html

2 http://www.linuxidc.com/Linux/2011-03/33483.htm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.