LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-27-2005, 06:03 PM   #1
mdj
LQ Newbie
 
Registered: Jan 2005
Location: Halfmoon, NY
Posts: 26

Rep: Reputation: 15
Wireless config based on ESSID?


I feel like I must be missing something obvious, but I can't figure out how to do this. I use my laptop frequently in three different locations with WiFi networks. Two of them have WEP turned on, one doesn't. I would like to have the system configure itself with the appropriate encryption settings based on the ESSID of the network, but I can't seem to find an easy way to do it. Any suggestions?
 
Old 02-27-2005, 10:08 PM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
create 3 scripts, 1 per locations and enter the ESSID and WEP keys


#!/bin/bash
ifconfig eth0 down
iwconfig eth0 essid ESSID1 key a873b2dc891
ifconfig eth0 up
dhcpcd eth0


repleace the dhcpcd line if you use a static IP
ifconfig eth0 10.1.1.5
 
Old 02-28-2005, 02:58 AM   #3
short101
Member
 
Registered: May 2004
Location: Aust.
Distribution: Debian
Posts: 424

Rep: Reputation: 30
Wpasupplicant might work for you or waproamd. Waproamd is the older of the two and is no longer in development. Dont have a clue on how to get wpasupplicant working yet, only installed it today and am going to play with it latter. But what it does (apparently) is gets your card to search for networks, when it finds one, looks in the config, if it matches one, authenticates and away you go. Its config file looks abit horrifying to me at the moment, but then again they all do untill you understand how they work.
 
Old 03-06-2005, 11:19 AM   #4
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Rep: Reputation: 30
did you get wpasupplicant to work? I am trying to get it to work with EAP-FAST support, but I could really use some help..
 
Old 03-06-2005, 12:17 PM   #5
mdj
LQ Newbie
 
Registered: Jan 2005
Location: Halfmoon, NY
Posts: 26

Original Poster
Rep: Reputation: 15
I haven't gotten it to work completely yet. I go between two locations that are using standard WEP and two that run open WAPs. I was able to build it and get it to run with no problem, and I can run it from the command line and connect to my local AP using WEP. I haven't been able to get it hooked in to the startup scripts, though. It tells me it's associated with the AP, but I can't get DHCP responses to the interface after that.
 
Old 03-06-2005, 12:26 PM   #6
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Rep: Reputation: 30
I don't mind running it from the command line, since I only will be using it at school. But there is something wrong with my configuration.

This is what I have edited in /etc/wpa_supplicant.conf :
Code:
# EAP-FAST with WPA (WPA or WPA2)
network={
        ssid="eap-fast-test"
        key_mgmt=WPA-EAP
        eap=FAST
        anonymous_identity="FAST-000102030405"
        identity="username"
        password="password"
        phase1="fast_provisioning=1"
        pac_file="/etc/wpa_supplicant.eap-fast-pac"
}
I have filled in the ssid, my username and my password. I have also put the right pat to the pac-file.
Then later on, this is what happens:
Code:
bluefish:~# wpa_cli

Could not connect to wpa_supplicant - re-trying
and
Code:
bluefish:~# wpa_supplicant 
Line 436: unknown EAP method 'FAST'
You may need to add support for this EAP method during wpa_supplicant
build time configuration.
See README for more information.
Line 436: failed to parse eap 'FAST'.
Line 442: failed to parse network block.
Failed to read configuration file '/etc/wpa_supplicant.conf'.
I was hoping that someone here would know how to fix this..
 
Old 03-06-2005, 12:59 PM   #7
mdj
LQ Newbie
 
Registered: Jan 2005
Location: Halfmoon, NY
Posts: 26

Original Poster
Rep: Reputation: 15
When you did a ./configure, did you define CONFIG_EAP_FAST in the .config file? It may not be compiled in.
 
Old 03-06-2005, 01:02 PM   #8
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Rep: Reputation: 30
Quote:
Originally posted by mdj
When you did a ./configure, did you define CONFIG_EAP_FAST in the .config file? It may not be compiled in.
I used apt-get .. Didn't get a choice like that.
 
Old 03-06-2005, 01:05 PM   #9
mdj
LQ Newbie
 
Registered: Jan 2005
Location: Halfmoon, NY
Posts: 26

Original Poster
Rep: Reputation: 15
Get the source package and build it. It sounds like whatever binary package you got doesn't have that module built in. It's a piece of cake to build.
 
Old 03-06-2005, 01:19 PM   #10
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Rep: Reputation: 30
Quote:
Originally posted by mdj
Get the source package and build it. It sounds like whatever binary package you got doesn't have that module built in. It's a piece of cake to build.
Ok, So I downloaded wpasupplicant from this page: http://packages.debian.org/unstable/net/wpasupplicant (wpasupplicant_0.3.8.orig.tar.gz), and I have now read the README. I am still unsure of how to make this build-time-configuration-file..
 
Old 03-06-2005, 02:20 PM   #11
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Rep: Reputation: 30
Here we go again. I have managed to make a .config, but when I run 'make' I get this error (and yes, I have openssl installed):
Code:
bluefish:/usr/local/lib/wpa_supplicant-0.3.8# make
cc -MMD -O2 -Wall -g -I../driver/modules -I../utils -I../hostapd -DCONFIG_DRIVER_MADWIFI -DEAP_FAST -DIEEE8021X_EAPOL -DEAP_TLS_FUNCS -DCONFIG_WIRELESS_EXTENSION -DCONFIG_CTRL_IFACE -DCONFIG_XSUPPLICANT_IFACE   -c -o md5.o md5.c
In file included from md5.c:20:
md5.h:6:25: warning: openssl/md5.h: No such file or directory
md5.c: In function `md5_mac':
md5.c:26: error: `MD5_CTX' undeclared (first use in this function)
md5.c:26: error: (Each undeclared identifier is reported only once
md5.c:26: error: for each function it appears in.)
md5.c:26: error: parse error before "context"
md5.c:27: warning: implicit declaration of function `MD5_Init'
md5.c:27: error: `context' undeclared (first use in this function)
md5.c:28: warning: implicit declaration of function `MD5_Update'
md5.c:31: warning: implicit declaration of function `MD5_Final'
md5.c: In function `hmac_md5_vector':
md5.c:39: error: `MD5_CTX' undeclared (first use in this function)
md5.c:39: error: parse error before "context"
md5.c:47: error: `context' undeclared (first use in this function)
make: *** [md5.o] Error 1
Anyone?..
 
Old 03-06-2005, 03:10 PM   #12
mdj
LQ Newbie
 
Registered: Jan 2005
Location: Halfmoon, NY
Posts: 26

Original Poster
Rep: Reputation: 15
Near the top of the .config file are the following lines:
Code:
# Uncomment following two lines and fix the paths if you have installed openssl
# in non-default location
#CFLAGS += -I/usr/local/openssl/include
#LIBS += -L/usr/local/openssl/lib
Try specifying the path to the openSSL includes using that CFLAGS statement;

Last edited by mdj; 03-06-2005 at 03:12 PM.
 
Old 03-06-2005, 03:21 PM   #13
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Rep: Reputation: 30
Quote:
Originally posted by mdj
Try specifying the path to the openSSL includes using that CFLAGS statement; [/B]
I can't find any openSSL includes ..
 
Old 03-06-2005, 03:28 PM   #14
mdj
LQ Newbie
 
Registered: Jan 2005
Location: Halfmoon, NY
Posts: 26

Original Poster
Rep: Reputation: 15
Ah, that could be the problem. You said you'd installed the openssl packages, but it sounds like you didn't instal the openSSL development packages. On my (SuSE) system, /usr/include/openssl/md5.h is provided by openssl-devel-0.9.7d-25.1. That's what I'd check next.
 
Old 03-07-2005, 09:00 AM   #15
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Rep: Reputation: 30
Quote:
Originally posted by mdj
Ah, that could be the problem. You said you'd installed the openssl packages, but it sounds like you didn't instal the openSSL development packages. On my (SuSE) system, /usr/include/openssl/md5.h is provided by openssl-devel-0.9.7d-25.1.
I have installed the following packages:
libssl-dev
openssl

.. apt-cache search doesn't return much more about (open)ssl.
 
  


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
Select wifi configuration based on essid BlueNoteMKVI Linux - Wireless Networking 3 11-26-2005 07:38 AM
wireless networks with same channel and essid? slinky2004 Linux - Hardware 7 10-16-2005 08:10 AM
Linux based gateway for time-based wireless service. TotalDefiance Linux - Software 0 10-03-2005 06:06 PM
Wireless not working; can't set ESSID nfisk Linux - Wireless Networking 18 07-16-2005 03:20 PM
Multiple ESSID one wireless Card john8675309 Linux - Wireless Networking 0 10-12-2004 08:19 PM

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

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