I've tested the module that comes with the firmware and apparently it doesn't work very well.
So I compiled the one that I was using before which has proven to be very reliable: the realtek's v4.1.8_9499 module.
I've uploaded some files here: https://drive.google.com/file/d/0B2wdCX ... VMc00/view
(click on the arrow in the top to download a tar file with the content)
This one has the module compiled for RPI's latest kernel 3.18.7 (not RPI2, sorry).
It also has a file for /etc/modprobe.d/ to blacklist the kernel's own module and set a couple of options that gave me good results.
If you have kernel 3.18.7 and all you want is to just get the wifi dongle working, then that's the only file you need.
But if you want to be able to compile your own module in the future, keep reading
The sources I used. It's the realtek source configured for the RPI, with LED enabled and reduced debug logging and with a small patch to make it compile OK on newer kernels (patch based on this one: https://github.com/lwfinger/rtl8188eu/c ... 0cafb0cf3f
The script I use to download kernel source and prepare it to compile modules
It's just because I'm too lazy to type. This one calls the prepare-kernel one and then does "make all && sudo make install"
This one has a hardcoded path which you may need to change if you want to use it.
Another source that works and is being activelly maintained can be found here: https://github.com/lwfinger/rtl8188eu