You are not logged in.

#1 2007-11-08 17:04:41

brainiac
Member
Registered: 2007-11-08
Posts: 25

Escape Space in ESSID (network-profiles)

My Problem is that the ESSID from my router has spaces in it.

In my /etc/network-profiles/wireless

ESSID="word1 word2 word3"
IWOPTS="mode managed essid $ESSID"

On network start i get the error

iwconfig: unknown command "word2"

and the essid is word1

how do i escape the spaces so the complete essid is passed to iwconfig?

btw: changing the essid is no option here hmm

Last edited by brainiac (2007-11-08 17:23:46)

Offline

#2 2007-11-08 17:10:54

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

Re: Escape Space in ESSID (network-profiles)

Quick n' dirty:

ESSID=`echo $ESSID | sed "s/ /\\\\\\ /g"`

Offline

#3 2007-11-08 17:16:43

brainiac
Member
Registered: 2007-11-08
Posts: 25

Re: Escape Space in ESSID (network-profiles)

And where do i put my ESSID?
like that ?

foobar="word1 word2 word3"
ESSID=`echo $foobar | sed "s/ /\\\\\\ /g"`

IWOPTS="mode managed essid $ESSID"

or

ESSID="word1 word2 word3"
ESSID=`echo $ESSID | sed "s/ /\\\\\\ /g"`

IWOPTS="mode managed essid $ESSID"

Last edited by brainiac (2007-11-08 17:46:16)

Offline

#4 2007-11-08 17:33:01

xdeusx
Member
Registered: 2007-10-15
Posts: 168

Re: Escape Space in ESSID (network-profiles)

single quotation marks work fine for me...
like this

ESSID='FRITZ!Box Fon WLAN 7141'

Offline

#5 2007-11-08 17:39:07

brainiac
Member
Registered: 2007-11-08
Posts: 25

Re: Escape Space in ESSID (network-profiles)

xdeusx wrote:

single quotation marks work fine for me...
like this

ESSID='FRITZ!Box Fon WLAN 7141'

i get still

iwconfig: unknown command "word2"

But why is it working for you?
Do you use the network-profiles...would you paste your config?

Last edited by brainiac (2007-11-08 18:05:19)

Offline

#6 2007-11-08 18:07:23

brainiac
Member
Registered: 2007-11-08
Posts: 25

Re: Escape Space in ESSID (network-profiles)

i found a thread with a disussion about the same problem...
http://bbs.archlinux.org/viewtopic.php?id=19440
the workaround which is used at the end seems to be in the recent code.
but i have still the same error

Last edited by brainiac (2007-11-08 18:08:28)

Offline

#7 2007-11-08 19:12:09

brainiac
Member
Registered: 2007-11-08
Posts: 25

Re: Escape Space in ESSID (network-profiles)

should i file an bug report on this ?

Offline

#8 2007-11-08 21:35:53

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

Re: Escape Space in ESSID (network-profiles)

nope, netcfg is going to be replaced by netcfg2... which supports ESSID's with spaces, and is here:
http://bbs.archlinux.org/viewtopic.php? … 94#p296294

James

Offline

Board footer

Powered by FluxBB