New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

[solved] B2 as wificlient not working after update to 2.4.1

Got problems with your B2 or B3? Share and get helped!
Post Reply
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

[solved] B2 as wificlient not working after update to 2.4.1

Post by ryz »

Hi!

I have been using the B2 as a wireless device to an access point with now problem until I decided to upgrade to the 2.4.1 release. After the reinstall where I choose to not partition or format the /home storage I am unable to get B2 to work as a wificlient. It does work as an AP so the hardware is still intact.

Since it was a long time ago I did setup the B2 as a wifi client I did not remember every step I did take so now I just followed the guide in the wiki http://wiki.excito.org/wiki/index.php/C ... cess_point
. The problem comes when I run the ifup wlan0. The result I do get is this
root@b2:~# ifup wlan0
ioctl[SIOCSIWMODE]: Operation not supported
Could not configure driver to use managed mode
ioctl[SIOCGIWRANGE]: Operation not supported
ioctl[SIOCGIWMODE]: Operation not supported
ioctl[SIOCSIWAP]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODE]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODE]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODE]: Operation not supported
ioctl[SIOCSIWENCODEEXT]: Operation not supported
ioctl[SIOCSIWENCODE]: Operation not supported
I have search through all logs but I can not find any useful information.
My setting in the interfaces files look like this
iface wlan0 inet static
address 192.168.0.2
gateway 192.168.0.1
netmask 255.255.255.0
proto RSN
wpa-driver wext
wpa-key-mgmt WPA-PSK
wpa-psk good_password
wpa-ssid MyNiceSid
I have tried removing the proto and wpa-driver settings to no avail.

An iwconfig after an ifup wlan0 gives only
wlan0 no wireless extensions.
While an iw wlan scan actually does list all ap:s but an iw wlan link says that no link is up.
I am running out of ideas to test so some help would be appreciated
Last edited by ryz on 13 Apr 2012, 16:53, edited 1 time in total.
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

Re: B2 as wificlient not working after update to 2.4.1

Post by ryz »

After some investigation it seems that the wext driver is not compiled into the the kernel in 2.4 and 2.4.1. I have tried to use the new nl80211 driver which gives less error but complains about not finding WPA support in the driver.

Has any one got this working with the 2.4 release? I do not understand why the nl80211 driver does not work I have tried google nl80211 ath9k wpa but not find any usefull information.

I will try to recompile the kernel module with wext support to see if I can get wlan up and running again.
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

Re: B2 as wificlient not working after update to 2.4.1

Post by ryz »

I have finally got the wifi to work in client mode. It did unfortunately involve compiling a custom kernel due to the fact that wext (Wireless Extensions for Linux) was left out of the kernel in 2.4.1 in favor of the new nl80211, cfg80211. This in it self would not be a big problem since wpa_supplicant does support nl80211. This is done by adding the line

Code: Select all

wpa-driver nl80211
in the /etc/network/interfaces file

Unfortunately the nl80211 support is not that great in the version of wpa_supplicant shipped with the version of debian that the Bubba is shipped with. For some parts it still uses the wext api and hence wext still needs to be compiled for wpa_supplicant to work. So now you could either compile a never version of wpa_supplicant it has to be at least 0.7 where 0.6.10 is installed in Bubba. You could also recompiled the kernel with wext support enabled and that is what I did.

This is how I did compile the kernel be aware that if you do some thing wrong when you install a new kernel you might end up with an unbootable system. You should make sure that you do have an working rescue usb before you start.

First log in by ssh and become root. You should find plenty of information on how to do that in the Excito Wiki.

Install the needed tools

Code: Select all

change_distribution -us elvin
apt-get update
apt-get install uboot-mkimage ncurses-dev build-essential
Install the kernel source

Code: Select all

cd /usr/src/
apt-get source bubba3-kernel
Now we need to configure the kernel

Code: Select all

cd linux-2.6.39.4
make menuconfig
Go to "Networking support"->"Wireless" and put a star in front of "cfg80211 wireless extensions compatibility" and "Wireless extensions sysfs files". I am not certain you need both but since it takes forever to compile the kernel I am in no mode to test it my self. Exit the configuration and answer yes in the question to save the new configuration.

Now it is time to compile the kernel and this takes a lot of time. It did take over one night for me.

Code: Select all

make all
When it is finished compiling we shall do the install first we need to make a copy of the current kernel

Code: Select all

cp /boot/uImage /boot/uImage.bak
Then we can do the install

Code: Select all

make install
make modules_install
This will not install the needed uImage so we need to do that by hand.

Code: Select all

cp arch/powerpc/boot/uImage /boot/


Now you should do an reboot and keep you fingers crossed that it will come up again. If it does you should now be able to set up the Bubba as an wireless client again. I did chose to use the new nl80211 driver. That is I do have the line "wpa-driver nl80211" in my /etc/network/interfaces but the wext driver should probably also work now but I have not tested it.
Last edited by ryz on 07 May 2012, 17:00, edited 1 time in total.
phil
Posts: 3
Joined: 19 Feb 2011, 19:30

Re: [solved] B2 as wificlient not working after update to 2.

Post by phil »

Thanks ryz!

I experienced the same problem last week and fixed it in a similar way than yours (it was before this 2nd post (the solution) was online).

Thanks for posting the solution, such that also others can fix it.

I'm just NOT sure what you are going to do w/ the following command:

Code: Select all

change_distribution -us
since normally (or always) you would need to add a distribution name to it,or?
Otherwise the solution seems to be perfect.

@excito
Please fix the kernel s.t. we do NOT need to re-compile the kernel ourself.

P.S. the update to 2.4.1 went seamlessly for me, except the WIFI problem and the problem to use the LIVE-USB stick for installing 2.4.1 (I had to try dozents of sticks before one worked on b2, the one that finally worked was more or less fabric new, all others were used at least once, and maybe have been reformatted w/ linux. OFF-TOPIC: all howtos/post on the forum didn't work, nor did a format w/ windows. Hopefully excito can find a solution for that, since after the boot *ALL* sticks work fine on b2)
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

Re: [solved] B2 as wificlient not working after update to 2.

Post by ryz »

phil wrote:Thanks ryz!

I'm just NOT sure what you are going to do w/ the following command:

Code: Select all

change_distribution -us
It should be

Code: Select all

change_distribution -us elvin
I think I did a typo and forgot the elvin but changed it more or less right away. You probably read it in between. This is to make sure that you can download both source pkg and Debian upstream. Not certain that Debian upstream is needed thought.
Post Reply