View previous topic :: View next topic |
Author |
Message |
professor1234 n00b
Joined: 27 Mar 2005 Posts: 62 Location: Kraków, Poland
|
Posted: Sun Apr 10, 2011 9:21 am Post subject: [SOLVED] bcm4318 in master mode |
|
|
Witam,
Jestem w trakcie uruchamiania magicznej karty broadcom-a na chipsecie bcm4318 i pojawiły się problemy.
Otóż czynności robiłem zgodnie z: https://forums.gentoo.org/viewtopic-t-409194-postdays-0-postorder-asc-start-0.html - udało się do punktu 4,
oraz http://en.gentoo-wiki.com/wiki/Wireless/Access_point#Broadcom_43xx_cards_.28b43.29
i http://linuxwireless.org/en/users/Drivers/b43?action=show&redirect=en%2Fusers%2FDrivers%2Fbcm43xx
Zemergowałem bc43xx-fwcutter ściągnąłem plik z linuxwireless [url]http://downloads.openwrt.org/sources/broadcom-wl-4.178.10.4.tar.bz2
[/url] wypakowałem, wszedłem do katalogu /broadcom/linux później komenda Code: |
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: |
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: |
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: |
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 |
|
Back to top |
|
|
lsdudi Guru
Joined: 12 Nov 2006 Posts: 392 Location: Warsaw
|
Posted: Sun Apr 10, 2011 10:40 am Post subject: |
|
|
nie kombinuj firmware jest w portage
Code: | emerge net-wireless/b43-firmware |
_________________ RLU#416942 |
|
Back to top |
|
|
professor1234 n00b
Joined: 27 Mar 2005 Posts: 62 Location: Kraków, Poland
|
Posted: Sun Apr 10, 2011 1:12 pm Post subject: |
|
|
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: |
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 #
|
|
|
Back to top |
|
|
professor1234 n00b
Joined: 27 Mar 2005 Posts: 62 Location: Kraków, Poland
|
Posted: Wed Apr 13, 2011 8:36 pm Post subject: |
|
|
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: |
iptables -t mangle -A PREROUTING -j TTL --ttl-set 12
|
Ponieważ udostępniam neta po wlan0 robię maskaradę
Code: |
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
|
Później jeszcze
Code: |
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 |
|
Back to top |
|
|
SlashBeast Retired Dev
Joined: 23 May 2006 Posts: 2922
|
Posted: Wed Apr 13, 2011 8:54 pm Post subject: |
|
|
Przeczytaj regulamin. [jeden temat, jeden problem] i [SOLVED]. |
|
Back to top |
|
|
professor1234 n00b
Joined: 27 Mar 2005 Posts: 62 Location: Kraków, Poland
|
Posted: Thu Apr 14, 2011 9:51 am Post subject: |
|
|
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: |
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: |
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: |
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: |
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: |
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: |
nano -w /hostapd-0.7.3/hostapd/config
CONFIG_DRIVER_NL80211=y
|
Teraz kompilacja
lub przez emerge
Code: |
emerge net-wireless/hostapd
|
4) Na koniec jeszcze plik konfiguracyjny hostapd
Tak na pierwszy strzał żeby sprawdzić czy działa:
Code: |
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: |
modprobe b43
iwconfig txpower 20
ifconfig wlan0 192.168.0.1/24 up
|
Teraz można już uruchomić hostapd
Code: |
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: |
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 / #
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|