Use USB WiFi (RTL8188CU/RTL8192CU) under ORANGEPI-PC, Ubuntu wily mini

Source: Internet
Author: User

Linux Kernel 3.8 later added support for kernel-loaded firmware, so systemd after v217 to go beyond user loading firmware support

Orangepi to the present (January 6, 2016) is still using the 3.4.39 kernel, which does not support the kernel load firmware. Wily (Ubuntu 15.10) uses the SYSTEMD is v225, does not support user-state loading firmware, so orangepi+wily in the case of firmware is unable to load.

To solve this problem, we need to use Udev's rule file to invoke an external program to load firmware

I have written such a program to load firmware, the code address is: Https://github.com/freason/orangepi_wily_firmware_loader.git

Here's how to use it:

1. Modify: "/lib/udev/rules.d/50-firmware.rules" This file, put

subsystem== "firmware", action== "Add", attr{loading}= "-1"

This line is replaced by:

subsystem== "firmware", action== "Add", run+= "firmware $env {firmware}/sys/$env {DEVPATH}"

2. Compile firmware.c with ARM-GCC to generate an executable named firmware, and copy the file to the/lib/udev directory of Orangepi

There are two ways, one is to compile directly under Orangepi, and the other is to use ARM-LINUX-GNUEABI-GCC for cross-compiling. The second way I used it, GitHub provided the version I compiled

3. Copy firmware to Orangepi/lib/firmware, Orangepi Wily does not provide firmware so we have to manually copy firmware from somewhere else, I copied it from Ubuntu on my PC.

The principle of firmware.c work:

When USB WiFi is plugged in, the RTL8192CU driver requests firmware, and the kernel creates two files loading and data. Where loading is the state of loading, 1 is loading, 0 is loading complete, 1 is error, we write these three strings to the loading file to notify the kernel of the corresponding message. Data is buffered, we write firmware data to the file, and the kernel reads the firmware data from the file.

Note: write loading this file cannot use bash in echo+ redirect, I tried, did not succeed. I did not study fopen's code carefully, but the mode used to open the file in firmware.c is "we", where E represents o_cloexec, see Http://linux.die.net/man/3/fopen, I don't know what the command in bash can do with this pattern.

Use USB WiFi (RTL8188CU/RTL8192CU) under ORANGEPI-PC, Ubuntu wily mini

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.