# [SOLVED] Problem configuring wireless (essid contains "@")

## TheButcher

Hi Guys,

I've got a big problem here. Wireless connections on my notebook are working, but i have problems configuring a wireless network which contains an "@" sign in the essid. Changing the essid is no option here, as the router for the internet connection is property of the ISP and there is no way to change the configuration of the router.

So here is the exact problem:

 *Quote:*   

> preferred_aps=( "foo@bar" )
> 
> key_foo@bar="s:mywepkey enc open"

 

when i do an /etc/init.d/eth1 start i get the following:

 *Quote:*   

> * Starting eth1
> 
> *   Loading networking modules for eth1
> 
> /etc/conf.d/wireless: line 9: key_foo@bar=s:mywepkey enc open: command not found
> ...

 

Subsequently no wireless connection is established, because no wep encryption key is known.   :Crying or Very sad: 

I also tried

 *Quote:*   

> key_foo\@bar="s:mywepkey enc open"
> 
> key_foo\100bar="s:mywepkey enc open"
> 
> 'key_foo@bar'="s:mywepkey enc open"
> ...

 

I also searched the net for bash character escaping, etc. No success   :Crying or Very sad: 

Any hints?

Thanks!Last edited by TheButcher on Mon Aug 21, 2006 9:31 am; edited 1 time in total

----------

## Lord Angelbane

try using the _ (underscore character) in place of the @.

----------

## TheButcher

You are my hero! It's working   :Wink: 

----------

## truc

does this means foo@bar SSID is the same as foo_bar one?

----------

## TheButcher

erm... don't know, but the following is working:

 *Quote:*   

> preferred_aps=( "foo@bar" )
> 
> key_foo_bar="s:mywepkey enc open"

 

----------

## UberLord

 *truc wrote:*   

> does this means foo@bar SSID is the same as foo_bar one?

 

Not quite. The ssid's ARE different, but when we reference them in variables we have to work within the confines of BASH. This means that any non valid character is replaced with 

----------

## truc

ok, thanks, now the question you don't want (cause such a thing should not happen! ):

what if there were 2 SSIDs: foo@bar and foo&bar (dunno actually if '&' is really a non-valid character..)

what key_foo_bar="s:mywepkey enc open" will do? 

I know I should not think about this...but...  :Rolling Eyes: 

----------

## UberLord

 *truc wrote:*   

> ok, thanks, now the question you don't want (cause such a thing should not happen! ):
> 
> what if there were 2 SSIDs: foo@bar and foo&bar (dunno actually if '&' is really a non-valid character..)
> 
> what key_foo_bar="s:mywepkey enc open" will do? 
> ...

 

It's a good question.

Fortunately, we get the MAC address of the AP in scans too and we use

mac_key_001122334455="s:mywepkey" if it's defined, otherwise key_ESSID instead.

----------

## truc

thanks UberLord, now I feel better   :Laughing: 

----------

