LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 04-19-2006, 09:16 PM   #1
JazzLad
Member
 
Registered: Apr 2006
Location: Salt Lake City, UT
Distribution: ubuntu
Posts: 32

Rep: Reputation: 15
Thumbs up General Question: What is the best way to do wifi in linux? Opinions wanted!


Recently I installed SuSE 10.0 w/ KDE (first time using Linux) and thanks to the help of rshaw & others I managed to get it to connect at home after about 8-10 hours of messing around. Not too bad for a complete novice. Using kwifimanager, I quickly realized that it would be a real chore every time I tried to add a new AP with different settings & apparently if the settings were different enough I would have to make changes that meant I would have to change them back to again use my original AP.

In Windows XP, when I detect a hotspot, I simply double-click it & enter the key if necessary to connect. Is there a comperable way to do this in Linux? I would like to use Linux on my laptop & may even be able to live without Photoshop, but I refuse to spend more than 30-60 seconds to connect to a new network & I want it to Just Work (tm) when I use my home/work/friend's network (second and subsequent times).

So, what software/distro have you used? I'm definately not married to SuSE; it was handy. I'm pretty new but I want to learn & I want to end my Microsoft dependency.

Cheers,
JazzLad
 
Old 04-19-2006, 10:17 PM   #2
fair_is_fair
Member
 
Registered: May 2005
Posts: 516

Rep: Reputation: 52
I've just installed the new Mepis 6 alpha. Wireless was up and running with absolutely no input from me.

PCLOS needs a little input but is still easy. I've travelled extensively with my laptop and have no trouble connecting to "hotspots" with PCLOS.

Then again, my wireless hardware in desktop and laptop are well supported by linux.
 
Old 04-19-2006, 10:33 PM   #3
JazzLad
Member
 
Registered: Apr 2006
Location: Salt Lake City, UT
Distribution: ubuntu
Posts: 32

Original Poster
Rep: Reputation: 15
I had to use ndsiwrapper, but then the nic was fine.

As far as connecting in multiple places, does it matter if they are using different forms of security?
 
Old 04-19-2006, 11:07 PM   #4
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,445
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Yeah, wifi on Linux needs work. But the real issue is that most cards use proprietary chipsets for which the Linux drivers are incomplete or non existant.

Anyhow, I use Madwifi. Works well for me. I get pretty good speeds and I've never had a dropout. The only problem I have is that our cordless phone also operates within the 2.4GHz range and occasionally interferes with the signal, but that is no fault of the software.
 
Old 04-19-2006, 11:13 PM   #5
JazzLad
Member
 
Registered: Apr 2006
Location: Salt Lake City, UT
Distribution: ubuntu
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rkelsen
Yeah, wifi on Linux needs work. But the real issue is that most cards use proprietary chipsets for which the Linux drivers are incomplete or non existant.

Anyhow, I use Madwifi. Works well for me. I get pretty good speeds and I've never had a dropout. The only problem I have is that our cordless phone also operates within the 2.4GHz range and occasionally interferes with the signal, but that is no fault of the software.
I'm less concerned with drivers than I am user-friendliness once installed. It wasn't easy (for a noob ) to set it up, but once I did the frustrating part was that unlike my Windows experience I had to make a buncha changes per network (and then I never did get it to work at work, not sure what security settings they use (just know the key).

Thanks for the input!
 
Old 04-19-2006, 11:32 PM   #6
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,445
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by JazzLad
not sure what security settings they use (just know the key)
It has to be either WPA or WEP. I don't know about WEP, but WPA is supported under Linux by a package called wpa_supplicant. It supports most of the Linux wifi drivers that I'm aware of.

I see that you're using Suse 10.0. It's surprising that you had so much difficulty. I tried Suse 10.0 when it came out and it autoprobed my wifi card, installed the driver and found my access point. All I had to do was enter the WPA passphrase. My wifi NIC is a Netgear with Atheros chipset.

Last edited by rkelsen; 04-19-2006 at 11:33 PM.
 
Old 04-20-2006, 12:07 PM   #7
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Rep: Reputation: 30
I use madwifi, and coming from previously using ndiswrapper, madwifi is a god-send. It's simple to use and setup, and works like a charm. Much better than Windows IMHO. This is on two D-Link DWL-G520 cards with the Atheros chipset.
 
Old 04-26-2006, 07:15 AM   #8
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
Quote:
Originally Posted by rkelsen
It has to be either WPA or WEP. I don't know about WEP, but WPA is supported under Linux by a package called wpa_supplicant. It supports most of the Linux wifi drivers that I'm aware of.

I see that you're using Suse 10.0. It's surprising that you had so much difficulty. I tried Suse 10.0 when it came out and it autoprobed my wifi card, installed the driver and found my access point. All I had to do was enter the WPA passphrase. My wifi NIC is a Netgear with Atheros chipset.
I had nowhere near this level of ease of use with SuSE 10.0 (Community, not commercial). Even with Mandrake (sorry,... Mandriva [rolls eyes]), I have trouble setting up newtwork compatibility wuth WPA and WEP encryption. WPA_Supplicant does not auto-install (I installed it manually), and although my PCMCIA wifi card is supported by madwifi drivers, I still cannot (easily or at all right now) set up my laptop to talk to my wifi router.

I have no trouble accessing un-encrypted networks though... and my Palm LifeDrive connects easily, as do friends computers using WPA encryption...

There has got to be something I'm missing...
 
Old 04-26-2006, 07:46 AM   #9
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,445
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by JaseP
WPA_Supplicant does not auto-install (I installed it manually), and although my PCMCIA wifi card is supported by madwifi drivers, I still cannot (easily or at all right now) set up my laptop to talk to my wifi router.
I'm not 100% sure which version of Suse 10.0 I got, but it was in the form of 5 iso files that I downloaded for free from an official mirror. I think it may have been the commercial version.

Anyhow, it automatically installed wpa_supplicant and madwifi for me. As I said, all I had to do was enter my router's passphrase for access. It was all downhill from there. I never thought I'd see anything like it.
 
Old 04-26-2006, 11:33 AM   #10
JazzLad
Member
 
Registered: Apr 2006
Location: Salt Lake City, UT
Distribution: ubuntu
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rkelsen
I'm not 100% sure which version of Suse 10.0 I got, but it was in the form of 5 iso files that I downloaded for free from an official mirror. I think it may have been the commercial version.

Anyhow, it automatically installed wpa_supplicant and madwifi for me. As I said, all I had to do was enter my router's passphrase for access. It was all downhill from there. I never thought I'd see anything like it.
Unfortunately I have a crappy broadcomm card that came (built in) with my laptop. I am currently researching alternative cards, Atheros chipset is mentioned a lot by happy people . . . it may be time to watch the sales
 
Old 04-26-2006, 02:32 PM   #11
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
The broadcom card really shouldn't be an obstacle since ndiswrapper and wpa_supplicant work together. If I remember correctly, if you know the config and keys for your various networks, you can enter them into your wpa_supplicant configuration file and it will automatically scan for those and use the strongest signal. As you move between those known networks, wpa_supplicant is capable of switching between them. I don't know how/if it can pick up unkown networks though.

Personally, I just wrote a perl script that scans for any available network and then presents me with a list to choose from. I hard coded in the three secured networks I routinely use and can just pick them from the list. I've posted the script a few times here, but if you want, I can post it again.
 
Old 04-26-2006, 02:37 PM   #12
JazzLad
Member
 
Registered: Apr 2006
Location: Salt Lake City, UT
Distribution: ubuntu
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Hangdog42
The broadcom card really shouldn't be an obstacle since ndiswrapper and wpa_supplicant work together...
Quote:
Originally Posted by Hangdog42
...Personally, I just wrote a perl script that scans for any available network and then presents me with a list to choose from. I hard coded in the three secured networks I routinely use and can just pick them from the list. I've posted the script a few times here, but if you want, I can post it again.
I've never used wpa_supplicant, I will have to look into it. I actually don't know that I even have ndiswrapper installed ATM, as I am using a different installation than I was when I got it working before . . .

. . . I'm afraid I would also need instruction as to what to do with the perl script. Though the forum won't give away my secret after 1 more post, I am still a
 
Old 04-27-2006, 07:20 AM   #13
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Well, for what its worth, this is it:

Code:
#!/usr/bin/perl
$Interface = "wlan0";
$HomeESSID = "HomeSSID";
$WEP = "HexWEPKey";
$Mode = "Managed";
$IWCONFIG = "/sbin/iwconfig";
$DHCP = "/sbin/dhcpcd -t 10 -d -N";
@APList = ();
#First load the ndiswrapper module
print("Loading ndiswrapper\n");
system("/sbin/modprobe ndiswrapper");
print("Scanning for wireless access points\n");
@ScanList = qx/iwlist wlan0 scan/;
push(@APList, 'Exit');
push(@APList, 'Home');
push(@APList, 'Work');
foreach $a (@ScanList){
	if($a =~m/No scan results/){
                print("No networks detected, enabling home network\n");
                &homeNet;
        }
	if($a =~ m/$HomeESSID/){
                print("Home network detected\n");
		&homeNet;
	}
	if ($a =~m/ESSID/){
		@Temp = split(/"/,$a);
		push(@APList,$Temp[1]);

	}
}
&selectFrom;
sub homeNet{
	print("Setting up wlan0\n");
	system("$IWCONFIG $Interface essid $HomeESSID");
	system("$IWCONFIG $Interface mode $Mode");
	system ("/sbin/iwconfig wlan0 key $WEP");
	print("Requesting IP from $HomeESSID\n");
	system("$DHCP $Interface");
	system ("ifconfig $Interface up");
	print("Configuration done\n");
	exit;
}
sub selectFrom{
	print("Select one of the following AP points\n");
	for($x=0;$x<=$#APList;$x++){
		print("$x - $APList[$x]\n");
	}
	print("Select by number: ");
	$SelectAP = <STDIN>;
	if((0 <= $SelectAP) and ($SelectAP<=$#APList)){
		if($SelectAP ==0){
			print("No AP Selected, exiting program\n");
			exit;
		}
		if($SelectAP==1){
			print("Configuring Home Network\n");
			&homeNet;
			exit;
		}
		if($SelectAP==2){
			print("Configuring work Network\n");
			system("/etc/rc.d/rc.work");
			exit;
		else{
			print("Using $APList[$SelectAP]\n");
			system("$IWCONFIG $Interface essid $APList[$SelectAP]");
			print("Requesting IP from $APList[$SelectAP]\n");
			system("$DHCP $Interface");
			system("ifconfig $Interface up");
			exit;
		}
	}
	else{
		print("Please select an acceptable number\n");
		&selectFrom;
	}
	exit;
}

It is a console program and basically you need to edit the top portion to contain the relevant info for your "home" network. You also may need to change teh dhcpcd call to get an IP address. Slackware uses dhcpcd, but I'm not sure that ubuntu does. Also notice the work section calls to an outside script. I've found that having a separate bash script containing the appropriate iwconfig commands for each network I usually use works well, so I just call those from this program.
 
Old 04-27-2006, 03:18 PM   #14
Cogar
Senior Member
 
Registered: Oct 2005
Location: It varies, but usually within 100 feet of a keyboard.
Distribution: Fedora 10, Kubuntu 8.04, Puppy 4.1.2, openSUSE 11.2
Posts: 1,126

Rep: Reputation: 52
SUSE 10.0 has a relatively painless way of setting up or editing WiFi settings. I am not sure regarding managing multiple access points, though. Anyway, here is a link that goes through the process step-by-step. You have to scroll down to the sections entitled "Setting up a wireless card" and "Adding encryption to a wireless network connection."

http://www.hdxzone.com/linux_install-suse.htm

I hope that helps.
 
Old 05-06-2006, 08:50 AM   #15
-=Graz=-
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358

Rep: Reputation: 31
Linux is not quite the double click that windows is to connect to an access point. I have not had much success with any GUI apps in linux (although im sure they probably exist)... You will find that you can connect to any access point that you have the key for using the 'wireless tools'.. at a glance it looks a little horrible as it is from the console - however it really is quite easy.

for example: if i want to connect to my home network i type--

#ifconfig eth1 up
#iwconfig eth1 essid MyHomeNetwork
#iwconfig eth1 key s: MySecretKey
#dhcpcd eth1 (to ask router for IP address)

I know it looks a bit much but it does wok very well.

( you can type #iwconfig or #ifconfig to see the name of your adaptor)
you can setup scripts to connect to your preferred network as well - unsure what they are in your distro but im sure they exist and you should be able to enter the name/key etc in here and it should work whenever you are in range.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Opinions Wanted mickeyboa Fedora 2 11-19-2005 04:58 PM
Opinions Wanted: Linux Server for Small LAN ech310n Linux - Hardware 5 09-20-2005 03:10 PM
64 Bit Linux, opinions wanted steelgrave Linux - General 4 01-20-2005 08:06 AM
wifi general question mvbv-linux Linux - Wireless Networking 2 11-21-2003 11:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 03:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration