prism2_usb: requires wlanctl-ng commands in order to work properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-source-2.6.15 (Ubuntu) |
Fix Released
|
Medium
|
Ben Collins |
Bug Description
To use my usb wireless device, I use a script detailed here:
http://
I was given advice to use the debian linux-wlan scripts to use the device:
http://
"It's actually much easier than that. Just add something like the
following into /etc/network/
iface wlan0 inet dhcp
wireless_mode managed
wireless-essid your-ess-id
Then you can use the card with all standard tools (sudo ifup wlan0,
netapplet, and you can even configure it with the networking tool)."
So, I got that working once. I had to add
wireless_key (0x0x0x0x0x) to the stanza, since I use WEP.
I can not get this to work anymore. My device, however, works flawlessly by
running the script detailed in the link above. As I said, it only worked once
with the above method.
When I run
sudo ifup wlan0
it just hangs there for five or six minutes before either exiting with an error
("Interface wlan0 is already configured" - It is not!) or silently.
So, there are three issues:
1- This method works only intermettently.
2- This method is not integrated with the installer, nor the networking tool
(you still have to edit a config file by hand)
3- This is completely undocumented. I checked in linux-wlan-ng-doc.
Matt Zimmerman (mdz) wrote : | #1 |
Andrew Zajac (arzajac) wrote : | #2 |
1- You are right. This is what I need to run to get it working:
a) I enter the afformentioned stanza in /etc/networking
b) I run this script:
@ubuntu:~$ cat ./test_usb
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
wlanctl-ng wlan0 dot11req_mibset mibattribute=
bugzilla)"
ifup wlan0
After playing around with it, this is the minimum needed.
2- "How did you establish this? Both the installer and the networking tool support
setting an ESSID and a WEP key."
Not if it does not detect the device. Are you saying that the installer is
supposed to detect and use a prism2 usb device like this? Am I also supposed to
have a wireless device entry in the networking tool when I plug this device in?
Because, I do not have one.
I have plugged this device in when installing on a number of machines and it was
never detected by the installer. The same goes for every machine in which I
have plugged it and then opened up the networking tool. If it is supposed to
work, the problem lies with my device (since I only have the one), and not the
coputers on which I am trying to use it.
It is a refurbished DWL-122. Here is it's entry in /proc/bus/
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=2001 ProdID=3700 Rev= 1.32
S: SerialNumber=
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=prism2_usb
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=1ms
3- "The documentation is in /usr/share/
We are not talking about the same thing. After my conversation with Martin
Pitt, I thought that the ubuntu way to get a prism2_usb device working in Ubuntu
was to edit the interfaces file by hand. I think you are saying that this is
not the case.
Matt Zimmerman (mdz) wrote : | #3 |
(In reply to comment #2)
> 1- You are right. This is what I need to run to get it working:
>
> a) I enter the afformentioned stanza in /etc/networking
> b) I run this script:
> @ubuntu:~$ cat ./test_usb
> wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
> wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
You need to run exactly the same command twice, or it doesn't work?
> 2- "How did you establish this? Both the installer and the networking tool
support
> setting an ESSID and a WEP key."
>
> Not if it does not detect the device. Are you saying that the installer is
> supposed to detect and use a prism2 usb device like this? Am I also supposed to
> have a wireless device entry in the networking tool when I plug this device in?
> Because, I do not have one.
If there is a driver included in the kernel, then yes, it should.
> 3- "The documentation is in /usr/share/
>
> We are not talking about the same thing. After my conversation with Martin
> Pitt, I thought that the ubuntu way to get a prism2_usb device working in Ubuntu
> was to edit the interfaces file by hand. I think you are saying that this is
> not the case.
No, that is not the case. The network admin tool modifies
/etc/network/
apparently your device requires a bit more fiddling. I'm trying to help you
isolate what that is, to see if it is a driver bug or something that ifup should
handle for you.
Andrew Zajac (arzajac) wrote : | #4 |
"You need to run exactly the same command twice, or it doesn't work?"
Yes. I would say that nine times out of ten I get an implementation failure the first time
the command is run. I seem to remember this being pointed out on the linux-wlan mailing list
(or other documentation - Sorry, I do not remember). It is harmless to run it a second time
if it first succeeds.
Yes, the driver is in the kernel, and the prism2_usb module gets properly loaded by hotplug
for me. Nothing else, though.
Matt Zimmerman (mdz) wrote : | #5 |
(In reply to comment #4)
> "You need to run exactly the same command twice, or it doesn't work?"
>
> Yes. I would say that nine times out of ten I get an implementation failure
the first time
> the command is run. I seem to remember this being pointed out on the
linux-wlan mailing list
> (or other documentation - Sorry, I do not remember). It is harmless to run it
a second time
> if it first succeeds.
Sounds fishy. Please send the exact error message.
Ben Collins (ben-collins) wrote : | #6 |
Can you send the dmesg output from before and after you get this device working? (dmesg before plugin, then
dmesg after you get the interface up and working using your minimal commands).
Andrew Zajac (arzajac) wrote : | #7 |
- dmesg before plug in Edit (13.1 KiB, text/plain)
Created an attachment (id=3804)
dmesg before plug in
Andrew Zajac (arzajac) wrote : | #8 |
- Dmesg after plug in and dhcp connect with minimal script Edit (14.3 KiB, text/plain)
Created an attachment (id=3805)
Dmesg after plug in and dhcp connect with minimal script
Andrew Zajac (arzajac) wrote : | #9 |
emma@ubuntu:~$ sudo wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
message=
ifstate=enable
resultcode=
emma@ubuntu:~$ sudo wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
message=
ifstate=enable
resultcode=
Ben Collins (ben-collins) wrote : | #10 |
Ok, I suspect this is a prism2 bug (hopefully). The next kernel upload, 2.6.12-8.13, will have an updated
prism2-wlan-ng driver. This is the first update of this driver since May, so hopefully it will fix this issue.
Keep an eye out for the 2.6.12-8.13 upgrade. I'll let you know when it is available so you can test.
Andrew Zajac (arzajac) wrote : | #11 |
Perhaps there are hardware revisions of this device that work better than others? This
problem has existed since 2002 and there seem to be a number of variations on a theme to work
around it. There is a recent thread on the linux-wlan-ng list about this too (see below, c)
a)
http://
"The original script has to be called two times. The first time the driver gives an error
message. The second time it succeeds"
b)
http://
"Solution:
---------
Disable the wlan0 interface first. This command sequence worked:
wlanctl-ng wlan0 lnxreq_ifstate ifstate=disable
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable"
And more recently:
c)
http://
" # ADD THE FOLLOWING LINE
$WLANCTL $1 lnxreq_ifstate ifstate=disable
This is equivalent to modifying the linux-wlan-ng script in /etc/networking
the ifstate=enable command twice, or at least try again in the even of an implementation
failure.
I tried this morning to add the "wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable" command in
that script just before it does the actual evalutation. It did not work, but I really suck at
bash scripting so I may have done it wrong.
I can compile the most recent linux-wlan-ng from source. Would that save some time? Or have
Debian/
from the linux-wlan-ng source?
Ben Collins (ben-collins) wrote : | #12 |
kernel 2.6.12-8.13 just got uploaded, so expect to see it in a day or so. Please give it a try when you do get
it. From what it sounds like, I don't expect it to fix the problem, but who knows.
Andrew Zajac (arzajac) wrote : | #13 |
I will upgrade my kernel as soon as it is available. Meanwhile, I have tried to
debug the linux-wlan-
Have any of you gotten this to work with WEP?
I ask because anything inside the conditional on line 121 is not working:
I need to change
if [ "$IF_WIRELESS_ENC" = "on" ]; then
to
if [ !"$IF_WIRELESS_ENC" = "on" ]; then
for it to even consider using a wep. IF_WLAN_NG_HOSTWEP is also improperly set,
as it should be "true" but is false when I debug it. I though it would be
useful to ask if WEP works for you before continuing on. It would seem that
ifup is not passing on the proper arguments to this script.
If WEP is not implementd correctly, the interface cannot be established (here in
my house) and therefore the device would be ignored.
Matt Zimmerman (mdz) wrote : | #14 |
(In reply to comment #13)
> I will upgrade my kernel as soon as it is available. Meanwhile, I have tried to
> debug the linux-wlan-
>
> Have any of you gotten this to work with WEP?
Yes, it works fine when the proper parameters are set in /etc/network/
(manually or via the desktop tools).
Andrew Zajac (arzajac) wrote : | #15 |
emma@ubuntu:~$ cat /etc/network/
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0
iface wlan0 inet dhcp
wireless-mode managed
wireless-essid 37633301234
wireless-key 4a2b1a6a10
emma@ubuntu:~$
Andrew Zajac (arzajac) wrote : | #16 |
I am up-to-date with the current packages and it still does not work.
Should I add some debugging code to linux-wlan-
can compare notes? I am also up for mailing the thing to you.
Also, I do not understand how the installer can use this device as a network
interface when I cannot find the wlanctl-ng executable when in the installer's
shell. Perhaps I misunderstood something.
Guillaume Radde (guillaumeradde) wrote : | #17 |
Hi, I just want to add that I have tested my ma111v1 with the breezy RC release
and the bug is still there. Note that the installer doesn't install the
linux-wlan-ng package so can't handle the card correctly. Don't know enough to
help you though, but I think this is a problem of scripts and not a kernel bug.
Good luck.
guignome
(In reply to comment #16)
> I am up-to-date with the current packages and it still does not work.
>
> Should I add some debugging code to linux-wlan-
> can compare notes? I am also up for mailing the thing to you.
>
> Also, I do not understand how the installer can use this device as a network
> interface when I cannot find the wlanctl-ng executable when in the installer's
> shell. Perhaps I misunderstood something.
>
Tormod Volden (tormodvolden) wrote : | #18 |
Breezy and D-Link DWL-122: after installing linux-wlan-ng and enabling the card with
wlanctl-ng wlan0 lnxreq_ifstate ifstate=disable
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
the card shows up in the Networking applet and can be configured there. I guess
these commands can be put into some hotplug script maybe ?
BTW, shouldn't this bug have "prism2_usb" in the title ?
Ben Collins (ben-collins) wrote : | #19 |
If possible, please upgrade to Dapper's 2.6.15-7 kernel. If you do not want to
upgrade to Dapper, then you can also wait for the Dapper Flight 2 CD's, which
are due out within the next few days.
Let me know if this bug still exists with this kernel.
Andrew Zajac (arzajac) wrote : | #20 |
"Let me know if this bug still exists with this kernel."
Still no worky.
However, I do not think it is a kernel bug. As I said in comment number 13 of
this bug, I think it is a problem with the scripts that set up WEP. But I am
not technically able enough to help out more, at this point.
Tormod Volden (tormodvolden) wrote : | #21 |
I copied my manual configuration from Breezy (where it worked) to Dapper
Flight-2, but I am not able to make it work. The GUI is broken for me since I
have a non-ASCII character in the SSID (bug 27171).
iwconfig just lists wlan0 with "no wireless extensions". ifup complains and the
dhcp client goes on with "network not reachable". Sorry for the lack of details,
I forgot to copy logs before I booted into Breezy to post this. Anything
particular I should check for ?
Ben Collins (ben-collins) wrote : | #22 |
(In reply to comment #21)
> iwconfig just lists wlan0 with "no wireless extensions". ifup complains and the
> dhcp client goes on with "network not reachable". Sorry for the lack of details,
> I forgot to copy logs before I booted into Breezy to post this. Anything
> particular I should check for ?
Yes, full dmesg output please.
John Steele Scott (toojays) wrote : | #23 |
I would like to see this card fully working, including GUI, in Dapper. I did have
something that worked (kind of, no integration with GUI) with Breezy, but it relied on
hotplug to run a script, and did not use ifup/ifdown.
For me, Tormod's comment 18 does still work to get the interface to appear in iwconfig.
John Steele Scott (toojays) wrote : | #24 |
The linux-wlan-
toojays@
Configuring interface wlan0=wlan0 (inet)
run-parts --verbose /etc/network/
run-parts: executing /etc/network/
FATAL: Module p80211 not found.
Failed to load p80211.o.
run-parts: /etc/network/
run-parts: executing /etc/network/
Error for wireless request "Set Encode" (8B2A) :
SET failed on device wlan0 ; No such device.
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device wlan0 ; No such device.
dhclient3 -pf /var/run/
Internet Systems Consortium DHCP Client V3.0.3
Copyright 2004-2005 Internet Systems Consortium.
All rights reserved.
For info, please visit http://
SIOCSIFADDR: No such device
wlan0: ERROR while getting interface flags: No such device
wlan0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device
Failed to bring up wlan0.
I tried cutting out that part of the script like so:
toojays@
linux-wlan-
--- linux-wlan-
+++ linux-wlan-
@@ -75,10 +75,6 @@
fi
-if ! modprobe p80211; then
- echo "Failed to load p80211.o." >&2
- exit 1
-fi
# NOTE: We don't explicitly insmod the card driver here. The
# best thing to do is to specify an alias in /etc/modules.conf.
Now, ifup can get the card to associate with the AP, but no I can't ping it, nor does
DHCP work, and iwconfig says there is no signal:
wlan0 IEEE 802.11-DS ESSID:"56BAnnSt" Nickname:"56BAnnSt"
Bit Rate:2 Mb/s Tx-Power:18 dBm
Retry min limit:8 RTS thr:off Fragment thr:off
Link Quality=0/92 Signal level=-100 dBm Noise level=-100 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Tormod Volden (tormodvolden) wrote : | #25 |
I replaced "p80211" with "ieee80211" in
/etc/network/
dapper. Same issues with manual configuration and so on though.
Andrew Zajac (arzajac) wrote : | #26 |
I had this on the shelf and just tried it with an up-to-date Dapper box.
It still does not work.
When I plug in the device (/var/log/
Feb 7 20:40:32 localhost kernel: [4294835.223000] Prism2 card SN: 000000000000
Feb 7 20:40:32 localhost kernel: [4294835.373000] ADDRCONF(
Feb 7 20:40:32 localhost kernel: [4294835.669000] linkstatus=
Feb 7 20:40:32 localhost kernel: [4294835.674000] ADDRCONF(
and from dmesg:
[4294832.944000] usb 1-1.4: new full speed USB device using uhci_hcd and address 6
[4294834.691000] hfa384x_
[4294834.691000] prism2sta_
[4294834.691000] prism2sta_
[4294834.691000] prism2sta_ifstate: prism2sta_
[4294834.757000] hfa384x_usbin_rx: Received frame on unsupported port=4
[4294835.213000] ident: nic h/w: id=0x8026 1.0.0
[4294835.214000] ident: pri f/w: id=0x15 1.1.3
[4294835.215000] ident: sta f/w: id=0x1f 1.7.1
[4294835.216000] MFI:SUP:
[4294835.217000] CFI:SUP:
[4294835.218000] PRI:SUP:
[4294835.219000] STA:SUP:
[4294835.220000] PRI-CFI:
[4294835.221000] STA-CFI:
[4294835.222000] STA-MFI:
[4294835.223000] Prism2 card SN: 000000000000
[4294835.373000] ADDRCONF(
[4294835.669000] linkstatus=
[4294835.674000] ADDRCONF(
[4294845.878000] wlan0: no IPv6 routers present
emma@Dapper:~$ ping www.yahoo.ca
ping: unknown host www.yahoo.ca
Is there anything helpful that I can do to help you get this to work?
Tormod Volden (tormodvolden) wrote : | #27 |
Dapper flight 4: It is not necessary to run any wlanctl-ng command. However, you can not use the Networking GUI, partly because of bug #27823, and also because the resulting /etc/network/
I have to manually add this to the file (I really need all 3 items):
wlan_ng_key0 xx:xx:xx:xx:xx
wireless_mode managed
wireless_enc on
Then "sudo ifup wlan0" works. Still, with this hand-tweaked interfaces file, I can not use the GUI to activate or deactivate the interface.
kmansfield (kwmansfield) wrote : | #28 |
I am trying to get wireless networking setup. I am using the prism2_usb wlan-ng driver on a Mircrosoft MN-510 adapter. If I disable WEP on my access point and issue the following commands it works:
sudo wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
sudo wlanctl-ng wlan0 lnxreq_autojoin ssid="myssid" authtype=opensystem
sudo dhclient wlan0
How do it get all of this to happen automatically when I start the computer? I have read dozens of posts and get conflicting information. I created a wlan-conf-xxxx
I also edited this section with my wep key and ssid
SSID_wlan0="myssid"
ENABLE_wlan0=y
#SSID_wlan1=
#ENABLE_wlan1=n
#SSID_wlan2=""
#ENABLE_wlan2=n
Ben Collins (ben-collins) wrote : | #29 |
> Dapper flight 4: It is not necessary to run any wlanctl-ng command.
Can I assume that atleast this portion of the problem is fixed?
Andrew Zajac (arzajac) wrote : | #30 |
> Can I assume that atleast this portion of the problem is fixed?
No, not for me. Nothing has changed with Dapper flight 4.
Alexandre Otto Strube (surak) wrote : | #31 |
Andrew, what about Flight 5 or the more recent daily ones? Can you give us some update on it?
Andrew Zajac (arzajac) wrote : | #32 |
Flight 5 and still no change.
Tormod Volden (tormodvolden) wrote : | #33 |
Andrew, from your dmesg output, it seems like the device is active and link is up. Did you try to start the networking afterwards, for instance with "sudo ifup wlan0"?
(kmansfield, did you see and read the one post I had before yours?)
Once "sudo ifup wlan0" works, adding "auto wlan0" to /etc/network/
Andrew Zajac (arzajac) wrote : | #34 |
"Did you try to start the networking afterwards, for instance with "sudo ifup wlan0"?"
Yes, of course.
iwconfig reveals the link, but the network is unreacheable.
Unplugging by prism2 device and plugging in an atmel usb device gives me a link, so I konw my configuration is correct.
Tormod Volden (tormodvolden) wrote : | #35 |
Do you use the same keywords as I do in your /etc/network/
Your version of 2005-09-16 will not work.
The configuration syntax for a linux-wlan-ng device (like prism2_usb) is different from a normal wireless-tools device (like your atmel). The Gnome tools only supports the latter. This is especially true for the WEP setup. If the prism2_usb could be fixed to accept the IOCTLs used by libiw28, everything would be simpler.
Andrew Zajac (arzajac) wrote : | #36 |
"Do you use the same keywords as I do in your /etc/network/
No. I use what is created by the networking tool.
"The configuration syntax for a linux-wlan-ng device (like prism2_usb)
is different from a normal wireless-tools device (like your atmel). The
Gnome tools only supports the latter. This is especially true for the
WEP setup. If the prism2_usb could be fixed to accept the IOCTLs used by
libiw28, everything would be simpler."
Perhaps I misunderstood the early responses to this bug, but I was under the assumption that this device is supposed to work out-of-the-box if linux-wlan-ng is installed and that my device was behaving differently than other prism2_usb devices in that respect.
I know that linux-wlan-ng uses different tools than the other wireless devices, but the debian scripts are supposed to wrap around the linux-wlan-ng commands and make the process the same.
So, has anyone plugged in a prism2_usb device and have it work out-of-the-box in ubuntu?
Andrew Zajac (arzajac) wrote : | #37 |
Tormod, yes, it works fine using the following config:
iface wlan0 inet dhcp
wlan_ng_key0 2a:2a:2a:2a:10
wireless_mode managed
wireless_enc on
auto wlan0
Thank you. I guess I misunderstood the previous comments right from the beginning.
So, is there any way to have the config for both a linux-wlan-ng as well as a wireless-tools device for the same wlan device in the /etc/networking
Other than that, how do the prism2_usb devices get to be configurable by the gnome networking tool (or network manager)?
Tormod Volden (tormodvolden) wrote : | #38 |
Having prism2 work out of the box is the next step, I've opened bug #37451 for this. I suggest we leave this bug as it originally was: having the prism2 kernel module work as intended. At this point, the extra wlanctl-ng commands are not needed, and I consider this bug fixed.
Can everybody please test my patch in bug #37451 and comment on it?
Tormod Volden (tormodvolden) wrote : | #39 |
Can we close this bug now? The original ifstate=enable issue has been fixed. The p80211 issue mentioned here has also been fixed. The GUI configuration issue is worked on in bug #37451 and the patch already works for some people.
Ben Collins (ben-collins) wrote : | #40 |
Sure thing.
Changed in linux-source-2.6.15: | |
status: | Confirmed → Fix Released |
(In reply to comment #0)
> 1- This method works only intermettently.
It works reliably here. Perhaps when you first tested it, you had already run
your script to set the extra options?
Try removing commands from your script to find the minimum needed (in addition
to what ifup does) in order to get the card working
> 2- This method is not integrated with the installer, nor the networking tool
> (you still have to edit a config file by hand)
How did you establish this? Both the installer and the networking tool support
setting an ESSID and a WEP key.
> 3- This is completely undocumented. I checked in linux-wlan-ng-doc.
The documentation is in /usr/share/ doc/wireless- tools/README. Debian