rtl8192 调试

平台xilinx zynq7000 (cortex-a9)

WiFi模块rtl8192


调试记录:

1.内核加载WIFI 驱动:模块型号RTL8192CU

http://www.zedboard.org/content/howto-guide-using-usb-wifi-adapter-zedboard

摘录如下:

I was able to get a USB Wifi adapter working on the ZedBoard in Linaro Ubuntu the other day, and I figured I'd share my results here. The process was not difficult, and only required a little tinkering. I used a DLink DWA-140 v.B2 adapter (which I was able to find on Amazon for ~$15), but this procedure has the potential to work for any adapter that is based on a Ralink chipset (Ralink devices typically have a name similar to rtxxxx). Here is what to do:

1) Get Linaro Ubuntu running on the ZedBoard using the Digilent kernel. Some documentation on how to do this just went up, and is available here:
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,66,1143&Prod=EM...
The guide is called "Getting Started with Embedded Linux -- ZedBoard". You should follow the guide all the way through, because your going to need to configure the kernel source in the next step.

2) Next, the proper drivers need to be built into the kernel. On your Linux PC that has the Digilent Linux repo cloned, open a terminal and change into the linux-digilent directory. Run:
make ARCH=arm digilent_zed_defconfig
Then run:
make ARCH=arm menuconfig
Set (to 'y') the following options (leave any additional options that appear as their defaults):
Networking Support -> Wireless -> cfg80211 - wireless configuration API
Networking Support -> Wireless -> Generic IEEE 802.11 Networking Stack (mac80211)
Device Drivers -> Network device support -> Wireless LAN
Device Drivers -> Network device support -> Wireless LAN -> Ralink driver support
Device Drivers -> Network device support -> Wireless LAN -> Ralink driver support -> Ralink rt27xx/rt28xx/rt30xx需要更改成自己的型号
You may also need to build in additional drivers in the "Ralink driver support" menu so that the Ralink chipset on your device is supported. Exit menuconfig and save.

3) Build the kernel, and then insert the SD card you created with the GSwEL guide. Copy the newly built zImage over to the Fat partition of the SD card.

4) Insert the SD card into the ZedBoard and boot it up. Open up a terminal program on a PC and connect to the ZedBoard UART terminal. Also, ensure that the ZedBoard Ethernet port is connected to the internet.

5) At the UART terminal, run:
apt-get install linux-firmware

6) Once completed, connect your Wifi adapter, a keyboard, and a mouse to the USB-OTG port (via a hub). Disconnect the ethernet cable from the internet. At the Linaro desktop, you should see something that resembles a networking symbol in the upper right hand corner. Click on it using the USB mouse, and ensure "Enable Networking" and "Enable Wireless" are checked. If they are, then you should see a list of available networks. Connect to your wireless network, and your done! Try viewing some web sites in Firefox to test it out.

A helpful list of known issues with specific adapters can be found here:http://elinux.org/RPi_VerifiedPeripherals#Working_USB_Wi-Fi_Adapters
This information is targeted for the Raspberry Pi, but should still be helpful on the Zedboard.

Adding Wifi functionallity to the ZedBoard opens up the doors for some pretty cool projects, so have fun!



2.

加载固件的方法(固件传送门):

a:将附件的bin文件放到SD卡里面,

b:系统启动后执行下面的命令:

mkdir lib/firmware

mkdir lib/firmware/rtlwifi

cp mnt/rtl8192cufw.bin lib/firmware/rtlwifi/

ifconfig wlan0 192.168.1.101 up

内核里面的驱动是从lib/firmware/rtlwifi里面加载固件的,当然以后你们可以将这个bin文件放到ramdisk里面,就不用执行前3条命令了。

另外我发现在14.7的内核里面用ifconfig去配置这个网络IP的时候会出现字节不对齐的问题,你们可以先用2013.4的内核测试。



  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: FPGA(现场可编程门阵列)是一种灵活的硬件开发平台,它可以通过配置和编程来实现各种功能。RTL8211是一款常用的以太网PHY芯片,用于实现以太网通信功能。调试FPGA的RTL8211程序需要以下步骤: 1. 硬件连接:首先,将RTL8211芯片与FPGA进行硬件连接。通常需要连接到FPGA的MAC层接口,同时连接到适当的以太网接口(如RJ45接口)。 2. IP核配置:在FPGA开发环境中,需要配置相应的IP核来与RTL8211芯片进行通信。通常使用以太网控制器或以太网MAC核来实现物理层接口。 3. 时钟配置:在FPGA中,时钟是非常重要的。需要根据RTL8211的时钟要求,配置正确的时钟频率和时钟相位。 4. 端口映射:将FPGA中的信号与RTL8211芯片的引脚连接起来。这包括连接以太网控制器、PHY芯片和其他必要的信号。 5. 程序调试:编写FPGA的RTL8211调试程序。这包括设置PHY的寄存器和配置参数,以及进行数据传输的功能测试。 6. 仿真和验证:使用FPGA开发环境中的仿真工具进行代码验证和功能测试。通过模拟不同的数据传输和网络环境,检查RTL8211的正确性和稳定性。 7.调试实时性:如果在调试过程中发现通信延迟或其他实时性问题,需要对时钟频率、数据传输速率和协议设置等进行调试和优化。 8. 系统集成:完成FPGA和RTL8211的调试后,将其集成到完整的系统中进行测试。 调试FPGA的RTL8211程序需要耐心和技巧。正确认识硬件连接、时钟配置、IP核配置和培养丰富的调试经验都是必要的。通过反复测试和优化,最终可以实现RTL8211的稳定通信功能。 ### 回答2: 在调试FPGA的RTL8211程序时,我们需要采取以下步骤来确保其正常运行。 首先,我们需要关注RTL8211的硬件连接。确保FPGA与RTL8211之间的接口按照设计要求连接正确,包括时钟、复位和数据线。如果存在问题,我们需要检查接线和电路图。 接下来,我们需要编写RTL8211的驱动程序。这个驱动程序是用来控制RTL8211的寄存器,包括配置寄存器、状态寄存器和数据寄存器。我们需要确保驱动程序正确地设置这些寄存器,以满足我们的需求。同时,我们还需要检查驱动程序中的时序和流程是否正确。 然后,我们需要编写与RTL8211通信的协议。这个协议定义了FPGA与RTL8211之间的数据交换规则。我们需要确保协议正确地处理数据的发送和接收,包括数据的响应和错误处理。 在调试过程中,我们可以使用仿真工具来验证RTL8211的功能。通过在仿真环境中模拟不同的输入和时序,我们可以检查RTL8211是否按照预期工作。如果发现问题,我们可以通过调试仿真波形和寄存器值来找到问题所在,并进行修复。 另外,我们还可以使用示波器和逻辑分析仪等硬件设备来监测RTL8211的信号。通过观察时钟、数据和控制信号的波形,我们可以确定是否存在信号问题,并找到对应的解决方法。 最后,在调试完成后,我们需要进行全面的功能和性能测试。测试包括发送和接收不同类型的数据,检查数据的正确性和稳定性。同时,还需要测试RTL8211的性能指标,如吞吐量和延迟等。 总而言之,在调试FPGA的RTL8211程序时,我们需要关注硬件连接、编写驱动程序和协议、使用仿真工具、监测信号、进行功能和性能测试等多个方面。通过细致的调试工作,我们可以确保RTL8211的正常运行。 ### 回答3: FPGA芯片是一种可重构的数字电路芯片,可以根据需要进行编程和调试。RTL8211是一种常用的以太网物理芯片,用于实现网络通信功能。在调试RTL8211时,我们需要进行以下步骤: 1. 硬件连接:首先,我们需要将RTL8211芯片正确连接至FPGA开发板。通常,这涉及到连接各种电源、地线和信号线。确保芯片与FPGA之间的连接正确无误,防止可能的连接问题。 2. 引脚配置:RTL8211芯片有一系列的输入输出引脚,用于与FPGA进行通信。在调试过程中,我们需要正确配置这些引脚的电平和功能。这通常需要在FPGA设计中进行引脚映射,并确保与RTL8211的信号连接正确。 3. 驱动程序加载:为了使FPGA能够正常地与RTL8211通信,我们需要加载正确的驱动程序。这些驱动程序通常由芯片制造商提供,并且可以根据其文档中的指导进行加载和配置。 4. 调试工具:FPGA开发板通常提供一些调试工具,用于监视和调试芯片和FPGA之间的通信。通过使用这些工具,我们可以检查信号的正确性、数据流的顺序和传输速率等。这些工具通常包括示波器、逻辑分析仪等。 5. 编写测试代码:为了验证RTL8211的功能是否正常,我们需要编写一些测试代码。这些代码可以用来发送和接收数据包,并验证芯片的接口和数据处理能力。通过不断调试和优化测试代码,我们可以逐步确保RTL8211的正确工作。 总之,在调试RTL8211时,我们需要仔细检查硬件连接、正确配置引脚、加载驱动程序、使用调试工具,并编写测试代码进行验证。通过这些步骤,我们可以确保RTL8211与FPGA的通信正常,并实现所需的网络通信功能。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值