Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: How to recompile and load my WiFi driver

  1. #1
    Join Date
    May 2010
    Beans
    35

    How to recompile and load my WiFi driver

    Hello, I am not a technical specialist, just an ordinary user.

    I am working under Ubuntu 12.04.3 LTS (kernel 3.2.0-53-generic-pae) on a Dell Vostro 3700 portable.
    My WiFi chip is Broadcom BCM4313.

    My WiFi driver is the open source brcmsmac (also known as brcm80211).

    The driver does not recognise channel 13 which is annoying when I try to use the network of a friend who must use this channel on his router.

    There is a solution at http://133nux.blogspot.com.es/2011/12/missing-channel-13-this-time-broadcom.html which seems to fix this problem according to several users, but it involves changing a line in source code (file brcmsmac/channel.c), and compiling and reloading the driver. I cannot find the source code for the driver in my system and I don't understand the instructions of Broadcom on how to get and use the source code at http://wireless.kernel.org/en/users/Drivers/brcm80211 . Could you please guide me on how to download the driver source code, how to put it in the right place, how to compile the driver after editing the channel.c file, and how to reload load the compiled version?

    Thanks and best regards, John

    Last edited by lisati; September 27th, 2013 at 08:56 PM. Reason: "fix" link

  2. #2
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    23,550
    Distro
    Ubuntu 17.10 Artful Aardvark

    Re: How to recompile and load my WiFi driver

    First, the link you gave is broken. Second, it was written in 2011 which is about 1913 in Linux years. Third, the copy of /drivers/net/wireless/brcm80211/brcmsmac/channel.c that I have, from compat-wireless, doesn't contain the line referred to at all.

    What does this tell us?
    Code:
    iw reg get
    Does the region correctly reflect your country code from here? http://en.wikipedia.org/wiki/ISO_3166-1 If you set it:
    Code:
    sudo iw reg set GB
    ^^ Or whatever your correct country code is, if not my example GB. Then does channel 13 appear?
    Code:
    sudo iwlist wlan0 chan
    If that helps, we can amend one file and make it persistent.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  3. #3
    Join Date
    May 2010
    Beans
    35

    Re: How to recompile and load my WiFi driver

    Thanks so much, Tarballs R Us.

    Both links I gave work for me, the one with the 2011 advice (http://133nux.blogspot.com.es/2011/1...-broadcom.html) and the one with official information on the brcmsmac WiFi driver (http://wireless.kernel.org/en/users/Drivers/brcm80211); maybe there was a problem when I transposed them.

    I have spent hours on his and tried first of course to make sure that the country code was right. It had already been set for France as confirmed by the running your first command:

    john@JOHN-PC:~$ iw reg get
    country FR:
    (2402 - 2482 @ 40), (N/A, 20)
    (5170 - 5250 @ 40), (N/A, 20)
    (5250 - 5330 @ 40), (N/A, 20), DFS
    (5490 - 5710 @ 40), (N/A, 27), DFS

    Here is the result for your third command (second one not needed since coutry code was already set):
    john@JOHN-PC:~$ sudo iwlist wlan0 chan
    [sudo] password for john:
    wlan0 13 channels in total; available frequencies :
    Channel 01 : 2.412 GHz
    Channel 02 : 2.417 GHz
    Channel 03 : 2.422 GHz
    Channel 04 : 2.427 GHz
    Channel 05 : 2.432 GHz
    Channel 06 : 2.437 GHz
    Channel 07 : 2.442 GHz
    Channel 08 : 2.447 GHz
    Channel 09 : 2.452 GHz
    Channel 10 : 2.457 GHz
    Channel 11 : 2.462 GHz
    Channel 12 : 2.467 GHz
    Channel 13 : 2.472 GHz
    Current Frequency=2.462 GHz (Channel 11)

    Please note that for this command, I was connected to a router working on Channel 11. When I swich this router to Channel 13 Ubuntu no longer sees this access point. For convenience I now have two WiFi routers working, one on Channel 11 and one on Channel 13. My Windows XP on dual boot recoginises and works with both networks without problem. When I am connected to the router working on Channel 11, Channel 13 is seen as per the above results (and the Channel 13 router SSID is recognized in the Ubuntu connections utility), but strangely when I am not connected to the Channel 11 router, the connections utility sees the SSID of the Channel 11 router but NOT the SSID of the Channel 13 router.

    It seems pretty clear that Broadcom has not taken into account Channels 12 to 14 in developing their driver, see the explanation on the above-mentioned brcmsmac information page:
    "This generation of chips contain additional regulatory support independent of the driver. The devices use a single worldwide regulatory domain, with channels 12-14 (2.4 GHz band) and channels 52-64 and 100-140 (5 GHz band) restricted to passive operation. Transmission on those channels is suppressed until appropriate other traffic is observed on those channels. Within the driver, we use the ficticious country code "X2" to represent this worldwide regulatory domain. There is currently no interface to configure a different domain. The driver reads the SROM country code from the chip and hands it up to mac80211 as the regulatory hint, however this information is otherwise unused with the driver."

    The 2011 blog link is all that I have been able to find which is potentially useful, and at least two persons have said that it worked at that time (indeed a long time ago). If I understand correctly the brcmsmac driver is integrated in the Ubuntu kernel which is why I cannot find the source code on my machine? I really hope you will be able to help me resolve this, since I am soon leaving for a month to the place where there is only Channel 13, and if it can't work on Ubuntu I will be obliged to work there with Mr. Gates' proprietary OS and later transfer my work to the real thing!

    Best regards, John
    Last edited by John_Rose; September 27th, 2013 at 05:15 PM. Reason: correction of typo

  4. #4
    Join Date
    May 2010
    Beans
    35

    Re: How to recompile and load my WiFi driver

    Dear Tarballs R Us,

    I would like to add two pieces of information:

    1. In fact, I see the Channel 13 router with the Ubuntu connections utilitiy sometimes when I am not connected to a network and sometimes when I am connected to the Channel 11 network, but sometimes in either case I cannot see it. In any case, if it is listed and I ask to connect, it tries for several minutes, then asks me for the password, then tries for several minutes then asking again for the password, not being able to connect. My Channel 13 router is set to WPA (TKIP + AES) - I don't see such detail in the Ubuntu connections utility (It's called 'Connexions réseau" in French), it only gives the choice of WPA or WPA2 personal or WPA or WPA2 enterprise.

    2. When I first had this problem I was using the Broadcom proprietary wl driver. I understood from the web that the bcrmsmac driver was just as good for most purposes, and since it is open source I switched to it, but the Channel 13 problem remained.

    Hope you will be able to help, thanks and best regards, John
    Last edited by John_Rose; September 27th, 2013 at 05:16 PM. Reason: correction of typo

  5. #5
    Join Date
    May 2010
    Beans
    35

    Re: How to recompile and load my WiFi driver

    Dear Tarballs R Us,

    It's me again, just to make sure that it is not a problem of security protocol, I checked under different parameters the router on which I had set Channel 13:
    * Channel 11 under WEP: it works
    * Channel 11 under WPA (TKIP+AES): it works
    * Channel 13 under WEP: it doesn't work
    * Channel 13 under WPA (TKIP+AES): it doesn't work (this was the case cited in my original message).
    Concerning the router on which I had set Channel 11
    * It works under WEP and WPA (TKIP+AES) on Channel 11
    * It doesn't work under WPA (TKIP+AES) on Channel 13.

    Thus for me it is clear that cannel compatibility is indeed the problem.
    Last edited by John_Rose; September 27th, 2013 at 05:16 PM. Reason: correction of typo

  6. #6
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    23,550
    Distro
    Ubuntu 17.10 Artful Aardvark

    Re: How to recompile and load my WiFi driver

    Thus for me it is clear that cannel compatibility is indeed the problem.
    I agree.

    I have been studying this and Googling for two days. Mrs. Chili just remarked, "Hey, brcmsmac man! We're supposed to be on vacation!" Frankly, I have found no way to trick the currently installed brcmsmac driver to happily use channels 12 and 13. I suggest we try a later brcmsmac version as there does seem to be some evidence that the defect has been addressed and a patch applied. Here, for example: http://www.gossamer-threads.com/list...kernel/1532375
    I am working under Ubuntu 12.04.3 LTS (kernel 3.2.0-53-generic-pae)
    Are you sure? I thought 12.04.3 used a 3.8.0-xx kernel. Confirm:
    Code:
    uname -r
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  7. #7
    Join Date
    Jun 2011
    Beans
    412
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to recompile and load my WiFi driver

    Quote Originally Posted by chili555 View Post
    I agree.

    I have been studying this and Googling for two days. Mrs. Chili just remarked, "Hey, brcmsmac man! We're supposed to be on vacation!" Frankly, I have found no way to trick the currently installed brcmsmac driver to happily use channels 12 and 13. I suggest we try a later brcmsmac version as there does seem to be some evidence that the defect has been addressed and a patch applied. Here, for example: http://www.gossamer-threads.com/list...kernel/1532375Are you sure? I thought 12.04.3 used a 3.8.0-xx kernel. Confirm:
    Code:
    uname -r
    If OP installed precise from the beginning and updated/upgraded his/her output of the kernel release is correct. You have kernel 3.8.XX in case you did a fresh install of 12.04.3 or upgraded from 12.04.2 where the LTS Hardware Enablement Stack got started (https://wiki.ubuntu.com/PrecisePango...ablement_Stack) and updated to 12.04.3 which is using parts of raring.
    Last edited by Gyokuro; September 28th, 2013 at 04:17 PM.

  8. #8
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,149
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to recompile and load my WiFi driver

    Quote Originally Posted by Gyokuro View Post
    If OP installed precise from the beginning and updated/upgraded his/her output of the kernel release is correct. You have kernel 3.8.XX in case you did a fresh install of 12.04.3 or upgraded from 12.04.2 where the LTS Hardware Enablement Stack got started (https://wiki.ubuntu.com/PrecisePango...ablement_Stack) and updated to 12.04.3 which is using parts of raring.
    ..and I believe it does get upgraded to 3.8.. but maybe takes many successive update/upgrade cycles. Is my belief correct?
    A discussion of that sort here
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  9. #9
    Join Date
    May 2010
    Beans
    35

    Re: How to recompile and load my WiFi driver

    Thanks so much all, I'm sure that with your continued advice we can solve this problem. I definitely have kernel version 3.2.0-53-generic-pae:
    john@JOHN-PC:~$ uname -r
    3.2.0-53-generic-pae

    I did not do a clean install of Ubuntu 12.04.3 LTS, but rather upgraded from the previous long-term support version Ubuntu 10.04 LTS. In the upgrade utility I have been proposed several upgrades to 3.2.0-xx which I have successively installed, no mention about upgrading beyond version 3.2.0.

    The 2011 blog that I cited speaks about a fix for the channel 12 & 13 problem committed to kernel versions "3.0.31, 3.3.4 & 3.2.17", but the announcement for this fix saying "commit badc4f07622f0f7093a201638f45e85765f1b5e4 upstream" (http://www.serverphorums.com/read.php?12,485400) says "This patch is to be applied to the stable tree for kernel versions 3.2 and 3.3."

    Thus I went to the Linux Wireless site (http://wireless.kernel.org/en/users/...table_releases) and downloaded the tarball for the only stable 3.2 version which is 3.2.5-1 (thus older than 3.2.17 announced above). According to the instructions, I decompressed this in my Desktop and ran:
    ./scripts/driver-select brcmsmac
    make
    sudo make install

    In the make step I got several errors:
    /home/john/Desktop/compat-wireless-3.2.5-1/net/wireless/util.c:810:2: erreur: implicit declaration of function ‘br_port_exists’ [-Werror=implicit-function-declaration]
    cc1: some warnings being treated as errors
    make[3]: *** [/home/john/Desktop/compat-wireless-3.2.5-1/net/wireless/util.o] Erreur 1
    make[2]: *** [/home/john/Desktop/compat-wireless-3.2.5-1/net/wireless] Erreur 2
    make[1]: *** [_module_/home/john/Desktop/compat-wireless-3.2.5-1] Erreur 2
    make[1]: quittant le répertoire « /usr/src/linux-headers-3.2.0-53-generic-pae »
    make: *** [modules] Erreur 2

    And at the make install step it said "Your old wireless subsystem modules were left intact:"

    Does this give you a basis for some more advice? Best regards, John
    Last edited by John_Rose; September 29th, 2013 at 10:34 AM.

  10. #10
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,149
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to recompile and load my WiFi driver

    Quote Originally Posted by John_Rose View Post
    In the make step I got several errors:
    /home/john/Desktop/compat-wireless-3.2.5-1/net/wireless/util.c:810:2: erreur: implicit declaration of function ‘br_port_exists’ [-Werror=implicit-function-declaration]
    cc1: some warnings being treated as errors
    make[3]: *** [/home/john/Desktop/compat-wireless-3.2.5-1/net/wireless/util.o] Erreur 1
    make[2]: *** [/home/john/Desktop/compat-wireless-3.2.5-1/net/wireless] Erreur 2
    make[1]: *** [_module_/home/john/Desktop/compat-wireless-3.2.5-1] Erreur 2
    make[1]: quittant le répertoire « /usr/src/linux-headers-3.2.0-53-generic-pae »
    make: *** [modules] Erreur 2
    It maybe helpful if we could see the full output of 'make'. Please try again and post the full output.

    While posting the outputs, please use the 'Code' box to preserves its formatting. It also makes your post cleaner, compact and more readable. Please follow the "Using Code Tags" link in my signature to see how.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •