LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-24-2006, 07:04 AM   #16
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422

Connecting to a wireless network really consists of two parts. The first one is configuring the card and the second one is requesting (or assigning) and IP address and other required network configurations. Lets handle the configuration first:

Quote:
Using the kwifi manager I scanned for networks in the area. It found one labled "FMWireless" I recognized and can connect to with windows. In the scan report box it listed "FMWIRELESS" mode (empty) quality "0" and Wep 'on'. I discovered that I could select the wep setting and change it to off, and when I did that, the button at the bottom left of the scan report window (Switch to network) became clickable (no longer grayed out) I clicked on it and nothing happened. I loaded a browser to see if it had connected and forgot to tell me, but nope, no server found.
When configuring a card, you need to do at least one, and possibly more, things. The first is set the SSID of the station you want to use (in this case FMWireless) using a command like this:

iwconfig eth1 essid FMWireless

If that is successful, you should see FMWireless appear in the iwconfig output. The second (and sometimes optional) bit is to enable encryption.


Quote:
iwconfig eth1 key xxxxxxxxxxxx
is correct, provided the xxx bit is the hex version of the key. The fact that you can connect to this AP with Windows suggests that either the AP isn't WEP secured, or that Windows has had the WEP key entered previously. The fact that the scan is reporting that WEP is enabled suggests that a key is required.
Quote:

and then pump -i ???
This is the second part of using a wireless card, getting an IP address. Assuming that the access point is running a DHCP server, you need to run a DHCP client. Some of the common ones in Linux are dhcpcd, dhclient and pump. Now normally, pump is called using the ifup command, so rather than running pump directly, you can run it like this (as root):

ifup eth1

which (if your card is configured and you're lucky) will get an IP address, set the gateway and add a DNS to /etc/resolv.conf. All DHCP clients will do this, not just pump. You can also avoid using DHCP and set these parameters up manually using ifconfig, route, and a text editor, but that usually requires some knowledge of the network you're trying to connect to like the IP range they allow, the IP address of the router and the IP addresses of their ISP. On a home network, you're likely to know these things but if you are out using someone elses, that isn't likely.

And yes, ssid and essid refer to the same thing, the name of the access point.
 
Old 10-25-2006, 12:28 AM   #17
darin722
LQ Newbie
 
Registered: Oct 2006
Location: seattle
Distribution: ubuntu, fedora, knoppix,backtrack, others
Posts: 23

Original Poster
Rep: Reputation: 15
re: how to connect

Hangdog:
The steps you outlined are pretty much what I'd surmised from various help sources. I don't see anything I haven't heard of and your post did clarify a few details. Here's where I am today:

I found a hotspot open to windows, booted linux, set up the drivers and opened kwifi manager. I found the network in question with scan, with wep set to on. (I think my system is responsible for the 'on' setting since windows says it's an open network) I set it to off and got the "switch to network" button. As before, clicking it did no good. i opened the 'configuration editor' and set the network name, changed 'iface autodetected' to eth1, and turned off 'use encryption' and finally,clicked on 'activate'. The signal strength jumped from 0 to 100% and the good stuff showed up under AccessPoint and frequency(channel). I looked under connection statistics and it appeared that signal to noise graph was giving real and reasonabe data for a connection.

I opened a terminal window and started playing with different comands to iwconfig and pump. I noticed that commands to iwconfig in the terminal were reflected almost immediately by changes in kwifi manager, so I had some feedback if I worsened the connection status.

No matter what I tried in iwconfig, pump -i eth0 returned 'operation failed' after a several second pause.

ifup eth1 failed immediately.

I'm sure the access point is open, windows grabs it fine, i'm pretty sure my card was talking to their system because I got access point and signal...so where do I look to find out why pump and ifup failed?
 
Old 10-25-2006, 06:56 AM   #18
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
I would have a look in your system logs (/var/log/syslog and /var/log/messages) as well as dmesg to see if ifup or pump are leaving clues.

By the way, you are root when you run ifup or pump, aren't you? As an alternative to pump, try dhclient or dhcpcd if one of them is installed on your system.

I would also (at least for now) avoid using kwifi manager. It may be hiding important errors. You can use iwconfig and iwlist in the console to do most of what you need to do.

Last edited by Hangdog42; 10-25-2006 at 06:57 AM.
 
Old 10-26-2006, 05:39 PM   #19
darin722
LQ Newbie
 
Registered: Oct 2006
Location: seattle
Distribution: ubuntu, fedora, knoppix,backtrack, others
Posts: 23

Original Poster
Rep: Reputation: 15
Connected!

Huh! I had been running pump with the sudo command, not actually logged in as root. Maybe that was the problem, or maybe in trying different commands to iwconfig I lost something I needed, but in any event, I am currently connected via the local library's wireless hotspot. WOOHOO! Thanks for all your patient help hangdog!
 
Old 10-26-2006, 05:53 PM   #20
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Congrats! In theory sudo should be the same as being root, but I suppose it is possible that sudo doesn't pick up on all of roots environement variables and something goes haywire. I know I run dhcpcd with sudo all the time and it works, but pump may behave differently.
 
  


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
Getting a Dell A940 USB printer to work on Dell Inspiron 1100 Laptop benrose111488 Linux - Hardware 12 09-24-2007 12:04 PM
Mic problem Inspiron1300 SuSE 10.1 RumenS Linux - Laptop and Netbook 3 07-20-2006 01:03 PM
Unable to get D-Link PCMCIA card to work under Knoppix on a Dell gladfan3 Linux - Hardware 1 03-07-2006 08:04 PM
knoppix on Dell 300m shmude Linux - Laptop and Netbook 14 09-17-2004 01:56 AM
Knoppix-STD help on a Dell tbonehat Linux - Laptop and Netbook 3 02-21-2004 03:55 AM

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

All times are GMT -5. The time now is 11:56 AM.

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