# FreeBSD 8.0 + wlan



## alez (Jan 4, 2010)

FreeBSD 8. Intel PRO/2100 wifi card (ipw_firmware-1.3_4 driver).


```
[B]uname -a[/B]
FreeBSD freebsd. 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009     [email]root@almeida.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  i386

[B]dmesg[/B]
...
ipw0: <Intel(R) PRO/Wireless 2100 MiniPCI> mem 0xe0200000-0xe0200fff irq 5 at device 7.0 on pci2
ipw0: [ITHREAD]
...

[B]rc.conf[/B]
...
wlans_ipw0="wlan0"
ifconfig_wlan0="ssid RADIOSPOT DHCP"

ifconfig wlan0 list scan
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
RADIOSPOT       00:02:cf:6b:60:74    6   54M -95:-95  100 E   
DSL-2640U       00:21:91:54:e0:03   11   54M -95:-95  100 EP   WPA WME
TP-LINK         00:1d:0f:ce:42:90    6   11M -95:-95  100 ES   ATH

[B]ifconfig -a[/B]
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
  options=8<VLAN_MTU>
  ether 02:00:f0:01:16:9d
  ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
  lladdr 0.0.f0.41.0.1.16.9d.a.2.ff.fe.0.0.0.0
ipw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
  ether 00:04:23:93:c2:f1
  media: IEEE 802.11 Wireless Ethernet autoselect mode 11b
  [color="Red"]status: associated[/color]
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
  options=2009<RXCSUM,VLAN_MTU,WOL_MAGIC>
  ether 00:00:f0:88:16:9c
  inet 192.168.0.100 netmask 0xffffff00 broadcast 192.168.0.255
  media: Ethernet autoselect (100baseTX <full-duplex>)
  status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
  options=3<RXCSUM,TXCSUM>
  inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 
  inet6 ::1 prefixlen 128 
  inet 127.0.0.1 netmask 0xff000000 
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
  ether 00:04:23:93:c2:f1
  media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
  [color="Red"]status: no carrier[/color]
  ssid RADIOSPOT channel 1 (2412 Mhz 11b)
  country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
  bintval 0

[B]ifconfig wlan0[/B]
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
  ether 00:04:23:93:c2:f1
  media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
  status: no carrier
  ssid RADIOSPOT channel 6 (2437 Mhz 11b)
  country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
  bintval 0

!!! channel cyclically switched to 1, 6, 11.
```

WHY ipw0 status *associated*, but wlan0 status *no carrier*


----------



## Alt (Jan 4, 2010)

I had same when i had bad ssid/key in config


----------



## alez (Jan 4, 2010)

This point without key. In 7.1 I use wpa_supplicant, but not sure that it was needed. I try to use wpa_supplicant in 8.0 -- no result


----------



## Alt (Jan 4, 2010)

Try to run wpa_supplicant with -d or -dd option


----------



## alez (Jan 4, 2010)

my *wpa_supplicant.conf*

```
network={
        ssid="RADIOSPOT"
        #psk="topsecret"
        psk=52d5c578774749965deb4eb13607bbfc3b8ab0bde9dc309627fd8032592cc756
}
```

I use this config from 7.1, in older version everything worked correctly

wpa_supplicant with -dd

```
freebsd# wpa_supplicant -i wlan0 -dd -c /etc/wpa_supplicant.conf 
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'                                           
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'   
Reading configuration file '/etc/wpa_supplicant.conf'                         
ctrl_interface='/var/run/wpa_supplicant'                                      
ctrl_interface_group='wheel'                                                  
Line: 32 - start of a new network block                                       
ssid - hexdump_ascii(len=9):                                                  
     52 41 44 49 4f 53 50 4f 54                        RADIOSPOT              
PSK - hexdump(len=32): [REMOVED]                                              
Priority group 0                                                              
   id=0 ssid='RADIOSPOT'                                                      
Initializing interface (2) 'wlan0'                                            
Own MAC address: 00:04:23:93:c2:f1                                            
wpa_driver_bsd_set_wpa: enabled=1                                             
wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1                              
wpa_driver_bsd_del_key: keyidx=0                                              
wpa_driver_bsd_del_key: keyidx=1                                              
wpa_driver_bsd_del_key: keyidx=2                                              
wpa_driver_bsd_del_key: keyidx=3                                              
wpa_driver_bsd_set_countermeasures: enabled=0                                 
wpa_driver_bsd_set_drop_unencrypted: enabled=1                                
RSN: flushing PMKID list in the driver                                        
Setting scan request: 0 sec 100000 usec                                       
EAPOL: SUPP_PAE entering state DISCONNECTED                                   
EAPOL: KEY_RX entering state NO_KEY_RECEIVE                                   
EAPOL: SUPP_BE entering state INITIALIZE                                      
EAP: EAP entering state DISABLED                                              
ctrl_interface_group=0 (from group name 'wheel')                              
Added interface wlan0                                                         
State: DISCONNECTED -> SCANNING                                               
Starting AP scan (broadcast SSID)                                             
Trying to get current scan results first without requesting a new scan to speed up initial association                                                      
Received 0 bytes of scan results (0 BSSes)                                    
Scan results: 0                                                               
Cached scan results are empty - not posting                                   
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
EAPOL: disable timer tick
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 5 sec 0 usec
^CCTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan0
State: SCANNING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_bsd_set_wpa: enabled=0
wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
Failed to disable WPA in the driver.
wpa_driver_bsd_set_drop_unencrypted: enabled=0
wpa_driver_bsd_set_countermeasures: enabled=0
No keys have been configured - skip key clearing
Cancelling scan request
Cancelling authentication timeout
wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
ELOOP: remaining socket: sock=4 eloop_data=0x28406140 user_data=0x2840e040 handler=0x8069f40
```

what is Failed to disable WPA in the driver.

after use wpa_supplicant

```
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
  ether 00:04:23:93:c2:f1
  media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
  status: no carrier
  ssid "" channel 1 (2412 Mhz 11b)
  country US authmode WPA1+WPA2/802.11i privacy OFF txpower 0 bmiss 7
  scanvalid 60
```

WiFi point without WPA.


----------



## Alt (Jan 4, 2010)

I better ask what is

```
wpa_driver_bsd_set_drop_unencrypted: enabled=1
```
I dont tried to connect unencrypted ap, but i think this parameter forbid it..


----------



## alez (Jan 5, 2010)

I trying to correct wpa_supplicant.conf and at last wlan0 interface associated, but dhclient on wlan0 doesn't have packets. In dmesg out i find something wrong:

*ipw0: need multicast update callback*

what is it?

my /boot/loader.conf

```
...
legal.intel_ipw.license_ack=1
if_ipw_load="YES"
ipwfw_load="YES"
ipw_bss_load="YES"
ipw_ibss_load="YES"
ipw_monitor_load="YES"
...
```


----------



## Alt (Jan 5, 2010)

What if you try wpa_supplicant.conf like this

```
ap_scan=1

network={
     ssid="RADIOSPOT"
     key_mgmt=NONE
     auth_alg=OPEN
}
```


----------



## alez (Jan 6, 2010)

yes, with this wpa_supplicant.conf wlan0 interface associated with AP , but i have in dmesg message *ipw0: need multicast update callback*. My ipw0 interface dont send multicast message. I will create a new topic.


----------

