Instructions on how to get the EDIMAX EW-7811Un adaptor working on the EV3 brick. These instructions could be modified to get any WiFi dongle to work provided that the appropriate wireless driver can be compiled and inserted into the 2.6.33 kernel.
A Lego EV3 firmware bin file which is compatible with the EDIMAX EW-7811Un adaptor can be downloaded here or at http://tinyurl.com/ev3edimax. This file can be uploaded through the Firmware Update option in the official Lego Mindstorms software. Note: this will work with the offical Lego Mindstorms software (ignore the warning to upgrade the firmware message).
SD card files
By default the brick supports only a Netgear WNA1100 WiFi dongle. To get the EV3 working with the EDIMAX EW-7811Un adaptor you must
- Download and compile the rtl8192CU Linux driver against the EV3 Linux kernel to generate the 8192cu.ko kernel module.
- Modify the c_wifi.c code in ~/projects/lms2012/c_com/source such that the EV3 brick can detect and use the new adaptor.
Once this is the done, the generated files can be copied to an SD card image and run on the EV3 brick. The EDIMAX EW-7811Un adaptor will then be detectable by the EV3 brick and can be used with the EV3 software. Note this will require the EV3 build environment to be installed on your machine as per the instructions here.
Compiling and installing the rtl8192cu driver
Unpack the driver archive into ~/projects/rtl8192CU_linux_v2.0.939.20100726. The module can then be made with the following bash script
The 8192cu.ko file should be copied from ~/projects/rtl8192CU_linux_v2.0.939.20100726 into the EV3 LMS2012_EXT partition
The module file can be inserted manually be using insmod on system start up or a better solution is to remove the modules.dep file
This will force the new 8192cu.ko to be discovered and installed into the running kernel.
Five functions in the c_wifi.c file need to be modified to allow the EDIMAX EW-7811Un adaptor to be used. The edited version of c_wifi.c can be downloaded here.
The following lines should look like the following (starting on line 1296)
This removes the HARDWARE_SEARCH_STRING check which is set to "ID 0846:9030 NetGear, Inc.".
The following lines should look like the following (starting on line 1311)
This removes the WIFI_DONGLE_ID and WIFI_VENDOR_ID check which is set to "0846" and "9030" respectively.
The following lines should look like the following (starting on line 2582)
Before the adaptor is brought up with ifconfig, the EDIMAX EW-7811Un adaptor is termed "unassociated" when the iwconfig command is run. Thus the string check for "IEEE 802" needs to be removed and the expected device name of "wlan0" should be copied into LogicalIfName.
The following lines should be inserted into the cWiFiLoadAthHwModules function (starting on line 3296)
This checks to make sure that the 8192cu module is loaded into the kernel.
The following lines should be inserted into the cWiFiUnLoadAthHwModules function (starting on line 3389)
This checks to make sure that the 8192cu module is unloaded from the kernel.
After these changes have been made, the lms2012 program needs to be recompiled (make lms2012.clean followed by make lms2012) and copied on to the EV3 brick file system again.
The EDIMAX EW-7811Un adaptor works with the LEGO Mindstorms software and with sending remote commands to the VM. There is however large reported packet loss with this adaptor - Raspberry PI users have also reported similar problems with the EDIMAX EW-7811Un adaptor as discussed here and here.