# wireless connection problem



## revanthedarth (Jan 25, 2010)

I'm not sure if this is the right place to ask, but what the hell.

I've been trying to connect my laptop to my wireless network. I've searched the net, found something useful but not useful enough, and freebsd handbook seems outdated. That's the most useful page:
http://www.freebsd.org/doc/handbook/network-wireless.html

Anyway, i'll try to explain what i did step by step

1- Added if_ath_load="YES" to /boot/loader.conf. My laptop uses that driver.
2- Created a clone-device:
`ifconfig wlan0 create wlandev ath0`
3- Activated it:
`ifconfig wlan0 up`
4- Scanned for the networks:
`ifconfig wlan0 list scan`
5- Found mine. Then i fixed the /etc/rc.conf file like that:

```
ifconfig_ath0="bssid xx:xx:xx:xx:xx:xx netmask 255.255.255.255 authmode shared wepmode on weptxkey 1 wepkey 1:myweppassw DHCP"
```
 (That xx:xx part is the BSSID i noted when scanning, i guess that's mac address )
I'm using WEP to encrypt data.
6- I type
`/etc/rc.d/netif start`
That's the output:

```
ifconfig: SIOCS80211: Invalid argument
Starting Network Io0 ath0.
Io0: flags=8049<UP,LOOPBACK, RUNNING, MULTICAST> metric 0 mtu 16384
   options=3<RXCSUM, TXCSUM>
   ...(Some more Io0 information, i can post if necessary)
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290 ether xx:xx:xx:xx:xx:xx
     media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
     status: associated
```

Then, ifconfig wlan0 brings me status:no carrier although ifconfig ath0 gives me status:associated. But i can't ping any computers on that network or even the modem.

What do you suggest?


----------



## indiocolifa (Jan 26, 2010)

Look I didn't follow the handbook as didn't worked for me. My driver is wpi (using R8.0-p2, i386):

My loader.conf:


```
if_wpi_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_tkip_load="YES"
wlan_ccmp_load="YES"
```

My /etc/rc.conf:


```
wlans_wpi0="wlan0"
ifconfig_wlan0="ssid ITCHIES DHCP WPA"
```

I'm using WPA authentication, but look if the wlans_<iface> line can help you. I got WLAN carrier with that rc.conf.


----------



## revanthedarth (Jan 26, 2010)

I fixed those but it still doesn't work.
/boot/loader.conf

```
if_ath_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
```
/etc/rc.conf

```
wlans_ath0="wlan0"
ifconfig_ath0="ssid aztech netmask 255.255.255.0 authmode shared wepmode on weptxkey 1 wepkey 1:aabbccddee DHCP"
```
[CMD=""]ifconfig[/CMD] gives me

```
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290 ether xx:xx:xx:xx:xx:xx
     media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
     status: associated
*some stuff about fwe0, fwip0, lo0*
wlan0: flags=8802<BROADCAST, SIMPLEX, MULTICAST> metric 0 mtu 1500 ether (same mac address as ath0)
     media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
     status: no carrier
     ssid "" channel 1 (2412 Mhz 11b)
     regdomain 96 indoor ecm authmode OPEN privacy OFF txpower 20 bmiss 7 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 1 wme burst bintval 0
```

I think i'm going to try WPA too.


----------



## bschmidt (Jan 26, 2010)

revanthedarth said:
			
		

> ```
> wlans_ath0="wlan0"
> ifconfig_ath0="ssid aztech netmask 255.255.255.0 authmode shared wepmode on weptxkey 1 wepkey 1:aabbccddee DHCP"
> ```



Try replacing ifconfig_ath0 with ifconfig_wlan0.


----------



## oomka (Jan 26, 2010)

maybe my case will help you to solve this.
i'm running 8.0-RELEASE and i have built-in wireless card based on Atheros chipset and my router acts as DHCP server, so i made it this way:

create interface wlan0:

[CMD=laptop#]ifconfig wlan0 create wlandev ath0[/CMD]

and add following lines to my /etc/rc.conf

```
wlans_ath0="wlan0"
ifconfig_wlan0="DHCP WPA"
```
i didn't add any wireless stuff to /boot/loader.conf

next, created file /etc/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
   ssid="HomeNet"
   scan_ssid=1
   proto=RSN
   key_mgmt=WPA-PSK
   pairwise=CCMP
   group=CCMP
   psk="mypassword"
```
reading wpa_supplicant.conf manual helps a lot.

finally starting wireless connection:

[CMD=laptop#]wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf[/CMD]
option -B makes the process daemonize, -c points to config file

checking whether it's up:

```
laptop% ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
   ether 00:22:5f:b4:cf:a5
   inet 192.168.0.6 netmask 0xffffff00 broadcast 192.168.0.255
   media: IEEE 802.11 Wireless Ethernet OFDM/48Mbps mode 11g
   [B]status: associated[/B]
   ssid HomeNet channel 6 (2437 Mhz 11g) bssid 00:24:01:b1:ff:c4
   regdomain 96 indoor ecm authmode WPA2/802.11i privacy ON
   deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 20 bmiss 7
   scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
   roam:rate 5 protmode CTS wme burst roaming MANUAL
```

yep, we're up.
check it out, maybe it will be useful to you.


----------



## revanthedarth (Jan 26, 2010)

Thank you all, you just saved a FreeBSD n00b  I was about to install ubuntu server edition


----------



## x1101 (Feb 1, 2010)

I would like to echo raventhedarth's statements. I had been searching for literally hours trying to figure out how to get my wireless working on my netbook, now it does. Thanks


----------



## AU_aak0010 (Nov 1, 2016)

oomka said:


> media: IEEE 802.11 Wireless Ethernet OFDM/48Mbps mode 11g


Hi oomka, Can you please tell me how to set the wireless Ethernet to OFDM/24Mbps? My device shows it as autoselect. 

Also, I am unable to set the wireless card mode to 11g. I ran the `ifconfig wlan0 mode 11g` and it executes successfully. But when I check the `ifconfig wlan0` , the mode goes back to 11ng. I am trying to setup an ad-hoc network with FreeBSD version 10.1.


----------



## scottro (Nov 1, 2016)

Hi, you may have missed the fact that that last post was from 2010.    The best bet in my humble opinion, would be to open a new thread with the model of your wireless card and problem description in the title, like unable to set 11g mode on <card_model>


----------

