| Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
Due to network maintenance being performed by our provider, LQ will be down starting at 05:01 AM UTC. The exact duration of the downtime isn't currently known. We apologize for the inconvenience.
|
 |
03-04-2009, 01:29 PM
|
#1
|
|
LQ Newbie
Registered: Jan 2006
Distribution: Ubuntu 8.04 "Hardy Heron"
Posts: 7
Rep:
|
Connect To Unprotected HotSpot Using Only Command Line
Hi,
Can anybody show me how to search and connect to an unprotected/open wifi hotspot (e.g. Internet Cafe, hotels, airports, etc.) using only the command line?
I'm using Ubuntu 8.04 (a.k.a "Hardy Heron")
Any help would be greatly appreciated. Thanks!
|
|
|
|
03-05-2009, 06:39 AM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,702
|
just use the iwconfig tool to set your AP, and iwlist to find available hotspots. Once you're associated you'd normally then run a dhcp client against the interface to get an ip.
|
|
|
|
03-05-2009, 06:44 AM
|
#3
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
These commands can be tricky. I have found that I often have to run iwconfig, then do "ifconfig wlan0 down", then bring it up again, then maybe run iwconfig again. I have no idea what is going on in the background, but GUI front ends such as WICD seem to work pretty seamlessly.
|
|
|
|
03-05-2009, 08:01 AM
|
#4
|
|
LQ Newbie
Registered: Jan 2006
Distribution: Ubuntu 8.04 "Hardy Heron"
Posts: 7
Original Poster
Rep:
|
I did some research and found that you first need to use the command
Code:
sudo iwlist [interface] scan
to be able to find available wireless networks within your area.
Then you use a series of iwconfig commands to configure your wireless interface to point to one of the wireless networks found by the iwlist [interface] scan command.
Then you finally issue the command
Code:
sudo dhclient [interface]
to get an IP Address from the selected wireless network.
My question now is what essential iwconfig commands are needed to configure my wireless interface to connect to the open/unprotected wireless network or hotspot.
Thanks.
Last edited by nythacker; 03-05-2009 at 08:06 AM.
|
|
|
|
03-05-2009, 08:13 AM
|
#5
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
Quote:
Originally Posted by nythacker
My question now is what essential iwconfig commands are needed to configure my wireless interface to connect to the open/unprotected wireless network or hotspot.
Thanks.
|
Good to see the quick learning.....
In your problem statement, "essential" means that you have to know "enough" to connect to the hotspot. If it is not protected, then normally all you need is the essid. If this is not hidden, then you will get it from "iwlist ... scan".
Best case example:
iwlist wlan0 scan ##finds one open hotspot with essid = "fred" (and adequate signal strength)
iwconfig wlan0 essid fred
dhclient (or dhcpcd wlan0)
|
|
|
|
03-13-2009, 12:17 PM
|
#6
|
|
LQ Newbie
Registered: Jan 2006
Distribution: Ubuntu 8.04 "Hardy Heron"
Posts: 7
Original Poster
Rep:
|
Quote:
Originally Posted by pixellany
Good to see the quick learning.....
In your problem statement, "essential" means that you have to know "enough" to connect to the hotspot. If it is not protected, then normally all you need is the essid. If this is not hidden, then you will get it from "iwlist ... scan".
Best case example:
iwlist wlan0 scan ##finds one open hotspot with essid = "fred" (and adequate signal strength)
iwconfig wlan0 essid fred
dhclient (or dhcpcd wlan0)
|
Thank you so much, Pixellany. Your solution worked on mine...
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:33 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|