[patch] prism2 support out of the box

Bug #37451 reported by Tormod Volden
14
Affects Status Importance Assigned to Milestone
linux-wlan-ng (Debian)
Fix Released
Unknown
linux-wlan-ng (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Even after installing the linux-wlan-ng, it is difficult to make prism2 devices work. The "Networking" applet in gnome-system-tools detects the wlan device and the user can try configuring the device, however, the final /etc/network/interfaces sets common keywords used by iwconfig/wireless-tools that work for all other network cards, but are ignored by the linux-wlan-ng device.

The user has to manually enter linux-wlan-ng specific keywords into /etc/network/interfaces.

IMHO, the settings in /etc/network/interfaces should work for all network cards, so the user can easily change between a prism2 card or another one, using the same configuration. The compatibility with common standards should be taken care of by the device driver and utilities.

Revision history for this message
Tormod Volden (tormodvolden) wrote : patch for /etc/network/if-pre-up.d/linux-wlan-ng-pre-up

This small, non-intrusive patch takes some wireless-tools variables (if they are set) and translates them to the corresponding linux-wlan-ng variables (if they are not set).

This will make the prism2 devices work out of the box for unencrypted and WEP encrypted networks.

To test the patch:
cd /etc/network/if-pre-up.d
sudo cp -p linux-wlan-ng-pre-up linux-wlan-ng-pre-up.orig
sudo patch < ~/Desktop/linux-wlan-ng-pre-up.diff
(and start with an empty interfaces file)

(I don't have a WLAN for the moment, so I could only do dry testing. Reviews, corrections, comments, improvements are welcome.)

Revision history for this message
Tormod Volden (tormodvolden) wrote : Re: prism2 support out of the box

Just want to point out that this patch does not help NetworkManager, who configures the networking devices directly without going through ifup/interfaces.

Revision history for this message
Andrew Zajac (arzajac) wrote :

I cannot get it to work. If I start with a blank interfaces file, there is no wireless option to configure in the networking tool.

If I use an existing configuration, it doesn't connect.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Did you unplug and replug the stick after cleaning the file and before starting the Networking applet?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Andrew, my wlan0 device sometimes disappear (or does not appear as a wireless device in iwconfig). This is a USB or prism2_usb driver problem. In this case, the Networking applet obviously won't see it. Unplug/replug (several times) helps, or unload/reload the prism2_usb module. Use dmesg to see the results of the device initialisation.

This patch does not resolve the thousands other bugs in prism2/firmware/gnome-system-tools/usb :)

Revision history for this message
John Steele Scott (toojays) wrote :

Tormod,

I'm afraid this patch doesn't work for me. Without your patch, I have a working setup with the following in my interfaces file:

iface wlan0 inet static
address 192.168.1.223
netmask 255.255.255.0
gateway 192.168.1.254
wireless-essid ann-sco
wireless-enc on
wlan-ng-key0 34:4b:0f:4f:00:00:f8:7e:dd:00:4c:18:ce
wireless-mode managed
wlan-ng-authtype sharedkey
wlan-ng-hostwep true

After deleting this, patching the ifup script, and setting up the interface through GNOME, it looks like:

iface wlan0 inet static
address 192.168.1.223
netmask 255.255.255.0
gateway 192.168.1.254
wireless-essid ann-sco
wireless-key restricted 344b0f4f0000f87edd004c18ce

But it doesn't work. I played around with a couple of things (removed the "restricted" from wireless-key there, changed opensystem to sharedkey in the ifup script), but no dice. The card just won't associate, and dmesg shows:

[ 857.786485] ident: nic h/w: id=0x8026 1.0.0
[ 857.788489] ident: pri f/w: id=0x15 1.1.3
[ 857.790483] ident: sta f/w: id=0x1f 1.7.1
[ 857.792475] MFI:SUP:role=0x00:id=0x01:var=0x01:b/t=1/1
[ 857.794479] CFI:SUP:role=0x00:id=0x02:var=0x02:b/t=1/1
[ 857.796475] PRI:SUP:role=0x00:id=0x03:var=0x01:b/t=1/4
[ 857.798652] STA:SUP:role=0x00:id=0x04:var=0x01:b/t=1/12
[ 857.800485] PRI-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
[ 857.802482] STA-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
[ 857.804475] STA-MFI:ACT:role=0x01:id=0x01:var=0x01:b/t=1/1
[ 857.806474] Prism2 card SN: 000000000000
[ 858.028217] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 858.385504] linkstatus=ASSOCFAIL (unhandled)

Do you have it working on a real network with WEP?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

John and Andrew, thanks for testing the patch. Feel free to confirm this bug even if the patch won't work. Otherwise the developers and maintainers won't notice.

The patch just copies the wireless-key info into a wlan-ng-key0 setting, so I am not sure if the "restricted" keyword is supported. I have never seen Gnome put in that word, and I don't know when it should or not.

The hostwep is false by default, and the auth-type is by default "opensystem". That could explain why it fails for John.

My WEP setup worked with these defaults, and I don't know which defaults would work for most people. Since the Gnome GUI doesn't have any choices for this, it's hard to make it work for everyone. This problem is probably not limited to the linux-wlan-ng drivers.

John, can you please confirm that adding either/both authtype and/or hosttype settings to the Gnome-generated file makes it work?

Andrew Zajac (arzajac)
Changed in linux-wlan-ng:
status: Unconfirmed → Confirmed
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Could you please check if, using the patch and configuring through the GUI, "sudo ifup wlan0" successfully brings up the network?

Please also, for those who have this card, check bug #29706 and confirm or comment.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

If ifup works, but the GUI does not, it can be because of bug #19419.

Revision history for this message
damagedspline (icpazi) wrote :

the patch kinda worked for me.

i mean - i finally got the wireless to work but NetworkManager doesn't recognize to wireless card, however, selecting wireless networks through System -> Administration ->Networking is finally possible

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Operation with NetworkManager is out of the scope for this bug, since NM configures the devices on its own. Please file a bug on NM for it.

Revision history for this message
Karianne Fog Heen (simira) wrote :

Wasn't able to assign the bug to Victor Seva (linuxmaniac)

Changed in linux-wlan-ng:
assignee: nobody → pitti
Revision history for this message
Tormod Volden (tormodvolden) wrote : do not set any explicit "mode"

I filed a separate bug #50224 on the use of "ad-hoc" as a default mode. However, this new version of my patch would take care of that as well. Additionally this will make non-encrypted managed networks work.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for the research and the patch!

Changed in linux-wlan-ng:
status: Confirmed → In Progress
Revision history for this message
Zameer Manji (zmanji) wrote :

Thank you very much Tormod Volden for the patch. Will this be checked in soon?

Changed in linux-wlan-ng:
status: Unknown → Unconfirmed
Changed in linux-wlan-ng:
status: Unconfirmed → Fix Released
Revision history for this message
Tormod Volden (tormodvolden) wrote :

This patch, as well as the ones for bug #50138, bug #50224 and at least some of bug #29706 are incorporated in the new upstream version 0.2.4+svn20060909-3. I tried the merge-o-matic version of it and it works fine in edgy.

Is there a hope for a UVF exception for this?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Maybe I should add that the current version in edgy does not work at all, see bug #53748 and bug #59313.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Now that bug #59313 has been targeted for Ubuntu 6.10, a freeze exception would be particularly welcome. I've packaged the 0.2.5-2 Merge-o-matic output here: http://tormod.webhop.org/linux/wlan

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, Tormod, for your initial work. I prettyfied the merge a bit to conform to our merging policy, and prepared and tested the package. I'll send an UVF exception request now.

Changed in linux-wlan-ng:
status: In Progress → Fix Committed
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Martin, great. Any chance for bug #29706 (firmware uploading) as well?

Revision history for this message
Martin Pitt (pitti) wrote :

 linux-wlan-ng (0.2.5-2ubuntu1) edgy; urgency=low
 .
   * Merge from debian unstable, resolving minor merging conflicts. Remaining
     Ubuntu changes:
     - debian/control: Point out that kernel module package is not needed for
       Ubuntu.
     - debian/linux-wlan-ng-suspend, debian/linux-wlan-ng-resume: ifdown/rmmod
       l-w-n devices before suspend and restore the state after resuming.
     - debian/linux-wlan-ng.install: Install above two scripts.
     - debian/linux-wlan-ng-pre-up, etc/rc.wlan: ieee80211 is the newer name
       for p80211.
     - debian/linux-wlan-ng.preinst, debian/linux-wlan-ng.postinst: hotplug
       transition cleanup.
     - debian/linux-wlan-ng-post-down: Do not unload modules to not break
       network-manager and to conform to new udev world order.
     - debian/rules: Fix bashisms.
     - debian/patches/CONF_etc_linux-wlan-ng_rules.dpatch: Create some udev
       rules to make l-w-n work with network-manager.
     - debian/patches/CONF_etc_Makefile.dpatch: Install udev rules into
       appropriate directory.
   * New upstream version (UVF Exception granted by Matt Zimmerman):
     - Make /e/n/interfaces keywords for WEP compatible with the rest of the
       world. Closes: LP#37451
     - Fix /etc/wlan/shared to not complain without hotplug. Closes: LP#50138
     - Leave default wireless mode to 'auto' instead of 'ad-hoc' to unbreak
       configuration with gnome-system-tools. Closes: LP#50224
   * Thanks to Tormod Volden for doing the initial merge and triaging the
     relevant bugs!

Changed in linux-wlan-ng:
status: Fix Committed → Fix Released
Revision history for this message
Tormod Volden (tormodvolden) wrote :

I made some unofficial backported packages for Ubuntu 6.06 LTS (Dapper) here:
http://tormod.webhop.org/linux/wlan
They include additional fixes for firmware loading.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.