You are not logged in.

#1 2006-03-07 17:12:02

Joffer
Member
Registered: 2006-01-12
Posts: 69

[Solved] How can I use spaces in ESSID in wireless profiles

I need to use spaces in the ESSID variable in one of my network profiles. The ESSID is "Telenor Mobil WLAN", which is a public wireless IP zone (which you have to pay for though). If I add ESSID="Telenor Mobil WLAN" it just complaines about "Mobil" not being a valid command...

How can I escape the spaces in this ESSID?

Offline

#2 2006-03-07 18:21:35

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: [Solved] How can I use spaces in ESSID in wireless profiles

Nested quotes should work:

ESSID=" 'My E S S I D' "

Offline

#3 2006-03-08 15:43:00

Joffer
Member
Registered: 2006-01-12
Posts: 69

Re: [Solved] How can I use spaces in ESSID in wireless profiles

phrakture wrote:

Nested quotes should work:

ESSID=" 'My E S S I D' "

Will try that smile

Offline

#4 2006-03-13 03:19:45

bostoniman
Member
Registered: 2004-09-17
Posts: 213
Website

Re: [Solved] How can I use spaces in ESSID in wireless profiles

You can also use backslashes:

ESSID="My E S S I D"

Not quite as nice looking, but just as effective.

Offline

#5 2006-04-20 07:58:39

wiremore
Member
Registered: 2005-08-23
Posts: 43

Re: [Solved] How can I use spaces in ESSID in wireless profiles

I realize that this is an old thread, but I'm having a similar problem. Not only does the essid have a space in it, it also has a quote!

I get

iwcfg="eth1 essid 'Girls' Room' key AB:CD:EF:AB:CD:EF:AB:CD:EF:AB:CD:EF:AB channel 11" && sudo iwconfig $iwcfg
Error : unrecognised wireless request "Room'"

I also tried "Girls' Room" and Girls' Room but I get the same error.

I am trying to do this from /etc/conf.d/wireless like

wlan_eth1="eth1 essid "Girls' Room" key AB:CD:EF:AB:CD:EF:AB:CD:EF:AB:CD:EF:AB channel 11"

I did try /etc/rc.d/netword restart and all that, it works the same as the shortcut above.

Help from someone who understands bash better than myself? Thanks

UPDATE:

Seemingly the only way i can get this to work is to replace

/usr/sbin/iwconfig $iwcfg

with

sh -c "/usr/sbin/iwconfig $iwcfg"

in /etc/rc.d/network

the problem seems to be that, when a variable is referenced, if it contains multuple words, they are broken up each individually as different arguments when passed to iwconfig. in order to get the quotes to work, it is necessary to get bash to reread the line and not ignore the quotes. i'm sure there is a way to get around this.

Offline

#6 2011-02-21 05:01:17

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: [Solved] How can I use spaces in ESSID in wireless profiles

Bump. After almost five years I am having the same problem as wiremore. No amount of shell quoting \ escaping seems to fix it. My only choice is to edit the rc.d script too.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#7 2011-02-26 00:42:30

unilx
Member
From: Fredericton,Canada
Registered: 2009-10-01
Posts: 183

Re: [Solved] How can I use spaces in ESSID in wireless profiles

Use "ifconfig -a" or "iwconfig" command to find your wireless interface.Mine is "wlan0" your card might be different

iwconfig wlan0 essid "Girls' Room" key ABCDEFABCDEFABCDEFABCDEFAB

change "wlan0" to what ever your card is.You should also take a look at https://wiki.archlinux.org/index.php/Wireless_Setup
or https://wiki.archlinux.org/index.php/Wi … management

Last edited by unilx (2011-02-26 00:56:32)

Offline

Board footer

Powered by FluxBB