wifi not working after following docs

I know I keep saying that for one reason or another (two computers crashed, one wasn't compatible) but I can't stay away. I've never had to configure wifi in FreeBSD and the docs are pretty straight forward but I'm missing something.

Code:
sysctl net.wlan.devices
net.wlan.devices: iwn0

wpa_supplicant_conf
Code:
network={
        ssid="xxxxxx"
        psk="xxxxx"
}

/etc.rc.conf
Code:
ifconfig_wlan0="WPA SYNCDHCP"
create_args_wlan0="country US"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dbus_enable="YES"
hald_enable="YES"
kdm4_enable="YES"
wlans_iwn0="wlan0"

ifconfig
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
    ether 3c:97:0e:15:44:39
    hwaddr 3c:97:0e:15:44:39
    inet 192.168.0.20 netmask 0xffffff00 broadcast 192.168.0.255
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
    inet 127.0.0.1 netmask 0xff000000
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    groups: lo
wlan0: flags=8c03<UP,BROADCAST,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 8c:70:5a:f2:f4:8c
    hwaddr 8c:70:5a:f2:f4:8c
    inet 198.105.254.228 netmask 0xffffff00 broadcast 198.105.254.228
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
    status: no carrier
    ssid "" channel 1 (2412 MHz 11b)
    regdomain FCC country US authmode OPEN privacy OFF txpower 30
    bmiss 10 scanvalid 60 wme bintval 0
    groups: wlan

The last time I ran
Code:
service netif restart
I lost my wired connection.

Thanks in advance
 
bsmith , what's your hardware?
My Intel Centrino Ultimate-N 6300 driver (the sameiwn as yours) causes system crash almost every time I do service netif restart.
I'm not sure what's wrong. So in case I need to do so, I kill wpa_supplicant process and re-run it manually:
Code:
# wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D bsd -P /var/run/wpa_supplicant/wlan0.pid
 
I installed networkmgr but it doesn't show up in my menu.

Hardware
Code:
hostb0@pci0:0:0:0:    class=0x060000 card=0x21da17aa chip=0x01048086 rev=0x09 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '2nd Generation Core Processor Family DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:0:2:0:    class=0x030000 card=0x21da17aa chip=0x01268086 rev=0x09 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '2nd Generation Core Processor Family Integrated Graphics Controller'
    class      = display
    subclass   = VGA
none0@pci0:0:22:0:    class=0x078000 card=0x21da17aa chip=0x1c3a8086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family MEI Controller'
    class      = simple comms
uart2@pci0:0:22:3:    class=0x070002 card=0x21da17aa chip=0x1c3d8086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family KT Controller'
    class      = simple comms
    subclass   = UART
em0@pci0:0:25:0:    class=0x020000 card=0x21ce17aa chip=0x15028086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82579LM Gigabit Network Connection (Lewisville)'
    class      = network
    subclass   = ethernet
ehci0@pci0:0:26:0:    class=0x0c0320 card=0x21da17aa chip=0x1c2d8086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
hdac0@pci0:0:27:0:    class=0x040300 card=0x21da17aa chip=0x1c208086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
pcib1@pci0:0:28:0:    class=0x060400 card=0x21da17aa chip=0x1c108086 rev=0xb4 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family PCI Express Root Port 1'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:28:1:    class=0x060400 card=0x21da17aa chip=0x1c128086 rev=0xb4 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family PCI Express Root Port 2'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:28:3:    class=0x060400 card=0x21da17aa chip=0x1c168086 rev=0xb4 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family PCI Express Root Port 4'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:28:4:    class=0x060400 card=0x21da17aa chip=0x1c188086 rev=0xb4 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family PCI Express Root Port 5'
    class      = bridge
    subclass   = PCI-PCI
ehci1@pci0:0:29:0:    class=0x0c0320 card=0x21da17aa chip=0x1c268086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
isab0@pci0:0:31:0:    class=0x060100 card=0x21da17aa chip=0x1c4f8086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'QM67 Express Chipset Family LPC Controller'
    class      = bridge
    subclass   = PCI-ISA
ahci0@pci0:0:31:2:    class=0x010601 card=0x21da17aa chip=0x1c038086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller'
    class      = mass storage
    subclass   = SATA
none1@pci0:0:31:3:    class=0x0c0500 card=0x21da17aa chip=0x1c228086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family SMBus Controller'
    class      = serial bus
    subclass   = SMBus
iwn0@pci0:3:0:0:    class=0x028000 card=0x13118086 chip=0x00858086 rev=0x34 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Centrino Advanced-N 6205 [Taylor Peak]'
    class      = network
sdhci_pci0@pci0:13:0:0:    class=0x088001 card=0x21da17aa chip=0xe8231180 rev=0x04 hdr=0x00
    vendor     = 'Ricoh Co Ltd'
    device     = 'PCIe SDXC/MMC Host Controller'
    class      = base peripheral
 
Last edited by a moderator:
I installed networkmgr
The network manager does nothing much, eventually it uses the same commands that you and I use.
Your wlan0 interface was able to get an IP address, but in your ifconfig output there is no
Code:
status: associated
ssid <YOUR_SSID> channel 1 (2412 MHz 11g ht/20) bssid 50:46:5d:XX:YY:ZZ
lines, which means that it's not associated anymore.
That's why if you run wpa_supplicant manually you may see its messages and understand what's going on.
 
I tried running wpa_supplicant but it wants options and I tried a number of them but they didn't help. I've configured wifi in several linux distros but never in FreeBSD. I'm rather lost at this point.
 
I have a intel wifi too:
Code:
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34)
which work OK with iwn driver and networkmgr. All I had to do is to add :
Code:
permit :wheel
permit nopass keepenv :wheel cmd netcardmgr
permit nopass keepenv :wheel cmd detect-nics
permit nopass keepenv :wheel cmd detect-wifi
permit nopass keepenv :wheel cmd ifconfig
permit nopass keepenv :wheel cmd service
permit nopass keepenv :wheel cmd wpa_supplicant
permit nopass keepenv root

in : /usr/local/etc/doas.conf

also in rc.conf I've have:

Code:
# Wireless network 
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
create_args_wlan0="country RO regdomain NONE"

I know you can use ifconfig but sometimes it's just easy to use a gui app to speed up things.
 
Thanks for the info but I wan't to configure it manually before I try gui. I think I'll learn more that way. But if I can't I'll try it your way.
 
I tried running wpa_supplicant but it wants options and I tried a number of them but they didn't help.
Did you try the command line I showed? (Of course, with the real path to the .conf file)
If don't report your output here, how can we help?...
 
That's because I didn't get any output. I checked the path. I killed wpa_supplicant and nothing. I appreciate the help but like I said I'm lost and I really want to get this working.
 
bsmith , did you pay attention to the IP address assigned to your wlan0?
198.105.254.228 is a real static IP address reported to belong to an organization in Boulder, CO.
How it could be assigned by a DHCP?..
 
No idea since I configured everything to dhcp. Bigger problem. I rebooted and now I have no internet.
 
I got it working again with a little googling.

/etc/rc.conf

Code:
 GNU nano 2.8.7                  File: /etc/rc.conf                            

hostname="localhost"
ifconfig_wlan0="WPA SYNCDHCP"
create_args_wlan0="country US"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dbus_enable="YES"
hald_enable="YES"
kdm4_enable="YES"
wlans_iwn0="wlan0"
ifconfig_em0="DHCP"
 
I meant my wired connection. Sorry for not being clear.

Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
    ether 3c:97:0e:15:44:39
    hwaddr 3c:97:0e:15:44:39
    inet 192.168.0.20 netmask 0xffffff00 broadcast 192.168.0.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    groups: lo 
wlan0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 8c:70:5a:f2:f4:8c
    hwaddr 8c:70:5a:f2:f4:8c
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
    status: no carrier
    ssid "" channel 1 (2412 MHz 11b)
    regdomain FCC country US authmode WPA1+WPA2/802.11i privacy MIXED
    deftxkey UNDEF txpower 30 bmiss 10 scanvalid 60 wme roaming MANUAL
    bintval 0
    groups:wlan

Code:
nano /etc/wpa_supplicant.conf

Code:
ifconfig wlan0 list scan
nothing
 
I'd suggest a couple of things to try. Before scanning try # ifconfig wlan0 up.
Also, your wifi card may need firmware. There exist several modules:
Code:
$ find /boot/kernel/ -name "iwn6*fw*"
/boot/kernel/iwn6000g2bfw.ko
/boot/kernel/iwn6050fw.ko
/boot/kernel/iwn6000g2afw.ko
/boot/kernel/iwn6000fw.ko
You could try adding all of them to your /boot/loader.conf
Code:
iwn6000g2bfw_load="YES"
iwn6050fw_load="YES"
iwn6000g2afw_load="YES"
iwn6000fw_load="YES"
and reboot your computer.
 
I didn't work but I really appreciate the help. It's a minor problem since my modem/router is right next to me. I really appreciate your patience and effort.
 
Look through wpa_supplicant.conf(5).
Here's what my /etc/wpa_supplicant.conf looks like...
Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1   # toggle this setting between 1 and 2
ap_scan=1    # needed for wireless according to manpage

network={
ssid="[xxxx]"
scan_ssid=   # 1 or 0 depending on whether access point is not broadcasting its presence
psk="[xxxxx]"
priority=   #

# the 4 below depend on whether you're using WPA2, WPA... etc...; Below is for WPA2
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP

bssid=    # optional, accesspoint's mac address, this makes connecting quicker, and better.
}
rc.conf(5)
In /etc/rc.conf for the network section, I have:
Code:
local_unbound_enable="YES"
hostname="[xxxx]"
default_router="192.168.1.254"
wlans_[devicename]="wlan0"
ifconfig_wlan0="WPA DHCP ssid [xxxx] bssid [xxxx]"  # more specific options can be entered here.
 
I guess, if scanning doesn't work, there problem in driver/firmware.
Also, bsmith , is your radio turned on? It's happened to me once when I accidentally pressed the corresponding button and then spent much time trying to figure out what's happened to my wifi.
 
It didn't work but I have an idea. What if it's my wifi card? should I buy a usb one and if so which one?
 
I know this might look silly, but since aragats suggested it, and no answer was provided though, I'll say it again: why not trying to perform connection manually, in order to look for any precious output able to reveal where the problem actually is?
I mean everything,
- from loading the firmware
Code:
kldunload if_iwn6000fw && kldload if_iwn6000fw
(Presumably the correct one but check with kldstat)
Along with the driver
Code:
kldunload if_iwn && kldload if_iwn
.
Likely after having loaded WPA supports in boot/loader.conf:
Code:
wlan_tkip_load="YES"
- To associating the wlan0 interface with iwn
Code:
ifconfig wlan0 create wlandev iwn0
- To looking out for available connections
Code:
ifconfig wlan0 up scan
As
bsmith said:
ifconfig list scan....nothing
only lists already known networks, while as aragats again pointed out, and as stated on handbook
The interface must be up before it can scan. Subsequent scan requests do not require the interface to be marked as up again.
- To manual connection
Code:
wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D iwn
dhclient wlan0
And let's see what happens :)
 
I think I did everything correctly but I'm getting this
Code:
 ifconfig wlan0 create wlandev iwn0
ifconfig: create: bad value
 
Back
Top