# FreeBSD Wifi Easy Connect



## dlovasko (Feb 18, 2013)

Hi,

I have some problems while connecting to WiFi from my notebook. When I start, I first create the cloned interface:

[cmd=]ifconfig wlan0 create wlandev bwn0[/cmd]

*A*fter that I set it up:

[cmd=]ifconfig wlan0 up[/cmd]

*A*fter that I scan available access points:

[cmd=]ifconfig wlan0 scan[/cmd]

*A*fter that I choose my SSID/BSSID:

[cmd=]ifconfig wlan0 ssid 'my_network_name'[/cmd]

When I run the dhclient:

[cmd=]dhclient wlan0[/cmd]

I get error

```
wlan0: no link ............. giving up
```

The 'my_network_name' is not secured in any way, status of my bwn0 interface is 'associated', but wlan0 is still 'no carrier'.

Am I missing some step? Or doing something wrong? Please help


----------



## bkouhi (Feb 18, 2013)

Hi dlovasko,

Try this:

`# kldload if_bwn`
`# echo wlans_bwn0=\"wlan0\" >> /etc/rc.conf`
`# echo ifconfig_wlan0=\"DHCP\" >> /etc/rc.conf`
`# service netif restart`


----------



## wblock@ (Feb 18, 2013)

The SSID has to come from somewhere.  Even with no encryption, wpa_supplicant.conf(5) can be used.  But please, please use WPA2.  It's so much easier than changing all your passwords and explaining things to the ISP, the bank, and the police.


----------



## dlovasko (Feb 18, 2013)

*F*irst, thanks for quick answers, but:

@bkouhli, if_bwn is loaded in boot time, I checked with kldstat. Where exactly in your tutorial is the 'set the SSID' part? *A*fter doing the things you suggested, the computer froze and nothing worked, after the *service netif restart* command.

@wblock@ the SSID comes from information listed by *ifconfig wlan0 scan*. And the WiFi access point is not mine, it is just some public free hot spot (like in restaurant or so  If I should use wpa_supplicant - I can add the 'network' section with SSID and no key management, but how can I say to wpa_supplicant which network section to use? Only by setting the priority integer?


----------



## wblock@ (Feb 18, 2013)

I was responding to bkouhi's post, which does not set the SSID.  Yes, you can set an SSID without encryption in /etc/wpa_supplicant.conf.  I have never experimented with selecting from multiple networks other than by editing /etc/wpa_supplicant.conf.

Remember that everything you send over open wifi is visible.


----------

