LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-10-2007, 11:36 PM   #1
der_11
Member
 
Registered: Jun 2007
Location: Canada
Distribution: Slackware 12.0, Fedora 7
Posts: 40

Rep: Reputation: 15
Not able to connect to wireless "hotspots"


I have set up my laptop to connect using the ipw2200 with WPA to my home network and it works great. But, I have started school again and my campus has wireless all over the place, but I cannot connect to it.

It is a open network which anyone can connect to, but requires your student ID and password once you open a web browser.

So, when I boot up it normally tries to connect to my home network first, then any essid it can find. However, when I booted up at school, my laptop froze when trying to connect to the school network.

inet.d
Code:
# Config information for eth1:
IFNAME[1]="eth1"
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]=""
WLAN_WPA[1]="wpa_supplicant"
WLAN_WPADRIVER[1]="wext"
rc.wireless.conf
Code:
## NOTE : Comment out the following five lines to activate the samples below ...
## --------- START SECTION TO REMOVE -----------
## Pick up any Access Point, should work on most 802.11 cards
*)
    INFO="Any ESSID"
    ESSID="any"
    ;;
## ---------- END SECTION TO REMOVE ------------
Everything else is commented out in both files.

Is there some sort of wireless manager I can use on startup instead?

If it makes a difference I have acpi=off because my wireless, sound, and usb devices don't work without that off.

Hopefully I can get this resolved since my laptop is useless at school right now.
 
Old 09-11-2007, 09:55 AM   #2
owenjh
Member
 
Registered: Sep 2007
Distribution: Fedora / Slackware
Posts: 46

Rep: Reputation: 15
Try to see if you can use iwconfig to connect to your school network? That should be your first step.

Should go something like this:
Code:
iwconfig ethX essid any
iwconfig ethX enc off
dhcpcd ethX
 
Old 09-11-2007, 10:47 AM   #3
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Do you have a stanza in your wpa_supplicant.conf for any essid with no key management?

Brian
 
Old 09-11-2007, 12:14 PM   #4
der_11
Member
 
Registered: Jun 2007
Location: Canada
Distribution: Slackware 12.0, Fedora 7
Posts: 40

Original Poster
Rep: Reputation: 15
I only have the default entry provided at the bottom and my personal home network in my wpa_supplicant.conf

Could I just add an entry for my school since I know the essid? Like so:
Code:
network={
ssid="BCIT"
key_mgmt=NONE
}
 
Old 09-11-2007, 12:34 PM   #5
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by der_11 View Post
I only have the default entry provided at the bottom and my personal home network in my wpa_supplicant.conf

Could I just add an entry for my school since I know the essid? Like so:
Code:
network={
ssid="BCIT"
key_mgmt=NONE
}
You could, but it should also work with the ssid="any".

You should try connecting manually, as already suggested. You can also run wpa_supplicant manually with the -d option to see what it is doing. Does "iwlist eth1 scanning" show your school network?

Brian
 
Old 09-11-2007, 08:57 PM   #6
der_11
Member
 
Registered: Jun 2007
Location: Canada
Distribution: Slackware 12.0, Fedora 7
Posts: 40

Original Poster
Rep: Reputation: 15
That's a problem since when I try and boot it hangs when it tries to connect to my schools network. Which means I cannot login, therefore cannot afford to be testing a different setting everyday.
 
Old 09-13-2007, 02:41 PM   #7
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
Try commenting the settings in inet.d so it doesn't attempt to configure when booting, then try to connect manually. If that works you might prefer to make a small shell script to activate your connection depending on where you are after the computer is started.

#!/bin/bash

case $1
home)
dhclient wlan0
iwconfig wlan0 wpa_supplicant ...

school)
dhclient wlan0

esac

Of course this is just an example. I made something similar because I was collecting access points all over the place.
 
Old 09-13-2007, 07:45 PM   #8
der_11
Member
 
Registered: Jun 2007
Location: Canada
Distribution: Slackware 12.0, Fedora 7
Posts: 40

Original Poster
Rep: Reputation: 15
Okay that sounds like it should work....

I have never actually written any shell script so far in Linux. Where would I place it so it runs when I login?

I don't know the syntax exactly so would my script be something like this:
Code:
#!/bin/bash
case "House"
dhclient eth1
iwconfig eth1 wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf

case "BCIT"
dhclient eth1

esac
 
Old 09-14-2007, 07:41 AM   #9
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
A shell script such as this would have to be run manually from the console or an xterm window, because you need to supply a parameter to tell it where you are so that it configures eth1 appropriately. If it works, that's cool. If not, it didn't hurt anything to try and you learned something about scripting. Also if it works it only takes a couple of times using it for it to become second nature.

It's actually a short version of what I use on my desktop and laptop. Mine has gotten quite complex because I have different usb wifi adapters for the desktop and different pcmcia ones for the laptop. And as I find more access points for the laptop I add them to the script.

Whatever you decide for the filename will be the name of the command. It's a plain text file so you can create it with any text editor. It can be kept in your home directory and run from there. The only syntax problems I see are:

1. You forgot case $1 in before the actual cases. This is how the script knows to accept a parameter. The parameter, as you define, is either House or BCIT.

2. "House" and "BCIT" should be written as House) and BCIT)

3. There has to be a ;; at the end of each case section

I haven't wep or wpa so I don't know about the syntax for it. I would add this little bit _after_ the BCIT section.

case *)
echo "usage: wlan [House|BCIT]"
exit 1
;;

This is assuming the script is called wlan. This means that anything other than House or BCIT simply prints the usage line and then stops. So if it's in your home directory, after you login, before starting X or from an xterm simply type

wlan House

or

wlan BCIT

If you get any errors (I don't think you would) you may need to run it with root permission using su -. Mine has to run with su because I set everything static instead of dhcp.

Last edited by dracolich; 09-14-2007 at 07:43 AM.
 
Old 09-14-2007, 09:15 AM   #10
Ace1970
LQ Newbie
 
Registered: Apr 2004
Location: Canada
Distribution: openSuSE 10.2 & Slackware 12
Posts: 13

Rep: Reputation: 0
Quote:
Originally Posted by der_11 View Post

Is there some sort of wireless manager I can use on startup instead?
If you run KDE, KInternet is a handy little app to manage wireless connections. Blows away KNetwork Manager in the wireless dept. if you ask me.
 
Old 09-14-2007, 10:17 AM   #11
dennisk
Member
 
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279

Rep: Reputation: 30
Quote:
If you run KDE, KInternet is a handy little app to manage wireless connections.
Except that Kinternet isn't installed in Slackware 12.0.

Have you tried kwifimanager which is installed?

Dennisk
 
Old 09-14-2007, 10:30 AM   #12
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
I think the OP is using Fedora, not Slackware, because the posted interface settings are from inet.d and not rc.inet1.conf.
 
Old 09-14-2007, 07:10 PM   #13
der_11
Member
 
Registered: Jun 2007
Location: Canada
Distribution: Slackware 12.0, Fedora 7
Posts: 40

Original Poster
Rep: Reputation: 15
No, I'm using Slackware 12.0. Good news is that I was connected at my school today. I just commented out all the settings in the wireless.rc and set my eth1 dhcp to yes, which got me connected.

I have been playing with the Kwifimanager but it doesn't seem to offer and WPA settings. There is a section for executing a script on connect and I tried to put etc/wpa_supplicant.conf in there but that did not work.
 
Old 09-15-2007, 08:55 AM   #14
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
That is good news. And thanks for clearing up any distro confusion. I think I tried kwifimanager once but was thoroughly unimpressed. IMO, gui apps for network configuration aren't reliable or informative enough. All I need is ifconfig, iwconfig and xterm.

I know little-to-nothing about wpa, but if that .conf file isn't an executable script that would be why it didn't work. You could try to use part of the script that you started earlier.

Code:
#!/bin/bash
iwconfig eth1 wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf
Save it as whatever name you want then run chmod +x on it to make it executable and point the "execute on connect" field to it.

Although wpa is better than wep, it's still hackable. In my home network I use MAC address filtering. If your nic's MAC address isn't in the router's list of allowed devices you can't connect to my router.
 
Old 09-15-2007, 09:21 AM   #15
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by dracolich View Post
Although wpa is better than wep, it's still hackable. In my home network I use MAC address filtering. If your nic's MAC address isn't in the router's list of allowed devices you can't connect to my router.
WPA is only hackable using dictionary attack. If you use a not-easily guessable passphrase to generate your key, then your WPA encryption is virtually unbreakable.
And remember, spoofing a MAC address is a possible attack vector too.

Eric
 
  


Reply

Tags
hotspot, wireless



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
"(ath0/wireless): couldn't connect to the supplicant." Benanzo Linux - Wireless Networking 1 12-21-2006 02:41 PM
re "cant connect to internet using suse10" and "will this work?" beejayess Linux - Newbie 12 07-11-2006 02:16 PM
Wireless chip is displayed as "Ath0" instead of "wlan0" with Belkin F5D7000 ceramicsushi Linux - Wireless Networking 4 04-05-2006 11:26 PM
Problem with "3Com", "3CRSHPW_96 Wireless LAN PC Card " Adil_uk Linux - Wireless Networking 0 12-18-2005 05:45 PM
Help installing my "SMC EZ Connect Wireless USB Adapter(SMC2662W)" ad1das Linux - Wireless Networking 3 06-05-2004 12:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:12 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