Showing posts with label wifi. Show all posts
Showing posts with label wifi. Show all posts

Tuesday, May 31, 2011

Enabling the brcm80211 driver in Fedora 15

[Update: As pointed out by Dean Brettle and, subsequently, by AM in the comments, rpmfusion added the kmod-staging package. The steps below may be useful if I ever need to compile a single module again.]

The driver for the wireless on the Lenovo S10-3 is included in the staging directory of the kernel. Fedora 15, unfortunately, did not enable it and wl.kmod or brcm80211.kmod were not available from rpmfusion repository either.

So, the best option was to download the source and enable it. The instructions to download the source of the kernel and prepare the source tree were available at http://fedoraproject.org/wiki/Docs/CustomKernel. The kernel source was now in the rpmbuild/BUILD/kernel-2.6.38.fc15/ directory.

The following steps helped to build only the desired module
  1. Modify the .config file to include
    CONFIG_BRCM80211=m
  2. Make sure that the following details in Makefile are as per the running kernel, e.g.
    VERSION = 2
    PATCHLEVEL = 6
    SUBLEVEL = 38
    EXTRAVERSION = .6-27.fc15.x86_64
  3. Run the command
    $ make drivers/staging/brcm80211
    This step prompted me to enable the additional option -
    CONFIG_BRCM80211_PCI=y
  4. $ make M=drivers/staging/brcm80211/
  5. $ sudo make modules_install M=drivers/staging/brcm80211/
  6. Looking at the OpenSuse's /lib/firmware/brcm, I created two softlinks:
    $ sudo ln -s bcm43xx-0-610-809-0.fw bcm43xx-0.fw
    $ sudo ln -s bcm43xx_hdr-0-610-809-0.fw bcm43xx_hdr-0.fw
  7. Add the driver:
    $ sudo modprobe brcm80211
The wifi card was now recognised and working. It took just a few minutes instead of hours for compiling the full kernel - even if it took a few days to understand and reach this point!

Notes:

  • If step 2 was not done, modprobe failed to load brcm80211 - invalid module format. The log reported a more meaningful problem - version magic mismatch and the driver was unloaded.

  • If step 6 was not done, the driver was loaded but the log reported an error that failed to find firmware /lib/firmware/brcm/bcm43xx-0.fw.




Tuesday, November 16, 2010

Lenovo Wifi resolved

I decided to test the ideapad-laptop driver from 
git://kernel.ubuntu.com/ikepanhc/ideapad-laptop.git

I had thought that I would just need to compile and install just the driver. I, instead, needed to rebuild the kernel. The version was 2.6.36rc8. I also downloaded and installed the Broadcom wl driver, which, however, does not seem to be recognized - so far.

The nice aspect was that bluetooth was recognized and indicated that it was disabled. I enabled it and the wifi led worked!

I rebooted in the normal kernel and the wifi worked without needing to suspend the system and resume it.

It feels good to be able to resolve this problem without having to install windows - thanks to Ike Panhc and David Woodhouse. 

For more details about the driver: https://patchwork.kernel.org/patch/119373/

 

Thursday, October 28, 2010

Lenovo Wifi behaviour still magical

The behaviour of the wifi on the Lenovo S10-3 continues to puzzle me. It continues to be magical and that feels uncomfortable. The magic is that I need to make the netbook sleep (Fn+F1) and then press the power button. Usually, the wifi will work. Occasionally, I need to repeat these steps.

This worked on Ubuntu netbook edition. It worked on Meego and Arch Linux. But I just haven't been able to get this magic to work on Smeegol from Suse.

There must be a difference. Looking at the logs, I found that if ACPI has an exception on waking from sleep state S3, bluetooth is recognised and wifi starts to work. The following extract from Ubuntu log file is indicative of each os.

Oct 27 14:55:36 anil-laptop kernel: [  690.604909] Initializing CPU#1
Oct 27 14:55:36 anil-laptop kernel: [  690.729043] CPU1 is up
Oct 27 14:55:36 anil-laptop kernel: [  690.729260] ACPI: Waking up from system sleep state S3
Oct 27 14:55:36 anil-laptop kernel: [  696.684074] ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20100428/evregion-474)
Oct 27 14:55:36 anil-laptop kernel: [  696.684099] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.DSSV] (Node f7023f78), AE_TIME
Oct 27 14:55:36 anil-laptop kernel: [  696.684174] ACPI Error (psparse-0537): Method parse/execution failed [\_WAK] (Node f7023030), AE_TIME
Oct 27 14:55:36 anil-laptop kernel: [  696.684370] ACPI Exception: AE_TIME, During Method _WAK (20100428/hwsleep-601)
Oct 27 14:55:36 anil-laptop kernel: [  696.719069] PM: early resume of devices complete after 1.912 msecs

However, on Suse's Smeegol, I just could not get it to show this exception.

On Ubuntu, the system wakes up whether the power button is pressed or sleep hotkey (Fn+F1) is pressed again. However, if the power button is pressed, the ACPI exception will normally show up and wifi works. But if the sleep hotkey is pressed, the exception rarely occurs and wifi does not work.

The next step would be to try the lenovo-laptop driver and hope that the wireless hotkey works and I do not need the above magic any more.

Sunday, September 12, 2010

S10-3 - Unusual wifi problem

I am not sure when exactly it happened or why. I was playing around with the physical switch to turn the wireless off and using the Reliance broadband usb modem. It was frequently disconnecting and speed was low. It probably was a network issue. But I wanted to be sure that it was not a Lenovo netbook or OS problem.

Anyway, when I tried to use wifi, wireless indicator LED was off and connection failed no matter how hard I tried. The LED hasn't been on since.

The symptoms were similar to a problem reported in Ubuntu forum. However, in my case wl driver is used and not ath9k. I tried the same solution and a simpler variation worked.

Bluetooth capability of the netbook is not discovered at boot time. Wifi doesn't work. The wireless indicator LED remains off. However, on Ubuntu, MeeGo and Arch Linux, if the system is suspended and then restarted, Bluetooth device is recognised. But even more important, wifi just works. However, the LED remains off.

I went to the shop from where I bought it - no luck. They fiddled with hardware, reconnected some cables and symptoms remain the same. They wanted Windows to do anything more.

I thought I would at least email the problem to Lenovo support. No luck - the serial number of my system is rejected as being invalid. I hope it is because the sale is not yet in their system. Oh, well, will have to follow-up.

In the process, I found that a driver ideapad-acpi(ideapad-laptop) has been submitted to the mainline kernel. So, the functions for enabling/disabling wireless should work and that may clear up what is definitely a bios bug.

Meanwhile there is one advantage though - no unauthorised user can use of the wifi on my netbook :)