Solved FreeBSD 11.2 disconnects from wifi after about 10 mins

Hi everybody!
I have this weird situation; The internet connection breaks ten minutes after being connected to the wifi, and this happens after every time I reboot.
Now, I bet you're going to suggest it's a problem with the router, but that's not very likely. That's because I tried connecting to a different router and the same thing happens. One more thing, all the other devices seem to be working correctly(without disruptions). I have the 11.2 version of FreeBSD installed. Also, there's no problem with the connection ending, when the computer's connected through cable. I've searched at papa google's and couldn't find anything useful; Most web pages were describing the problem's occurrence on windows. Any possible fix? (Also, tell me to post some log or something, should it be useful), thanks in advance.
 
Which driver are you using? And how's your wpa_supplicant.conf configured? Any messages in /var/log/messages?

The problem sounds like a rekey issue.
 
Which driver are you using? And how's your wpa_supplicant.conf configured? Any messages in /var/log/messages?

The problem sounds like a rekey issue.
Here's the supplicant file:
Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
ssid="NETIASPOT-6DCCC0"
scan_ssid=0
psk="<mysecretpassword>"
priority=1
}
network={
    priority=0
    key_mgmt=NONE
}

And below you have the /var/log/messages:(The shortened version :D)

Code:
Jul 12 15:00:00 unixdistro newsyslog[4515]: logfile turned over due to size>100K
Jul 12 15:00:00 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:00:00 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:00:01 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:00:01 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:00:02 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:00:02 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:00:03 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:00:03 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:00:04 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:00:04 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:00:05 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation 
Jul 12 15:02:56 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:02:57 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:02:57 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:02:57 unixdistro shutdown: power-down by chris:
Jul 12 15:02:58 unixdistro devd: notify_clients: send() failed; dropping unresponsive client
Jul 12 15:02:58 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:02:58 unixdistro kernel: Jul 12 15:02:58 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:02:58 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:02:59 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:02:59 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:02:59 unixdistro ntpd[791]: ntpd exiting on signal 15 (Terminated)
Jul 12 15:02:59 unixdistro kernel: .
Jul 12 15:03:00 unixdistro wpa_supplicant[3483]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 15:03:00 unixdistro wpa_supplicant[3483]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 15:03:00 unixdistro kernel: , 718.
Jul 12 15:03:00 unixdistro syslogd: exiting on signal 15
Jul 12 16:14:40 unixdistro syslogd: kernel boot file is /boot/kernel/kernel
Jul 12 16:14:40 unixdistro kernel: Copyright (c) 1992-2018 The FreeBSD Project.
Jul 12 16:14:40 unixdistro kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
Jul 12 16:14:40 unixdistro kernel: The Regents of the University of California. All rights reserved.
Jul 12 16:14:40 unixdistro kernel: FreeBSD is a registered trademark of The FreeBSD Foundation.
Jul 12 16:14:40 unixdistro kernel: FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018
Jul 12 16:14:40 unixdistro kernel: root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Jul 12 16:14:40 unixdistro kernel: FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
Jul 12 16:14:40 unixdistro kernel: VT(vga): resolution 640x480
Jul 12 16:14:40 unixdistro kernel: CPU: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (2491.96-MHz K8-class CPU)
Jul 12 16:14:40 unixdistro kernel: Origin="GenuineIntel"  Id=0x206a7  Family=0x6  Model=0x2a  Stepping=7
Jul 12 16:14:40 unixdistro kernel: Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Jul 12 16:14:40 unixdistro kernel: Features2=0x1fbae3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX>
Jul 12 16:14:40 unixdistro kernel: AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
Jul 12 16:14:40 unixdistro kernel: AMD Features2=0x1<LAHF>
Jul 12 16:14:40 unixdistro kernel: XSAVE Features=0x1<XSAVEOPT>
Jul 12 16:14:40 unixdistro kernel: VT-x: (disabled in BIOS) PAT,HLT,MTF,PAUSE,EPT,UG,VPID
Jul 12 16:14:40 unixdistro kernel: TSC: P-state invariant, performance statistics
Jul 12 16:14:40 unixdistro kernel: real memory  = 8589934592 (8192 MB)
Jul 12 16:14:40 unixdistro kernel: avail memory = 8148766720 (7771 MB)
Jul 12 16:14:40 unixdistro kernel: Event timer "LAPIC" quality 600
Jul 12 16:14:40 unixdistro kernel: ACPI APIC Table: <LENOVO TP-83   >
Jul 12 16:14:40 unixdistro kernel: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
Jul 12 16:14:40 unixdistro kernel: FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 hardware threads
Jul 12 16:14:40 unixdistro kernel: ioapic0 <Version 2.0> irqs 0-23 on motherboard
Jul 12 16:14:40 unixdistro kernel: SMP: AP CPU #1 Launched!
Jul 12 16:14:40 unixdistro kernel: SMP: AP CPU #2 Launched!
Jul 12 16:14:40 unixdistro kernel: SMP: AP CPU #3 Launched!
Jul 12 16:14:40 unixdistro kernel: Timecounter "TSC-low" frequency 1245981731 Hz quality 1000
Jul 12 16:14:40 unixdistro kernel: random: entropy device external interface
Jul 12 16:14:40 unixdistro kernel: kbd1 at kbdmux0
Jul 12 16:14:40 unixdistro kernel: netmap: loaded module
Jul 12 16:14:40 unixdistro kernel: module_register_init: MOD_LOAD (vesa, 0xffffffff80ff4550, 0) error 19
Jul 12 16:14:40 unixdistro kernel: nexus0
Jul 12 16:14:40 unixdistro kernel: vtvga0: <VT VGA driver> on motherboard
Jul 12 16:14:40 unixdistro kernel: cryptosoft0: <software crypto> on motherboard
Jul 12 16:14:40 unixdistro kernel: acpi0: <LENOVO TP-83> on motherboard
Jul 12 16:14:40 unixdistro kernel: acpi_ec0: <Embedded Controller: GPE 0x11, ECDT> port 0x62,0x66 on acpi0
Jul 12 16:14:40 unixdistro kernel: acpi0: Power Button (fixed)
Jul 12 16:14:40 unixdistro kernel: cpu0: <ACPI CPU> on acpi0
Jul 12 16:14:40 unixdistro kernel: cpu1: <ACPI CPU> on acpi0
Jul 12 16:14:40 unixdistro kernel: cpu2: <ACPI CPU> on acpi0
Jul 12 16:14:40 unixdistro kernel: cpu3: <ACPI CPU> on acpi0
Jul 12 16:14:40 unixdistro kernel: attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Jul 12 16:14:40 unixdistro kernel: Timecounter "i8254" frequency 1193182 Hz quality 0
ce available
Jul 12 16:15:41 unixdistro wpa_supplicant[304]: wlan0: WPA: Key negotiation completed with 00:12:2a:6d:cc:c8 [PTK=CCMP GTK=TKIP]
Jul 12 16:15:41 unixdistro wpa_supplicant[304]: wlan0: CTRL-EVENT-CONNECTED - Connection to 00:12:2a:6d:cc:c8 completed [id=0 id_str=]
Jul 12 16:16:16 unixdistro dhclient: New IP Address (wlan0): 192.168.1.2
Jul 12 16:16:16 unixdistro dhclient: New Subnet Mask (wlan0): 255.255.255.0
Jul 12 16:16:16 unixdistro dhclient: New Broadcast Address (wlan0): 192.168.1.255
Jul 12 16:16:16 unixdistro dhclient: New Routers (wlan0): 192.168.1.254
Jul 12 16:34:37 unixdistro kernel: in6_purgeaddr: err=65, destination address delete failed
Jul 12 16:34:37 unixdistro wpa_supplicant[304]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:12:2a:6d:cc:c8 reason=3 locally_generated=1
Jul 12 16:34:37 unixdistro kernel: wlan0: link state changed to DOWN
Jul 12 16:34:37 unixdistro wpa_supplicant[304]: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Can't assign requested address
Jul 12 16:34:37 unixdistro wpa_supplicant[304]: wlan0: CTRL-EVENT-TERMINATING
Jul 12 16:34:37 unixdistro dhclient[403]: connection closed
Jul 12 16:34:37 unixdistro dhclient[403]: exiting.
Jul 12 16:34:37 unixdistro kernel: wlan0: Ethernet address: 60:67:20:2f:27:e0
Jul 12 16:34:37 unixdistro wpa_supplicant[1609]: Successfully initialized wpa_supplicant
Jul 12 16:34:37 unixdistro wpa_supplicant[1620]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:34:37 unixdistro kernel: iwn0: iwn_read_firmware: ucode rev=0x12a80601
Jul 12 16:34:37 unixdistro wpa_supplicant[1620]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:34:38 unixdistro wpa_supplicant[1620]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:34:38 unixdistro wpa_supplicant[1620]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:34:39 unixdistro wpa_supplicant[1620]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:34:39 unixdistro wpa_supplicant[1620]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:34:40 unixdistro wpa_supplicant[1620]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:34:40 unixdistro wpa_supplicant[1620]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:34:41 unixdistro wpa_supplicant[1620]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:45:21 unixdistro wpa_supplicant[2520]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:45:22 unixdistro wpa_supplicant[2520]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:45:22 unixdistro wpa_supplicant[2520]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:45:23 unixdistro wpa_supplicant[2520]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:45:23 unixdistro wpa_supplicant[2520]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:45:24 unixdistro wpa_supplicant[2520]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:45:24 unixdistro wpa_supplicant[2520]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:45:25 unixdistro wpa_supplicant[2520]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation 
Jul 12 16:59:34 unixdistro wpa_supplicant[2981]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:59:35 unixdistro wpa_supplicant[2981]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:59:35 unixdistro wpa_supplicant[2981]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:59:36 unixdistro ntpd[835]: error resolving pool 0.freebsd.pool.ntp.org: hostname nor servname provided, or not known (8)
Jul 12 16:59:36 unixdistro wpa_supplicant[2981]: ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
Jul 12 16:59:36 unixdistro wpa_supplicant[2981]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Jul 12 16:59:36 unixdistro reboot: rebooted by chris
Jul 12 16:59:36 unixdistro syslogd: exiting on signal 15
Jul 12 17:00:31 unixdistro syslogd: kernel boot file is /boot/kernel/kernel
Jul 12 17:00:31 unixdistro kernel: Waiting (max 60 seconds) for system process `vnlru' to stop... done
Jul 12 17:00:31 unixdistro kernel: Waiting (max 60 seconds) for system process `bufdaemon' to stop... done
Jul 12 17:00:31 unixdistro kernel: Waiting (max 60 seconds) for system process `syncer' to stop...

As for the driver, could you point me in the right direction how to check that?
 
Ok, so you're using the iwn(4) driver. Do you happen to know the exact make and model of the wireless card? Sometimes chipsets get updated/changed and knowing the exact model would help identifying possible issues.
 
Ok, so you're using the iwn(4) driver. Do you happen to know the exact make and model of the wireless card? Sometimes chipsets get updated/changed and knowing the exact model would help identifying possible issues.
Sorry if this is an obvious question, but how would I check that?
 
If it's a laptop the make and model of the laptop itself would provide a good starting point. If it's an additional (separate) card or module the actual box or manual should have that info.
 
If it's a laptop the make and model of the laptop itself would provide a good starting point. If it's an additional (separate) card or module the actual box or manual should have that info.
The laptop is a Lenovo ThinkPad T420; It's a used one, so I'm not sure what's inside 100%, but I'm fairly sure it's unchanged; BTW
I stumbled upon this command after searching a little: pciconf -lv
And here's what I got after typing it in(I only posted the iwn0 part not to spam, I hope that's ok):
Code:
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
Was that it? Or Am I looking for something else?
 
That's just perfect, thanks for that. I can't help out much more but at least we can be sure all required information is present. I know we have quite a few Thinkpad users here, I'm sure somebody will be able to help out further.
 
i can not test with your hardware, but, i can suggest you a couple of things.
1) disable ntpd, i see an error related to that. first make network work.
2) when i find network problems i remove all relevant configurations from rc.conf and do the config step by step from the shell, after a fresh boot. i find the debug process much easier in this way.

hope it helps, sorry for poor formatting im typing on phone.
 
The laptop is a Lenovo ThinkPad T420; It's a used one, so I'm not sure what's inside 100%, but I'm fairly sure it's unchanged; BTW
I stumbled upon this command after searching a little: pciconf -lv
And here's what I got after typing it in(I only posted the iwn0 part not to spam, I hope that's ok):
Code:
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

According to iwn(4) / iwnfw(4) the driver also requires a firmware module to be loaded which doesn't seem to be included in the GENERIC kernel. Can you check your /boot/loader.conf whether you got any of those lines in there?
Code:
     Alternatively, to load the driver as a module at boot time, place the
     following lines in loader.conf(5):

           if_iwn_load="YES"
           iwn1000fw_load="YES"
           iwn2000fw_load="YES"
           iwn2030fw_load="YES"
           iwn4965fw_load="YES"
           iwn5000fw_load="YES"
           iwn5150fw_load="YES"
           iwn6000fw_load="YES"
           iwn6000g2afw_load="YES"
           iwn6000g2bfw_load="YES"
           iwn6050fw_load="YES"
 
Hi guys,
Thanks for helping, but I couldn't do it.
So I decided to go back to arch linux, but as soon as I finished the install I remembered why I left that piece of **** software. I'm back to freebsd again; I now see how easy everything is, compared to arch and gentoo.
I couldn't fix the problem though, so I reinstalled freeBSD and this time I only selected to run the moused, powerd and enabled the crash dumps....
AND VOILA! The wifi works like a charm! Now, I don't know if one of your solutions wouldn't work, but turning off ntpd (or rather never having enabled it) worked for moi.
So, thank you again for your time, maybe someone might find this useful one day.
Cheers!

(PS: ALSO, a SPECIAL thanks to mickey, who's solution helped my colleague) [forgive me for any language mistakes]
 
Hi guys,
I had the same problem. I solved it by adding to /etc/rc.conf the line:
ifconfig_wlan0="WPA DHCP -ht"
Maybe one day it will be useful.
 
Back
Top