Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Polskie forum (Polish) Instalacja i sprzęt
  • Search

[SOLVED] bcm4318 in master mode

Pytania i problemy związane z instalacją Gentoo oraz sprzętem

Moderator: SlashBeast

Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
Author
Message
professor1234
n00b
n00b
Posts: 62
Joined: Sun Mar 27, 2005 10:38 pm
Location: Kraków, Poland

[SOLVED] bcm4318 in master mode

  • Quote

Post by professor1234 » Sun Apr 10, 2011 9:21 am

Witam,

Jestem w trakcie uruchamiania magicznej karty broadcom-a na chipsecie bcm4318 i pojawiły się problemy.
Otóż czynności robiłem zgodnie z: http://forums.gentoo.org/viewtopic-t-40 ... art-0.html - udało się do punktu 4,
oraz http://en.gentoo-wiki.com/wiki/Wireless ... _.28b43.29
i http://linuxwireless.org/en/users/Drive ... %2Fbcm43xx

Zemergowałem bc43xx-fwcutter ściągnąłem plik z linuxwireless http://downloads.openwrt.org/sources/br ... 4.tar.bz2 wypakowałem, wszedłem do katalogu /broadcom/linux później komenda

Code: Select all

export FIRMWARE_INSTALL_DIR="/lib/firmware" 
bc43xx-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta.o
I pierwszy zonk - niewłaściwa suma kontrolna. Tak więc ściągnąłem b34-fwcuttera manualnie w wersji 13 i do dzieła.
zainstalował się i więc powtórka:

Code: Select all

export FIRMWARE_INSTALL_DIR="/lib/firmware" 
bc43-fwcutter-013 -w "$FIRMWARE_INSTALL_DIR" wl_apsta.o
W katalogu /lib/firmware utworzył się katalog b43 a w nim mnóstwo plików z rozszerzeniem .fw (prawdopodobnie od firmware). Niby ok tylko jak teraz załadować to do kernela ??

Jak sprawdziłem jakie mam moduły dostępne

Code: Select all

doradus piotr123 # find /lib/modules/2.6.36-gentoo-r5/ -type f -iname 'b43*.o' -o
or -iname 'b43*.ko'     
/lib/modules/2.6.36-gentoo-r5/kernel/drivers/net/wireless/b43/b43.ko
/lib/modules/2.6.36-gentoo-r5/kernel/drivers/net/wireless/b43legacy/b43legacy.ko
Tylko mam wraże nie że ten moduł b43 wcale nie korzysta z tego co jest w katalogu /lib/firmware.

Jeszcze dorzucam dmesg:

Code: Select all

doradus piotr123 # dmesg |grep b43
[   10.495985] b43-pci-bridge 0000:00:0b.0: PCI INT A -> Link[LNKA] -> GSI 10 (level, low) -> IRQ 10
[   12.048877] b43-phy0: Broadcom 4318 WLAN found (core revision 9)
[   12.063106] b43-phy0 debug: Found PHY: Analog 3, Type 2, Revision 7
[   12.063170] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 8
[   12.108632] Registered led device: b43-phy0::tx
[   12.108953] Registered led device: b43-phy0::rx
[   12.110191] Registered led device: b43-phy0::assoc
[   12.110728] Registered led device: b43-phy0::radio
[   42.185160] b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)
[   42.217694] b43-phy0 debug: Chip initialized
[   42.224581] b43-phy0 debug: 32-bit DMA initialized
[   42.225163] b43-phy0 debug: QoS enabled
[   42.238001] b43-phy0 debug: Wireless interface started
[   42.264389] b43-phy0 debug: Adding Interface type 2
[   46.639372] b43-phy0 debug: Removing Interface type 2
[   46.641942] b43-phy0 debug: Wireless interface stopped
[   46.641996] b43-phy0 debug: DMA-32 rx_ring: Used slots 1/64, Failed frames 0/0 = 0.0%, Average tries 0.00
[   46.644189] b43-phy0 debug: DMA-32 tx_ring_AC_BK: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00
[   46.646155] b43-phy0 debug: DMA-32 tx_ring_AC_BE: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00
[   46.648421] b43-phy0 debug: DMA-32 tx_ring_AC_VI: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00
[   46.651391] b43-phy0 debug: DMA-32 tx_ring_AC_VO: Used slots 2/256, Failed frames 0/11 = 0.0%, Average tries 1.00
[   46.653665] b43-phy0 debug: DMA-32 tx_ring_mcast: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00
[   46.802111] b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)
[   46.824183] b43-phy0 debug: Chip initialized
[   46.825006] b43-phy0 debug: 32-bit DMA initialized
[   46.827703] b43-phy0 debug: QoS enabled
[   46.835860] b43-phy0 debug: Wireless interface started
[   46.856604] b43-phy0 debug: Adding Interface type 1
[   46.974255] b43-phy0 debug: Removing Interface type 1
[   46.976906] b43-phy0 debug: Wireless interface stopped
[   46.977227] b43-phy0 debug: DMA-32 rx_ring: Used slots 0/64, Failed frames 0/0 = 0.0%, Average tries 0.00
[   46.979283] b43-phy0 debug: DMA-32 tx_ring_AC_BK: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00
[   46.984171] b43-phy0 debug: DMA-32 tx_ring_AC_BE: Used slots 2/256, Failed frames 0/1 = 0.0%, Average tries 1.00
[   46.986168] b43-phy0 debug: DMA-32 tx_ring_AC_VI: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00
[   46.988560] b43-phy0 debug: DMA-32 tx_ring_AC_VO: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00
[   46.990155] b43-phy0 debug: DMA-32 tx_ring_mcast: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00
Oczywiście chodzi o ustawienie tego broadcoma w master mode (chcę postawić na tym AP).

Z góry dzięki za pomoc, pozdrawiam
Last edited by professor1234 on Thu Apr 14, 2011 3:13 pm, edited 1 time in total.
Top
lsdudi
Guru
Guru
User avatar
Posts: 392
Joined: Sun Nov 12, 2006 9:53 pm
Location: Warsaw

  • Quote

Post by lsdudi » Sun Apr 10, 2011 10:40 am

nie kombinuj firmware jest w portage

Code: Select all

emerge net-wireless/b43-firmware
RLU#416942
Top
professor1234
n00b
n00b
Posts: 62
Joined: Sun Mar 27, 2005 10:38 pm
Location: Kraków, Poland

  • Quote

Post by professor1234 » Sun Apr 10, 2011 1:12 pm

tak też zrobiłem, ale w master mode za pomocą iwconfig i tak nie da się ustawić, chyba że do tego trzeba użyć innego programiku...

Code: Select all

doradus piotr123 # modprobe b43
doradus piotr123 # lsmod
Module                  Size  Used by
b43                   150654  0 
mac80211              118836  1 b43
ssb                    29104  1 b43
doradus piotr123 # iwconfig 
lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
doradus piotr123 # iwconfig wlan0 mode master
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Invalid argument.
doradus piotr123 #
Top
professor1234
n00b
n00b
Posts: 62
Joined: Sun Mar 27, 2005 10:38 pm
Location: Kraków, Poland

  • Quote

Post by professor1234 » Wed Apr 13, 2011 8:36 pm

Witam ponownie,

Udało mi się uruchomić te kartę w trybie AP i nawet ładnie działa, niemniej mam kilka pytań odnośnie IPTABLES.
Zapewne pojawiały się one wiele razy ale teraz jakoś nie mogę tego znaleźć.

Otóż łączę się z netem przez eth0, administrator ustawił TTL na 1 więc zmieniam TTL pakietów przychodzących:

Code: Select all

iptables -t mangle -A PREROUTING -j TTL --ttl-set 12
Ponieważ udostępniam neta po wlan0 robię maskaradę

Code: Select all

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
Później jeszcze

Code: Select all

echo 1 > /proc/sys/net/ipv4/ip_forward
No i niestety routowanie nie działa. Kompy w sieci "widzą" access pointa łączą się z nim, mogę przez sshd z nich logować się na routerek ale net na nich nie działa...
Gdzie tkwi błąd ??

pzdr
Top
SlashBeast
Retired Dev
Retired Dev
User avatar
Posts: 2922
Joined: Tue May 23, 2006 11:50 am
Contact:
Contact SlashBeast
Website

  • Quote

Post by SlashBeast » Wed Apr 13, 2011 8:54 pm

Przeczytaj regulamin. [jeden temat, jeden problem] i [SOLVED].
Top
professor1234
n00b
n00b
Posts: 62
Joined: Sun Mar 27, 2005 10:38 pm
Location: Kraków, Poland

  • Quote

Post by professor1234 » Thu Apr 14, 2011 9:51 am

OK, pytanie o te iptables wrzucę w innym poscie.

W związku z tym że na sieci nie ma w jednym miejscu jak skonfigurować wszystko zeby ruszył ten AP to poniżej krótki przewodnik - może komuś się przyda i spędzi mniej czasu nad tym.

1) włączenie potrzebnych modułów w kernelu

Code: Select all

device drivers --->
     network device support --->
          wireless lan 
              M broadcom 43xx wireless support (mac80211 stack)
              * broadcom 43xx pcmcia device support
              * support for low-power (LP-PHY) devices
              * broadcom 43xx debuging
              M broadcom 43xx-legacy wireless support (mac80211 stack)
              * broadcom 43xx-legacy debugging
              * IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)
              * support downloading firmware images with Host AP driver
              * support for non-volatile firmware download

Networking support --->
     wireless --->
         * cfg80211 - wireless configuration API
         * nl80211  - testmode command
         * enable developer warnings 
         * cfg80211 regulatory debugging
         * enable powersave by default
         * cfg80211 wireless extensions compability
         * wireless extensions sysfs files
         * common routines for IEEE 802.11 drivers 
         * lib80211 debugging messages
         M Generic IEEE 802.11 Networking Stack (mac80211)
         * enable led triggers
         * select mac80211 debugging features
UWAGA - nie wiem czy wszystkie z nich muszą być włączone - zapewne nie, szczególnie, które mają debug w nazwie - jak ktoś tu na forum lepiej zna sprawę modułów do b43, proszę niech poprawi.

Następna rzecz - to sprawdzenie jaki mamy chip na karcie i ściągniecie driverów

Code: Select all

lspci -n | grep 14e4:43
Jak widzimy co mamy to patrzymy do tabeli z http://linuxwireless.org/en/users/Drivers/b43
Jeżeli pisze że supported to tylko się cieszyć i dalej...
2) instalacja b43-fwcutter
opcje są dwie:
manualnie:

Code: Select all

cd /
wget http://bu3sch.de/b43/fwcutter/b43-fwcutter-013.tar.bz2
tar xjf b43-fwcutter-013.tar.bz2
cd b43-fwcutter-013
make
cd /
export FIRMWARE_INSTALL_DIR="/lib/firmware"
wget http://mirror2.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2
tar xjf broadcom-wl-4.150.10.5.tar.bz2
cd broadcom-wl-4.150.10.5/driver
../../b43-fwcutter-013/b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta_mimo.o
lub przez emerge tak jak pisze lsdudi

Code: Select all

emerge net-wireless/b43-firmware
Próbowałem z driverami 4.178.10.4, ale mi nie działało
3) hostapd
Zaczynamy standardowo, czyli opcje dwie:
manualnie:

Code: Select all

cd /
wget http://hostap.epitest.fi/releases/hostapd-0.7.3.tar.gz
tar xzf hostapd-0.7.3.tar.gz
cd hostapd-0.7.3/hostapd
cp defconfig .config
I tu trzeba zmodyfikować .config - odhaszować linijkę jak poniżej

Code: Select all

nano -w /hostapd-0.7.3/hostapd/config
CONFIG_DRIVER_NL80211=y
Teraz kompilacja

Code: Select all

make
lub przez emerge

Code: Select all

emerge net-wireless/hostapd
4) Na koniec jeszcze plik konfiguracyjny hostapd
Tak na pierwszy strzał żeby sprawdzić czy działa:

Code: Select all

cd /hostapd-0.7.3/hostapd
touch hostapd-minimal.conf
nano -w hostapd-minimal.conf
interface=wlan0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
driver=nl80211
ssid=moj_ap
hw_mode=g
channel=10
5) Zanim uruchomisz hostapd
Trzeba wykonać pewne czynności przed uruchomieniem hostapd. Mogą się wydawać dziwne, ale w innym przypadku nie działa.
pierwsza z nich jest typowa, kolejność pozostałych już mniej:

Code: Select all

modprobe b43
iwconfig txpower 20
ifconfig wlan0 192.168.0.1/24 up
Teraz można już uruchomić hostapd

Code: Select all

cd /
./hostapd-0.7.3/hostapd/hostapd ./hostapd-0.7.3/hostapd/hostapd-hastapd-minimal.conf
Nie jest to program, który zachowuje się jak skrypt czyli dostaniemy kilka radosnych komunikatów i powróci do konsoli, dopóki działa dana konsola jest zajęta. U mnie wygląda to mniej więcej tak:

Code: Select all

doradus / # ./hostapd-0.7.3/hostapd/hostapd ./hostapd-0.7.3/hostapd// hostapd-minimal.conf 
Configuration file: ./hostapd-0.7.3/hostapd/hostapd-minimal.conf
Using interface wlan0 with hwaddr 00:23:54:4a:b8:5c and ssid 'moj_ap'
wlan0: STA 00:12:0e:49:55:95 IEEE 802.11: authenticated
AP-STA-DISCONNECTED 00:12:0e:49:55:95
wlan0: STA 00:12:0e:49:55:95 IEEE 802.11: disassociated
wlan0: STA 00:12:0e:49:55:95 IEEE 802.11: associated (aid 1)
AP-STA-CONNECTED 00:12:0e:49:55:95
wlan0: STA 00:12:0e:49:55:95 RADIUS: starting accounting session 4DA6DDC9-00000000
wlan0: STA 00:12:0e:49:55:95 IEEE 802.11: deauthenticated due to inactivity
wlan0: STA 00:12:0e:49:55:95 IEEE 802.11: authenticated
wlan0: STA 00:12:0e:49:55:95 IEEE 802.11: associated (aid 1)
AP-STA-CONNECTED 00:12:0e:49:55:95
wlan0: STA 00:12:0e:49:55:95 RADIUS: starting accounting session 4DA6DDC9-00000001
^Cdoradus / #
Top
Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Instalacja i sprzęt”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic