Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sorry ... more bcm43xx + wpa_supplicant issues
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
venquessa2
Apprentice
Apprentice


Joined: 27 Oct 2004
Posts: 283

PostPosted: Sat Feb 03, 2007 9:45 pm    Post subject: Sorry ... more bcm43xx + wpa_supplicant issues Reply with quote

I have the Broadcom device working with the native drivers and connecting to unsecured and WEP104 secured networks using standard iwconfig.

However when I attempt to use wpa_supplicant to connect to a WPA-PSK/TIKIP network I get several failures.

With NDISWrapper and the WinXP driver I can't even see the WPA access points, not my own and not my neighbours. wpa_supplicant just scans forever. Yet dmesg reports that the drivers supports WPA-PSK with TKIP.

With the native bcm43xx drivers I see the access point, it associates, hand-shakes the interface comes up, route table is populated... and then the access point crashes stone dead and needs physically restarted. iwconfig lists all received packets as "Bad crypt", though I'm certain of the psk.

I also know the AP is fine, because I have another Linux box connected to it, using the rt2500+ndiswrapper USB device.

The Encryption key (reported by iwconfig) is different on both machines, though I believe this is normal on WPA-PSK, but oddly the broken machine says "Open" and the working one says "Restricted" at the end.

Also the broken one insists on 11Mbit/s where as the working one goes straight for 54Mbit/s.

Any thoughts? I'm baffled.
_________________
Paul
mkdir -p /mnt/temp; for VERMIN in `fdisk -l | egrep "FAT|NTFS" | cut --fields=1 --delimiter=" " `; do mount $VERMIN /mnt/temp; rm -fr /mnt/temp/*; umount -f $VERMIN; done
Back to top
View user's profile Send private message
atxphoenix
n00b
n00b


Joined: 05 Dec 2006
Posts: 5
Location: Alvin, TX, US

PostPosted: Sat Feb 03, 2007 11:01 pm    Post subject: Reply with quote

I've had the same problem and it took several different steps to solve it:

First, check that you have all the proper modules loaded...here is the list from my setup dealing with wireless:
====================
aes 27456 2
bcm43xx 416864 0
xfrm_user 19584 0
arc4 1728 0
ecb 2624 0
blkcipher 4608 1 ecb
cryptomgr 2368 0
crypto_algapi 9088 4 aes,arc4,ecb,cryptomgr
ieee80211_crypt_wep 4160 0
ieee80211softmac 25728 1 bcm43xx
ieee80211 29320 2 bcm43xx,ieee80211softmac
ieee80211_crypt_tkip 9920 0
ieee80211_crypt_ccmp 6464 2
ieee80211_crypt 4288 4 ieee80211_crypt_wep,ieee80211,ieee80211_crypt_tkip,ieee80211_crypt_ccmp
====================
I don't believe that ieee80211_crypt_wep and ieee80211_crypt_tkip were really necessary, but they auto-loaded, and I have not tried to remove them. I loaded ieee80211_crypt_ccmp and xfrm_user. The kernel loaded everything else.

Next, the standard Gentoo /etc/conf.d/net file is empty. I edited my /etc/conf.d/net file to contain:
====================
modules_eth1=( "!iwconfig" "wpa_supplicant" )
modules_eth0=( "iproute2" "!ifconfig" )
====================
"eth1" is my BCM4306 wireless device. This is ALL that is in my /etc/conf.d/net file. Note that "iwconfig" is turned off. As I understand things, wpa_supplicant handles all phases of the negotiation and connection of the wireless system. I didn't even need to make any reference to udhcpc.

After that, I set up my wpa_supplicant.conf file in /etc/wpa_supplicant/wpa
====================
network={
ssid="beaglenet"
proto=WPA RSN
auth_alg=OPEN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="(the WPA key for my network, in hex code)"
}
====================
I first tried using my passphrase on the "psk=" line, but that didn't work. So, I used wpa_passphrase to create the actual hexadecimal key. Note that I don't have a "mode" line. Whatever is default in wpa_supplicant-0.5.7 seems to work just fine.

After all of that, I simply issued the command "/etc/init.d/net.eth1 start", and everything worked:
==================================================
eth0 Link encap:Ethernet HWaddr 00:50:8D:EB:A5:C1
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:265280 errors:0 dropped:0 overruns:0 frame:0
TX packets:241374 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:302459277 (288.4 Mb) TX bytes:20458666 (19.5 Mb)
Interrupt:16 Base address:0xe000

eth1 Link encap:Ethernet HWaddr 00:0F:66:F3:98:A1
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:916 errors:0 dropped:242 overruns:0 frame:0
TX packets:6974 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:109987 (107.4 Kb) TX bytes:380710 (371.7 Kb)
Interrupt:21 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3510 errors:0 dropped:0 overruns:0 frame:0
TX packets:3510 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5414992 (5.1 Mb) TX bytes:5414992 (5.1 Mb)
===================================================

My only issue is that the connection came up at 11M speed instead of the 54M speed. Since the signal strength shows to be excellent, I'm not too sure what is going on there, but the connection does work, and is stable.


Regards, and good luck with your connection!
Back to top
View user's profile Send private message
itiZansiti
n00b
n00b


Joined: 08 Mar 2005
Posts: 37
Location: The Internet

PostPosted: Thu Feb 08, 2007 3:36 pm    Post subject: Reply with quote

I have the same device (bcm4306)
But I can't get it to work with your setup.

I get this error:
Code:
 * Starting wlan0
 *   Starting wpa_supplicant on wlan0 ...
ioctl[PRISM2_IOCTL_PRISM2_PARAM]: Invalid argument
ioctl[PRISM2_IOCTL_PRISM2_PARAM]: Invalid argument
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
ioctl[PRISM2_IOCTL_PRISM2_PARAM]: Invalid argument
ioctl[PRISM2_IOCTL_PRISM2_PARAM]: Invalid argument                                                                                   [ ok ]
 *   Starting wpa_cli on wlan0 ...                                                                                                   [ ok ]
 *     Backgrounding ...


I don't have a prism card right?
I read I am supposed to set
Code:
wpa_supplicant_wlan0="-D<driver>"
in /etc/conf.d/net but what driver should i put there on a bcm43xx?

btw: I had to have the wpa_supplicant config in /etc/wpa_supplicant/wpa_supplicant.conf instead of /etc/wpa_supplicant/wpa
_________________
All we have to decide is what to do with the life that has been given to us
Back to top
View user's profile Send private message
atxphoenix
n00b
n00b


Joined: 05 Dec 2006
Posts: 5
Location: Alvin, TX, US

PostPosted: Mon Feb 12, 2007 6:58 am    Post subject: Reply with quote

I think that you might have improper or unnecessary items selected in the Linux kernel configuration.

First, in the "Networking" sub-menu of the main configuration menu, build as modules at least "Generic IEEE 802.11 Networking Stack" "IEEE 802.11i CCMP" and "Software MAC add-on to the IEEE 802.11 networking stack".

Next, in the "Generic Driver options" sub-menu of the "Device Drivers" sub-menu. Select "Userspace firmware loading support". This is what loads the firmware into the BCM43xx so that it will function. My kernel builds it as a module. I assume it would also work as a built-in.

Finally, under the "Device Drivers" sub-menu, you will see the "Network device support" sub-menu. In this menu, for your wireless lan setup, you should select at least "Broadcom BCM43xx wireless support". If you don't have any other network cards, don't build any of the other drivers. Also, build the BCM43xx driver as a module, not as an integral part of the kernel.

Related to, but not specifically a part of the wireless subsystem, is kernel module auto-loading and aes encryption. Be sure that you build the kernel to load modules automatically, and under encryption, choose to build aes as a module. I've tried building aes-i586, but that doesn't seem to do the job, at least for me.

After you have made these selections, rebuild your kernel:

make bzImage modules modules_install

Copy arch/<your architecture>/bzImage to your bootloader.

Reboot your system, and see if things work better.

The driver entry for the bcm43xx in wpa_supplicant.conf is -Dwext, however, I didnt' put anything in /etc/conf.d/net except:

modules_eth1= ( "!iwconfig" "wpa_supplicant" ) /* for my BCM4306 */
modules_eth0= ( "iproute2" "!ifconfig" ) /* for my wired ethernet */

The most current version of wpa_supplicant is installed in my system. It configured itself, or assumed "-Dwext" in lieu of any other instructions.

Before wpa_supplicant tries to access your hardware and connect to your access point/router you must make sure the appropriate modules are loaded. You might want to put ieee80211_crypt_ccmp into your /etc/modules.autoload.d/kernel-2.6 file. Assuming you did, in fact, choose module auto-loading by the kernel, the kernel will load all other necessary modules. When wpa_supplicant needs aes encryption, the kernel will "load crypto_algapi" and "aes".

Let me know if I can be of further assistance.
Back to top
View user's profile Send private message
itiZansiti
n00b
n00b


Joined: 08 Mar 2005
Posts: 37
Location: The Internet

PostPosted: Tue Feb 13, 2007 8:42 pm    Post subject: Reply with quote

YES! thank you for your great input

I had to search around for a while to get every config right. but now with the right modules & psk key and everything it works.
I only get speeds up to 750kB/s. with ndiswrapper I got about 2.5MB/s :? I guess it has to do with the driver being beta and all.

Note: I had to set
Code:
wpa_supplicant_wlan0="-Dwext"
in order to get rid of the
Code:
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
errors.
_________________
All we have to decide is what to do with the life that has been given to us
Back to top
View user's profile Send private message
atxphoenix
n00b
n00b


Joined: 05 Dec 2006
Posts: 5
Location: Alvin, TX, US

PostPosted: Mon Feb 26, 2007 2:29 pm    Post subject: Reply with quote

I have noticed that the connection I make is only an 11MB/sec connection. As you stated, using ndiswrapper and win32 drivers gives better speed...the full 54MB/sec, in my case. However, I'd rather have true Linux drivers than use win32 drivers and a kludge into the operating system. Good luck with your system!
Back to top
View user's profile Send private message
Schickel
n00b
n00b


Joined: 23 Jul 2004
Posts: 15

PostPosted: Wed Jan 23, 2008 11:03 am    Post subject: Reply with quote

atxphoenix wrote:
I've had the same problem and it took several different steps to solve it:
~~~ snip ~~~
Regards, and good luck with your connection!


Thank you! In my case it works fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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