Summary: | the wireless network module's default behaviour breaks old wireless cards which do not support scanning | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | jochen <jochen.eisinger> |
Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | uberlord |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
jochen
2004-10-28 08:20:03 UTC
If the wireless cannot associate with an AP then it should abort with an error message. It can drop into ad-hoc mode and continue - but this has to be configured. Could you post the output of the script starting and the contents of conf.d/wireless please if this is not the case. ok, here I removed the /etc/conf.d/wireless completly, and that's what happens: # /etc/init.d/net.eth1 start --verbose * Starting eth1 * Loading networking modules for eth1 * modules: wireless ifconfig adsl dhcpcd * ifconfig provides interface * dhcpcd provides dhcp * Configuring wireless network for eth1 * Scanning for access points * eth1 does not support scanning * You either need to set a preferred_aps list in /etc/conf.d/wireless * preferred_aps=( "ESSID1" "ESSID2" ) * or configure defaulting to Ad-Hoc when Managed fails * adhoc_essid_eth1="WLAN" * or hardcode the ESSID against the interface (not recommended) * essid_eth1="ESSID" * Failed to configure wireless for eth1 ok, shit happens, I know my essid etc.. let's configure it by hand, but: # iwconfig eth1 eth1 no wireless extensions. If i set the correct essid and key (as recommended by the message) the script will correctly associate the card with my wlan. however, i don't have dhcp, so trying to get an IP using dhcp will fail, which results in the wireless extensions for the interface being disabled again. that's an orinoco_cs driven card btw. I don't attach a /etc/conf.d/wireless, because i'm mainly talking about the case when this file is not present (and you use /etc/pcmcia/wireless.conf instead for example) I don't see a problem with here. We've decided on defaulting to dhcp as *most* people use it - that has nothing todo with wireless. And you always get that iwconfig error if the interface is down ifconfig eth1 up iwconfig essid MYESSID should work I see from bug #68908 that the wireless module can be disabled now, so basically this solves this problem here. yet, I want to answer you: # /etc/init.d/net.eth1 start * Starting eth1 * Configuring wireless network for eth1 * Scanning for access points * eth1 does not support scanning * You either need to set a preferred_aps list in /etc/conf.d/wireless * preferred_aps=( "ESSID1" "ESSID2" ) * or configure defaulting to Ad-Hoc when Managed fails * adhoc_essid_eth1="WLAN" * or hardcode the ESSID against the interface (not recommended) * essid_eth1="ESSID" * Failed to configure wireless for eth1 # iwconfig eth1 eth1 no wireless extensions. # ifconfig eth1 up SIOCSIFFLAGS: No such device # iwconfig eht1 essid foo Error for wireless request "Set ESSID" (8B1A) : SET failed on device eht1 ; No such device. this is the orinoco driver from pcmcia_cs-3.2.7-r2 I really think you should not try to guess a default config, if there is no config for the wireless module (or test whether the wireless driver actually supports all that fancy scanning) There is no default wireless config - you don't need any configuration to connection to an Access point with no security. I would also add that it's only the orinoco card that does not support scanning afaik - although there is a patch that enables it. well, check for orinoco then? which patch do you mean? I would file a bugreport against pcmcia_cs and orinoco then Here's the URL for the patch http://www.tzi.de/~plasmahh/orinoco.html Unfortunately, we have no way of testing for an orinoco driver via wireless_tools and who's to say that they don't have this patch installed? well, I think if somebody feels like patching his system with 3rd party patches, he can also be expected to adopt /etc/conf.d/wireless when running a stock gentoo box however, I'd expect some init.d script not to break my wireless interface per default I'll file a bug for the scan patch to be included, the monitor mode patch is already included anyway. ah, yes.. forgot half of what I wanted to say :) yes, there is no easy way to figure out which device driver is used for a given interface. However, I'd suggest to stop fiddling with a card as soon as it doesn't support scanning for APs since the wireless module outputs lots of errors anyway, it could as well print "this card does not seem to fully support auto-config, please setup /etc/conf.d/wireless" and leave the card in peace. the bug about the scanning patch is bug #69883 btw Your output from comment #2 * eth1 does not support scanning * You either need to set a preferred_aps list in /etc/conf.d/wireless * preferred_aps=( "ESSID1" "ESSID2" ) * or configure defaulting to Ad-Hoc when Managed fails * adhoc_essid_eth1="WLAN" * or hardcode the ESSID against the interface (not recommended) * essid_eth1="ESSID" * Failed to configure wireless for eth1 Your comment yes, there is no easy way to figure out which device driver is used for a given interface. However, I'd suggest to stop fiddling with a card as soon as it doesn't support scanning for APs since the wireless module outputs lots of errors anyway, it could as well print "this card does not seem to fully support auto-config, please setup /etc/conf.d/wireless" and leave the card in peace. Isn't that what it's currently doing? In fact it even tells you what to configure. 1) the script doesn't stop to fiddle with the card but tries various default essids and thus disables the wireless extensions 2) If you do any of the two recommended settings, the wireless extensions still will be disabled, since your scripts tries to scan anyway 3) a normal user will never see these messages - i had to disable both /etc/hotplug/net.agent and /etc/pcmcia/network which both try to start /etc/init.d/net.$IFACE in order to test your script. of course the output will be in your syslog, but hey, who searches for error messages in the syslog? 1) The script does not disable wireless extensions - it brings the card down on failure. But it does this regardless of wireless. Wireless extensions can be enabled by bringing the card up ifconfig eth1 up 2) The error message has been improved to say include the associate_order variable when settings preferred_aps. The other setting it recommends - adhoc - works just fine. 3) The problem here is that both hotplug and pcmcia never echo any error to stdout - instead they write to log files. This is not a wireless specific problem as it applies to any network configuration that causes errors - like dhcp. Marking is as invalid no, you're wrong, you cannot bring the interface up again this may be a bug in the orinoco driver or whereever, fact is, an orinoco driven interface does not work with the default config, after the script tried to bring the interface up, the interface is broken. the user has to disable the wireless module or give a complete config disabling the automatic scans, otherwise an orinoco driven card just can't be used with gentoo like that :-/ Try the orinoco driver in any 2.6 kernel. I guarantee it works - I know because I use one myself the pcmcia-cs one doesn't work, the one included in linux 2.4 doesn't work |