# wpa_supplicant + ipw2200 + "no broadcast essid"

## mustard

Hello.

Noob got wireless working with baselayout 1.11.9-r1, ipw2200 & wpa_supplicant. Got mac-filter and wpa-tkip -key on his AP. But noob want more.. :Smile: 

The problem is that when i disable broadcasting of essid, the connection times out. But i got some strange symptoms. I tried first to set ap_scan=2 (following advice in this thread). Then i disabled broadcasting, restarted eth1 (/etc/init.d/net.eth1 restart), and the connection timed out. Ok, i reset ap_scan to 1, and restarted eth1 again, and connected! -Juhuu, this was easy, I thought, but then i rebooted and got the following error on boot-screen

```

failed to connect to wpa_supplicant - wpa_ctrl_open : no such file or directory

(comes 4 times)

*timed out

*ERROR: problem starting needed services

*"netmount" was not started

```

So, it seems I am able to connect to the ap without broadcasting, if only i have been connected before, but not from scratch. Like it remembers some settings..strange? 

wpa_supplicant.conf:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

   ssid="jalla"

   scan_ssid=1

   psk="skrukketroll"

   priority=2

}

```

ls -l /var/run/wpa_supplicant:

srwxrwx---  1 root root 0 Feb 25 18:55 eth1

eth1 is the wireless card, what does s mean? socket?

Thanks for any help on this one..

[/url]

----------

## ablyes

Hello,

Did you find a solution to your problem ? (i mean the connection with wpa encryption and a disabled ssid).

thanks.

merci.

----------

## jay

Same problem here with ipw2200 - if I disable ssid broadcasting on my AP wpa_supplicant cannot associate.

----------

## volkmar

My old thread started recently has been marked duplicate. So I'm going to post here.

Searching the internet I've found that this problem looks like being solved by fix of Bug 16.

In http://comments.gmane.org/gmane.linux.drivers.hostap/10430 Petros Kolyvas mentioned *Quote:*   

> My ssid is hidden and I have to 'iwconfig eth1 essid ShiftFocus' before 
> 
> I attempt to associate with wpa_supplicant if I'm coming from another 
> 
> network or a reboot.

 Maybe I'll give this a try while waiting for a stable release including this fix.

Also read:

http://comments.gmane.org/gmane.linux.drivers.hostap/10364

http://sourceforge.net/mailarchive/message.php?msg_id=11527596

----------

## volkmar

With a very minimalistic wpa_supplicant.conf configuration

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

eapol_version=1

ap_scan=1

fast_reauth=1

network={

      ssid="YOUR_ESSID_NAME"

      scan_ssid=1

      psk=very_secret_very_long_string

}
```

and corresponding configuration of /etc/conf.d/net

```
# /etc/conf.d/net:

# Global config file for net.* rc-scripts

config_eth1=( "dhcp" )

dhcpcd_eth1="-t 20"

iwconfig_eth1="essid YOUR_ESSID_NAME"   # <= Here is the important part

modules_eth1=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dipw"

```

it finally starts to work, even at boot time. Running # wpa_cli status verbose immediately returned me this output:

```
Selected interface 'eth1'

bssid={number removed}

ssid=YOUR_ESSID_NAME

pairwise_cipher=CCMP

group_cipher=CCMP

key_mgmt=WPA2-PSK

wpa_state=COMPLETED

Supplicant PAE state=AUTHENTICATED

suppPortStatus=Authorized

heldPeriod=60

authPeriod=30

startPeriod=30

maxStart=3

portControl=Auto

Supplicant Backend state=IDLE

EAP state=SUCCESS

reqMethod=0

methodState=NONE

decision=COND_SUCC

ClientTimeout=60
```

when before # iwlist eth1 scan returned 

```
 eth1      Scan completed :

          Cell 01 - Address: 00:04:0E:50:CF:7A

                    ESSID:"<hidden>"

                    Protocol:IEEE 802.11bg

                    Mode:Master

                    Channel:11

                    Encryption key:on

                    Bit Rate:54 Mb/s

                    Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 22 24 36 48 54 

                    Signal level=-22 dBm  

                    Extra:rsn_ie=this_was_a_long_long_string

                    Extra: Last beacon: 836ms ago
```

----------

## TL_Amitola

I've been looking for this information for a month now (more or less) and this worked perfectly.

I just wonder if it will break my ability to connect to APs that don't have the specific name we listed in etc/conf.d/net .  But I can just comment out that line if I have any problems... 

But if anyone knows, it might be helpful to post it here.

Thanks for the help!

My specific information:

Laptop: Toshiba M35X-S311

Wireless Driver: ipw2200

AP Configuration:

 - hidden SSID

 - WPA-PSK

 - TKIP

 - Open

Files:

```
#/etc/conf.d/net

config_eth0=( "dhcp" )

config_eth1=( "dhcp" )

hdcpcd_eth1="-t 20"

iwconfig_eth1="essid MYSSID"

modules_eth1=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dipw"
```

```
#/etc/wpa_supplicant.conf

#just the network section

network={

        ssid="MYSSID"

        scan_ssid=1

        psk="#MY#PSK#"

}
```

[edit]

This doesn't interfere with connections to other Access Points.

And, as stated below, if you're using the 2.6.13 kernel -Dipw needs to change to -Dwext

[/edit]

----------

## volkmar

 *volkmar wrote:*   

> and corresponding configuration of /etc/conf.d/net
> 
> ```
> # /etc/conf.d/net:
> 
> ...

 

According to ipw2100+wpa_supplicant+gentoo-sources-2.6.13-r3  for gentoo-sources-2.6.13-r3 the last line needs to be changed into:

```
wpa_supplicant_eth1="-Dwext"
```

----------

## pholthau

this means i got to edit /etc/conf.d/net (nearly) everytime on boot, which is very annoying!

switching between 3 wireless networks at home, university and my flat...

is there still no way to skip this?

----------

## TL_Amitola

You can set up multiple networks in the network section of the wpa_supplicant.conf file.  It will connect to anything, not just WPA access points.  You can set up unencrypted, WEP, WPA... or anything.  I have mine working correctly with a unencrypted Network on campus, and a WPA encrypted at my apartment.  It works fine.

Here's what my network section looks like:

```
network={

  ssid="byuc0ug4rs"

  mode=0

  key_mgmt=NONE

}

network={

  ssid="TheSaint"

  scan_ssid=1

  psk="my5hex6key"

}
```

----------

## pholthau

well, thanks for the tip but i think you didn't get the point.

my wpa_supplicant.conf looks like this:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

        ssid="xxxx"

        scan_ssid=1

        key_mgmt=WPA-PSK

        psk="very_very_secret"

        priority=5

}

network={

        ssid="yyyy"

        scan_ssid=1

        key_mgmt=WPA-PSK

        psk="even_more_secret"

        priority=5

}

network={

        ssid="zzzz"

        key_mgmt=NONE

        wep_key0="not_very_secret"

        wep_tx_keyidx=0

        priority=5

}

network={

        ssid="unibi"

        key_mgmt=NONE

}

```

the problem is: if the essid is _hidden_, wpa supplicant doesn't associate. so i got to manually choose the network via /etc/conf.d/net!

and this is not very comfortable...

----------

## TL_Amitola

Oh, but that's fixed by just including the line like this:

```
iwconfig_eth1="essid MYSSID" 
```

into your /etc/conf.d/net file.  I leave this here all the time, and have no difficulties connecting to any of the networks listed in my wpa_supplicant.conf file.

That's how it works for me anyways, TheSaint is a hidden ssid, but setting that in conf.d/net makes it work correctly.

----------

## guni

I use this for hidden essids:

```

 nano -w /etc/conf.d/wireless

```

```

 essid_eth1=("any")

 preferred_aps=("essid1" "essid2" "..." "essidn")

```

but I'm not sure if it will work with wpa_supplicant.Last edited by guni on Thu Jan 05, 2006 2:18 am; edited 1 time in total

----------

