Rafał Miłecki ─ Zajec

Broadcom 802.11n support in b43

I've started hacking on b43 about a year ago when I got my [del]BCM4328[/del] BCM4321 as Christmas gift. Unfortunately after few months of programming I've lost access to notebook where I put this card and couln't develop b43 anymore. That way you didn't see any N-PHY b43 commits until... Francesco Gringoli appeared and offered me ssh access to machine with his [del]BCM4328[/del] BCM4321 :)

Today, after a lot of fixes and improvements I finally found the last issue that stopped card from receiving! It appeared we were missing single N-PHY-specific bit in common path in b43. After fixing that I finally saw scanning results and Francesco succesfully tested associating to open network!

Please note, all this work was only possible thanks to Larry Finger who created great specifications as result of his reverse engineering efforts!


So what is the current state?
- You need to clone wireless-testing git tree (and apply my patchset locally until John get it)
- Firmware can be extracted with b43-fwcutter 0.13 from 4.174.64.19
- It works with BCM4328, should work with any N-PHY with PHY revision below 3
- We support only SSB-based devices, for SSB-less devices there is brcm80211 driver

What do we still need?
- Check for WEP, WPA
- RX and TX calibration
- Support for 40 MHz wide channels
- Support for 5 GHz channels
- Support for PHYs rev3+
- Check for differences between b43 and wl
- Release MMIO tools
- In long term support for SSB-less devices maybe (brcm80211 does it)

It would be great if someone could donate me with card that has PHY revision 3 or higher. It's hard to find such a card in shop, as you generally can not check for PHY revision. In case you own some Broadcom 802.11n card, you can enable kernel debugging and check for revision in dmesg:
b43-phyX debug: Found PHY: Analog 5, Type 4, Revision 2

  1. ~wwoods ─ 08.12.2010

    Awesome work!

    The BCM4322 in my MacBookPro7,1 says:
    b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog 8, Type 4, Revision 4)

    So I'd guess that most recent (June 2010 or later) Apple laptops would have cards with PHY rev 4 or higher. Maybe you could find one of those?

  2. ~Jacek ─ 08.12.2010

    Wpisz listę "życzeń" dot. konkretnych modeli kart, które chciałbyś otrzymać pod choinkę.

  3. ~vasi ─ 08.12.2010

    It works! Lots of "PHY transmission error" warnings, but the connection seems stable nevertheless. I seem to be able to achieve 16Mbps only, but I'm not sure that my PoS router could ever do better that that.

  4. ~Rx ─ 08.12.2010

    popieram Jacka.
    Jak będę wiedział czego szukać to będzie mi łatwiej podejść na PP:)

  5. ~user_linux ─ 08.12.2010

    Witam :)
    Dzięki za wkład i poświęcony czas na opracowanie nowej wersji sterownika b43 :)

    Mam pytanko dotyczące obsługi karty BCM4328, czy z nowym sterownikiem będzie można ustawić tryb "monitor mode" dla tej karty?

    Pozdrawiam

  6. ~Troy Unrau ─ 08.12.2010

    Sweet! I have that chip in my laptop and have to use the broadcom binary blob to get it working (granted, their driver works quite well). Hopefully this means that in a few months, I can drop the last remaining binary blob I regularly use :)

    Kudos

  7. ~hadess ─ 08.12.2010

    Hey Rafał, is this a case where hardware donations would help? I'm pretty sure something could be done if that's the case. Feel free to drop me a line hadess (at) http://hadess.net

  8. Zajec ─ 08.12.2010

    wwoods: your PHY is revision 4, that's something I need, but buying MacBookPro for getting WiFi card is unfortunately no option for me ;)

    If you compiled my latest patches and still see error like:
    b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog X, Type 4, Revision 3/4/5/...)
    This means it's a card I'd like to have.

    Unfortunately I don't think there is a option to know PHY revision just by looking at card :(

  9. ~follow ─ 09.12.2010

    Is there any live-cd that would allow me to check the PHY rev easily?

  10. Zajec ─ 09.12.2010

    follow: I'm afraid, no :(

    b43 had to be compiled with debugging enabled or NPHY, which was marked as broken.

    But... hm, moment, maybe your dirsto provides some kernel with enabled debugging options and it'll have b43 debugging turner on? Then you could see PHY revision.

  11. ~follow ─ 09.12.2010

    My "disto" is MacOS X :(

    Somebody above said that it has PHY4, so we could arrange to make it available for you for development.

    But I don't have time at the moment to install Linux on it.

    I will try some USB-distro when time permits.

  12. ~vasi ─ 09.12.2010

    follow: I'm afraid that USB distros have trouble booting on Macs :( You'd have to boot with EFI rather than BIOS (aka "Boot Camp"), which is possible but rather experimental, see: http://grub.enbug.org/TestingOnMacbook

  13. ~follow ─ 09.12.2010

    Zajec - if the machine turns out to have PHY4 - would it be helpful at all if you can access it via ssh?

    If so - I will keep trying.

  14. ~zibi ─ 09.12.2010

    Podaj proszę konkretnych producentów + typy kart.

  15. ~qrd ─ 10.12.2010

    Zajec - zrób zakładkę "donate" abym miał numer konta, z chęcią przeleję kasiorę na dalszą "developerkę" :) pozdr! albo poproszę na mejla synkretyzm@g.pl

  16. ~abix_adamj ─ 10.12.2010

    Zajec - tak, podaj jakies konkretne karty, może Mikołaj zdąży.....

  17. ~Ris ─ 10.12.2010

    A gdzie numer konta?
    ris@linux.pl

  18. ~SeBO ─ 10.12.2010

    Zajec , uzywasz OpenSuse ?? Bo wydaje mi się, że znam Twój nick z forum :)
    ... Ale to nie ważne. Nie mam takiej karty ale wesprzeć mogę tylko ... emmm ... gdzie masz numer konta ??

  19. ~_dash ─ 10.12.2010

    Prosimy o numer konta...

  20. ~mesiu84 ─ 10.12.2010

    również dołączam się do podania numeru konta, nie posiadam tej karty, ale chętnie dorzucę się do zakupu takiej jeśli miałoby to wspomóc Linuksa :-)

  21. ~janosik ─ 10.12.2010

    give me your paypal address I'll support you :)

  22. ~wariat ─ 10.12.2010

    http://pledgie.com/ wyklikaj co trzeba i daj jakoś znać ludności. Byłoby łatwiej gdybyś miał tu RSS jakiś ale jak go nie ma to ... będziesz musiał coś wymyślić. :)

  23. ~bluebird ─ 10.12.2010

    Could you list some particular models that you're intrested in? And bank account/PayPal ...

  24. ~flak ─ 10.12.2010

    Wykonałem niewielki rekonesans w sprawie typów i dostępności kart Broadcomu i to co znalazłem.

    Jeśli chodzi o karty z trybem 802.11n to wygląda na to że Broadcom skupił się wyłącznie na kartach wewnętrznych do laptopów – mini-PCIe oraz produktach wbudowanych i routerach. Jeśli chodzi o routery i produkty wbudowane to z przyczyn oczywistych dotacje ich nie mają sensu. Jeśli chodzi o laptopy to Broadcom jest baaardzo często wykorzystywany i tu jest problem. Te karty są standardowo wpinane wewnątrz laptopów i kupić je osobno nie jest prosto. Zostaje chyba tylko allegro jest tam dział z kartami mini-PCI i mini-PCIe. Niestety to dział z „częściami zapasowymi” do laptopów i elementami po demontażowymi (ten drugi to z przyczyn oczywistych głównie karty 802.11bg). Kart Broadcom jest tam dużo ale kart 802.11n jest względnie mało (części zapasowe). Na każdej jest wyraźne logo Broadcomu, czy posiada tryb 802.11n można wywnioskować z opisu, nazwa chipsetu choć wyraźnie widoczna jest zazwyczaj dość pogmatwana. Co do kart do komputerów stacjonarnych: PCI/PCI-E to nie znalazłem nic. Nawet Asus zamiast układów Broadcomu stosuje teraz chipsety wifi Ralinka. CardBus i PCMCIA też nic.

    W tej sytuacji pozostaje kupić jakąś kartę mini-PCIe lub przelać pieniądze na konto. Zajec to co z tym numerem konta?

  25. Zajec ─ 10.12.2010

    follow: yes, ssh access could help. Not that much as having hardware at home, but it's always better than nothing :)

    zibi, abix_adamj: tak jak napisał flak, niestety ciężko jest w ogóle coś kupić, Trzeba polować na Allegro, albo ściągać z zagranicy. A ja tu jeszcze dodatkowo potrzebuję kartę z odpowniednią wersją PHY :(

    bluebird: as I told, it's hard to find proper card because usually you can not check for PHY revision.

    SeBO: tak, to ten Zajec, z openSUSE :)

    wariat: właściwie to jest ATOM, tylko się nie wyświetla link. Zaraz poprawię.

  26. Zajec ─ 10.12.2010

    Dodałem blok z informacjami o mnie: e-mail, nr rachunku, PayPal. Gdyby ktoś zamierzał dorzucić się do zakupu kart, napiszcie proszę czy mogę potem ujawnić Wasze imię/nazwisko :)

    I've added block with my data: e-mail, account number, PayPal. If you plan to donate me, please inform if I can share your name :)

  27. ~dede ─ 10.12.2010

    Na razie trzy dychy z inteligo. Pozdrawiam

  28. ~janosik ─ 10.12.2010

    i 50 z mbanku :) na dobry poczatek

  29. ~wariat ─ 11.12.2010

    Nie wiem kim jest ATOM (pomijając tego od Intela) ale posłałem 50 na piwo żeby Ci kod wychodził bardziej takki miękki.
    W życiu nie miałem broadcoma ale huk wie co na człowieka trafi :D

  30. ~wariat ─ 11.12.2010

    Aaaaa ten ATOM o ja gupi :D

  31. ~janosik ─ 11.12.2010

    Tez zawsze unikalem broadcoma ale na MACa sie przesiadlem i dup.. bcm4322
    Binarka dziala tak ze jak jestem podlaczony do zasilacza to pingi mam po 50ms a jak odepne zasilacz to mam po 800ms albo wogole nie moge sie polaczyc... jest caly watek o tym: http://ubuntuforu...0219367#post10219367

  32. ~follow ─ 11.12.2010

    No success with USB boot yet.

    This is what I got with stock Fedora 14 Live-CD (regular kernel, no debug shipped on CD)

    b43-phy0: Broadcom 4322 WLAN found (core revision 16)
    b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog 8, Type 4, Revision 4)
    b43: probe of ssb0:0 failed with error -95
    Broadcom 43xx driver loaded [ Features: PMLS, Firmware-ID: FW13 ]

    Does it tell you anything?

  33. ~vasi ─ 11.12.2010

    compat-wireless has picked up the new n-phy support! http://linuxwirel...rg/en/users/Download

  34. Zajec ─ 11.12.2010

    follow: that sounds interesting! Can you mail me, please? Find my e-mail in box places on left.

  35. ~www.Q22.pl ─ 13.12.2010

    puściłem przelew. Pozdrawiam.

  36. ~Vasi ─ 15.12.2010

    @gee: compat-wireless got it from linux-next a few days ago, I'm using it now. Even submitted a patch for the config option! http://git.kernel...f35fb614229e1ed94449

  37. ~gee ─ 16.12.2010

    Awesome!
    Time to retry using my card then.
    Thanks Rafal and Vasi!

  38. ~Tobias ─ 17.12.2010

    I still have 4329 mini-pc in my Asus WL-500W router.

    But in forum.openwrt.org people have statedly switched this one out for Atheros en masse. I suspect there are dozens of unused 4329 cards availabe for free now. Just post there.

  39. ~gee ─ 22.12.2010

    so I have tried using wireless-compat but it does not work:


    dmesg | grep b43
    b43-pci-bridge 0000:05:04.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
    b43-phy1: Broadcom 4321 WLAN found (core revision 11)
    Registered led device: b43-phy1::tx
    Registered led device: b43-phy1::rx
    Registered led device: b43-phy1::radio
    b43-phy1: Loading firmware version 478.104 (2008-07-01 00:50:23)

    Debugging kernel is activated.

    I am wondering if my wireless-compat does have your patch, although I grabbed a tarball from yesterday.

  40. ~linux user PL ─ 31.12.2010

    oj wiem co to bcm :-/ i ile się przy nim trzeba naszarpać żeby się uruchomił czasem ta firma to chyba jakaś porażka

  41. ~Qmfzupsn ─ 03.02.2011

    Keep movin! Write more

  42. ~Serval Paul ─ 13.05.2012

    Hi,
    Your work on this is very interesting, as we would like to use an open source broadcom driver in some custom android phones we are getting made, so that we can control everything.

    Are you still interested in working on this, and if so, what resources would you need? We might be able to get you both hardware and funds.

    Poke me at paul@servalproject.org if interested

    Paul.

Nowy komentarz