This setup is using a RaspBerry Pi with the following hardware:
- RaspberryPi-B
- SANDISK 16GB 16 GB SD HC SDHC
- EDIMAX EW-7811UN WIRELESS 802.11 B/G/N 150MBPS NANO USB ADAPTER
- USB to Serial RS232 Com
And the following software:
- Debian Squeeze from the RaspBerryPi official Site.
- Kernel : 3.2.23
I initially got a number of problems with an old USB WIFI device and the USB hub was disconnecting after a few hours/minutes/seconds.
I have read many "theories" about the USB hub overheating (yes, it does overheat but not to the point to experience any marks on the device because it), and other theories about the PowerSupplies and the low power issue (the advise power should be between 4.7-5.0 V).
I have to admit the power supply in use with the RaspberryPi it's not the best in the market (completely unbranded) and with the above hardware gets around 4.74 and lower power, so I want to demystify a bit all what surrounds the power supplies and others as it is NOT always the problem but software and drivers..
As an out-of-the-box solution the Debian Squeeze seems fairly ok, but if you really want to get the RaspberryPi up and I running, I would rather recompile the kernel.
Since I recompiled the kernel, all the issues I have found the completely vanished and everything went fine ever since.
Obviously, this is a personal advise and I am not taking ny responsibility on any damage produced to the system (but it is also understood the RaspberryPi, at least at the present, is a very much development tool)
Basically you need to get the source as follows:
git clone https://github.com/raspberrypi/linux.git
In my case I have taken to content in to this directory:
/lib/modules/3.2.23/build/linux/
I am using the following drivers:
RTL8188C_8192C_8192D_USB_linux_v3-1.4.2_3727.20120404.zip (that can be downloaded from either the link below or from Realtek)
The drivers for the USB-Wireless device have been uncompressed at the following location.
(Note I name the original directory as the target name for the driver)
/lib/modules/3.2.23/build/linux/drivers/net/wireless/rtl8192cu
Now, go to the above driver, and run:
./make_drv
Please select card type(1/2):
1) RTL8192cu
2) RTL8192du
#? 1
You have selected RTL8192cu
rtw_version.h has existed!
Edit file : /lib/modules/3.2.23/build/linux/drivers/net/wireless/Makefile, including:
including: obj-$(CONFIG_RTL8192CU) += rtl8192cu/
And Edit file: /lib/modules/3.2.23/build/linux/drivers/net/wireless/Kconfig to include:
source "drivers/net/wireless/rtl8192cu/Kconfig"
Compile the kernel:
cp /lib/modules/3.2.23/build/linux/arch/arm/configs/bcmrpi_cutdown_defconfig /lib/modules/3.2.23/build/linux/.config
cd /lib/modules/3.2.23/build/linux/
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig
Select: Device Drivers–>Network Device support–>Wireless LAN, and then right at the bottom make sure you have the Realtek 8192C USB WiFi option selected
<*> Realtek 8192C USB WiFi
You are going to possibly hit the following issue when trying to compile the kernel...
arm-Linux-gnueabi-ld: not found
So if that is the case, you can run the following:
sudo ln -s /usr/bin/ld /usr/bin/arm-linux-gnueabi-ld
sudo ln -s /usr/bin/ar /usr/bin/arm-linux-gnueabi-ar
sudo ln -s /usr/bin/nm /usr/bin/arm-linux-gnueabi-nm
sudo ln -s /usr/bin/objcopy /usr/bin/arm-linux-gnueabi-objcopy
sudo ln -s /usr/bin/objdump /usr/bin/arm-linux-gnueabi-objdump
sudo ln -s /usr/bin/strip /usr/bin/arm-linux-gnueabi-strip
Now create a symlink as follows:
ln -s /lib/modules/3.2.23/build/linux/drivers/net/wireless/rtl8192cu/autoconf_rtl8192c_usb_linux.h /lib/modules/3.2.23/build/linux/autoconf_rtl8192c_usb_linux.h
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k
Recompile the modules:
make ARCH=arm modules_install INSTALL_MOD_PATH=/path/to/temporary_directory/
cp /path/to/temporary_directory/lib/ /lib/modules/3.2.23/modules
Replace the old kernel (A good idea is ALWAYS to backup the working one before running this replacement)
cp /lib/modules/3.2.23/build/linux/arch/arm/boot/Image /boots/kernel.img
And Reboot the Device...
For those who want my compiled version of the software and all the bits, at the following link:
Modules:
http://generations.menteyarte.org/dropbox/raspberrypi/modules_source_3.2.23_edimax_ew_7811un.tar.gz
Kernel:
http://generations.menteyarte.org/dropbox/raspberrypi/kernel_3.2.23_edimax_ew_7811un.tar.gz
Drivers:
http://generations.menteyarte.org/dropbox/raspberrypi/RTL8188C_8192C_8192D_USB_linux_v3-1.4.2_3727.20120404.zip
Sources and help provided by the following links:
http://mchr3k-arduino.blogspot.co.uk/2012/05/raspberry-pi-kernel-image.html
http://lumux.co.uk/2012/06/07/realtek-rtl8192curtl8192c-wifi-on-raspberrypi/?wpmp_switcher=desktop