You are not logged in.

#1 2007-05-15 04:11:35

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Wireless profile ESSID w/ spaces?

I have an ESSID I'd like to use, but my network profile doesn't like it very much.  What can I do to get the config to work properly?  If I do a iwconfig essid Jenna\ and\ Max key xxxx, it works.

# Wireless Settings (optional)
ESSID=Jenna\ and\ Max
KEY=2837043F54CD2487772C0D5F1E
IWOPTS="mode managed essid Jenna and Max key restricted $KEY"
[root@myhost ~]# netcfg mynet
:: Starting network profile: mynet                                       [BUSY] 
iwconfig: unknown command "and\"
                                                                         [FAIL]

Last edited by synthead (2007-05-15 04:11:52)

Offline

#2 2007-05-15 07:46:45

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Wireless profile ESSID w/ spaces?

I hit this problem the other day - warrants some investigation

Offline

#3 2007-05-15 07:47:29

deathadder
Member
From: UK
Registered: 2007-04-18
Posts: 8
Website

Re: Wireless profile ESSID w/ spaces?

How about:

ESSID=s:Jenna and Max
KEY=2837043F54CD2487772C0D5F1E
IWOPTS="mode managed essid $ESSID key restricted $KEY"

I believe s: sets the ESSID as a string, but I'm not 100% sure...or possible just 'Jenna and Max'?

IWOPTS="mode managed essid 'Jenna and Max' key restricted $KEY"

Last edited by deathadder (2007-05-15 07:54:36)


#define QUESTION ((bb) || !(bb))

Offline

#4 2007-05-15 08:03:39

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: Wireless profile ESSID w/ spaces?

Thanks, I'll try that.

By the way, instead of ...

# Wireless Settings (optional)
ESSID=Jenna\ and\ Max
KEY=2837043F54CD2487772C0D5F1E
IWOPTS="mode managed essid Jenna and Max key restricted $KEY"

... I mean to put ...

# Wireless Settings (optional)
ESSID=Jenna\ and\ Max
KEY=2837043F54CD2487772C0D5F1E
IWOPTS="mode managed essid $ESSID key restricted $KEY"

I was just shifting around a bunch of stuff, trying different options ...

Offline

#5 2007-05-15 09:23:02

G_Syme
Member
Registered: 2007-01-04
Posts: 83

Re: Wireless profile ESSID w/ spaces?

dtw wrote:

I hit this problem the other day - warrants some investigation

I've found at least a workaround for the problem. If you make the following changes in /usr/bin/netcfg it should work:

        if [ "$IWOPTS" ]; then
                #### using the eval command around the whole iwconfig command should do the trick ####
                # iwconfig $WIFI_INTERFACE $IWOPTS
                eval "iwconfig $WIFI_INTERFACE $IWOPTS"
                [ $? -ne 0 ] && stat_fail && return
                [ "$WIFI_WAIT" ] && sleep $WIFI_WAIT
        fi

I'm not experienced with shell scripting and I don't know if the eval command might have any side effects, but so far I haven't encountered any problems with this.

Hope it helps!


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

#6 2007-05-15 09:35:18

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: Wireless profile ESSID w/ spaces?

Weird ... that's already in my netcfg.

Offline

#7 2007-05-15 11:08:50

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Wireless profile ESSID w/ spaces?

synthead wrote:

Thanks, I'll try that.

By the way, instead of ...

# Wireless Settings (optional)
ESSID=Jenna\ and\ Max
KEY=2837043F54CD2487772C0D5F1E
IWOPTS="mode managed essid Jenna and Max key restricted $KEY"

... I mean to put ...

# Wireless Settings (optional)
ESSID=Jenna\ and\ Max
KEY=2837043F54CD2487772C0D5F1E
IWOPTS="mode managed essid $ESSID key restricted $KEY"

I was just shifting around a bunch of stuff, trying different options ...

Why not just try

ESSID="Jenna and Max"

I doublequote my ESSID (although I'm not using spaces or anything like that). Worth a try though.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2007-05-15 12:05:09

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: Wireless profile ESSID w/ spaces?

Thanks for your help.  I still get errors though ...

[root@myhost ~]# netcfg mynet
:: Starting network profile: mynet                                       [BUSY] 
iwconfig: unknown command "and"
                                                                         [FAIL]

Last edited by synthead (2007-05-15 12:05:31)

Offline

#9 2007-05-15 12:19:58

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Wireless profile ESSID w/ spaces?

Try single quotes, although I don't give it that big a chance... You might be better off using underscores.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#10 2007-05-15 12:46:00

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

Re: Wireless profile ESSID w/ spaces?

could someone give the latest netscripts a shot? I'd like to know if this is fixed there.

http://wiki.archlinux.org/index.php/Network_Scripts

excuse the weak documentation, im writing it now. there's some examples included, be sure to look at the .ini based ones, not the bash styled ones. There's also examples on that wiki page.

James

Offline

#11 2007-05-15 19:10:49

G_Syme
Member
Registered: 2007-01-04
Posts: 83

Re: Wireless profile ESSID w/ spaces?

synthead wrote:

Weird ... that's already in my netcfg.

Really? Are you using Arch64 or standard Arch for i686?
I'm using Arch64, have initscripts-0.8-12 installed (which contains /usr/bin/netcfg), and the eval command is not used in the default /usr/bin/netcfg.
But maybe my explanation was misleading, so I'll try again (commands sometimes say more than words smile ):

# sed "s/iwconfig \$WIFI_INTERFACE \$IWOPTS/eval \"iwconfig \$WIFI_INTERFACE \$IWOPTS\"/" -i /usr/bin/netcfg

So after changing this one line in /usr/bin/netcfg, I can use both ESSID="ESSID\ with\ spaces" and ESSID="\"ESSID with spaces\"" successfully.


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

#12 2007-05-15 21:31:11

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: Wireless profile ESSID w/ spaces?

Ahhhh ... I'll look into that some more when I get off'a work, thank you!

Offline

#13 2007-05-16 03:37:06

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: Wireless profile ESSID w/ spaces?

I just botched it together.  I threw this in the end of my config and called it good ...

 iwconfig eth1 essid Jenna\ and\ Max key 2837043F54CD2487772C0D5F1E

Offline

Board footer

Powered by FluxBB