You are not logged in.

#1 2007-11-06 19:20:16

r00
Member
From: Philadelphia, PA
Registered: 2007-10-28
Posts: 21

Network Profiles with any ESSID?

I was wondering if it's possible to set a network profile, such as my wireless one, to obtain "any" essid, connect, and send a DHCP request?

# Wireless Settings (optional)
ESSID=any
#KEY=
IWOPTS="mode managed essid $ESSID"

Doesn't seem to be doing the trick. Right now I have my rc.local doing the work with:

iwconfig wlan0 essid any

Which does work and connects me to any open AP. I'm just wondering if there's a way to implement this in the network profiles because when Arch boots, it hangs on "Starting Network Profile: wireless" and spits out "wlan0 timed out". Of course because it's not connecting to any ESSID.

Offline

#2 2007-11-06 22:29:46

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,958

Re: Network Profiles with any ESSID?

Have you tried IWOPTS="mode managed" ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2007-11-08 02:58:33

r00
Member
From: Philadelphia, PA
Registered: 2007-10-28
Posts: 21

Re: Network Profiles with any ESSID?

This doesn't do anything.

Offline

#4 2007-11-08 03:28:22

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Network Profiles with any ESSID?

It'd probably work with netcfg2... but I can't say for sure. Most people know what network they want to connect to.

http://bbs.archlinux.org/viewtopic.php? … 94#p296294

Offline

#5 2007-11-08 08:38:13

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: Network Profiles with any ESSID?

r00: yes, it is possible also with plain net profiles in /etc/network-profiles/
On my laptop I have a profile that searches through all detected wireless networks, selects the first unencrypted one and connects to it with dhcp. I'll paste the file here when I get home (in 8 or 9 hours), send me a PM or mail if I forget.

Offline

#6 2007-11-08 16:59:34

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: Network Profiles with any ESSID?

Here it is, I have this file in /etc/network-profiles/
This profile always selects the first network returned from iwlist scan.

#
# Network Profile
#

DESCRIPTION="Any unencrypted wireless"

# Network Settings
INTERFACE=eth1
HOSTNAME=myhost

# Interface Settings (use IFOPTS="dhcp" for DHCP)
IFOPTS="dhcp"
#GATEWAY=192.168.1.1

# DNS Settings (optional)
#DOMAIN=localdomain
#DNS1=192.168.1.1
#DNS2=

# Wireless Settings (optional)
#ESSID=`iwlist $INTERFACE scan | grep ESSID | sed 's/.*ESSID:"//' | sed 's/".*//' | line`

WLAN_LIST="/tmp/wlan-list"
iwlist eth1 scan >$WLAN_LIST
LINE_ESSID=`grep -n "Encryption key:off" $WLAN_LIST | line | sed "s/:.*//"`
let LINE_ESSID=$LINE_ESSID-5
ESSID=`grep -n ESSID $WLAN_LIST | grep $LINE_ESSID\: | sed 's/.*ESSID:"//' | sed 's/".*//'`

#KEY=
IWOPTS="mode managed essid $ESSID"

#WIFI_INTERFACE=wlan0   # use this if you have a special wireless interface
                        # that is linked to the real $INTERFACE

#WIFI_WAIT=5            # seconds to wait for the wireless card to
                        # associate before bringing the interface up
#USEWPA="yes"           # start wpa_supplicant with the profile
#WPAOPTS=""             # use "" for normal operation or specify additional
                        # options (eg, "-D ipw")
                        # see /etc/wpa_supplicant.conf for configuration
#AUTOWPA="yes"          # automatically configure WPA

I rarely use it as I almost always connect to either WPA or wired network, but it works fine as I recall.

Last edited by mico (2007-11-08 17:00:22)

Offline

#7 2007-11-22 01:26:30

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Network Profiles with any ESSID?

<snipped>

FYI, the following example profile should work with the latest netcfg2 scripts in [testing] to find and connect to any unencrypted network within range.

CONNECTION="wireless"
DESCRIPTION="Generic connection for open networks"
INTERFACE=wlan0
SCAN="yes"
SECURITY="none"
ESSID="*"
IP="dhcp"

I can confirm that it works with my iwl3945 card connecting to an open WEP network.

Last edited by thayer (2007-11-22 06:03:11)


thayer williams ~ cinderwick.ca

Offline

Board footer

Powered by FluxBB