WiFi issues when using Extender

Hi,

After making a break I'm getting back into this WiFi issue.
So here's the setup:
The main router is distant so I need a wifi extender to increase the range.
The extender is configured to use the same SSID and authentication as the main router so wherever I am in the house I will not need to switch from one network to another.
Even when far from the main router I can still get a very poor signal of it so in wifi list I can see the same SSID twice, the main router and the extender with a strong signal.
Something like this
Laptop -(strong)-------------- Extender---------------------- Router
-(very poor)-------------------------------------------

Problem:
Wifi is connected, strong signal, but no network at all.
All other devices near by still have network by the Extender, tablet or cellphone, but the Laptop doesn't.
If I switch hard drives to boot with Linux in the same laptop I never have this problem so it's not an hardware issue.
So this problem happens only with FreeBSD.
The only way I've got the get network back is to insist in turning off and on (ifconfig wlan0 up/down) several times until it gets back to normal.
It's a matter of minutes to happen again.
with dmesg I can read some messages like
iwn0: null_update_chw: need callback
or
iwn0: iwn_intr: fatal firmware error
firmware error log:
error type = "SYSASSERT" (0x00000005)
program counter = 0x00002E20
source line = 0x00000729
error data = 0x0000000100000729
branch link = 0x0000157A0000157A
interrupt link = 0x0000153200000000
time = 914842086
driver status:
tx ring 0: qid=0 cur=46 queued=0
tx ring 1: qid=1 cur=38 queued=0
tx ring 2: qid=2 cur=0 queued=0
tx ring 3: qid=3 cur=8 queued=0
tx ring 4: qid=4 cur=176 queued=0
tx ring 5: qid=5 cur=0 queued=0
tx ring 6: qid=6 cur=0 queued=0
tx ring 7: qid=7 cur=0 queued=0
tx ring 8: qid=8 cur=0 queued=0
tx ring 9: qid=9 cur=0 queued=0
tx ring 10: qid=10 cur=89 queued=0
tx ring 11: qid=11 cur=0 queued=0
tx ring 12: qid=12 cur=0 queued=0
tx ring 13: qid=13 cur=0 queued=0
tx ring 14: qid=14 cur=0 queued=0
tx ring 15: qid=15 cur=0 queued=0
tx ring 16: qid=16 cur=0 queued=0
tx ring 17: qid=17 cur=0 queued=0
tx ring 18: qid=18 cur=0 queued=0
tx ring 19: qid=19 cur=0 queued=0
rx ring: cur=47
iwn0: iwn_panicked: controller panicked, iv_state = 5; restarting

It must be something related to driver.
Seems to me that from a moment to another the system becomes connected to the extender and to the main router at same time and packages get dropped.

Any clue on this?
 
What wifi channel do use for the main Access Point and what wifi channel for the extender.
Edit /etc/rc.conf file to set the Wifi channel number
ifconfig_wlan0=" WPA channel 6 DHCP"

or manually issue command ifconfig wlan0 channel 11 ssid "My_Extender"
There is something about setting the MAC address of the AP you are looking to connect with.

Here are my manual Wifi setup documentation, read through and find debug details for your needs. You have an Intel Wifi chip.
https://forums.ghostbsd.org/viewtopic.php?f=64&t=570 PCI RTL8188CE
https://forums.ghostbsd.org/viewtopic.php?f=64&t=526 USB Edimax EW-7811un V1

Use the following line for testing with the Debug and Password debug printout options. Set the channel number in the wpa_supplicant.conf file
Code: Select all
killall dhclient
wpa_supplicant -d -K -i wlan0 -c /etc/wpa_supplicant.conf
dhclient wlan0


Select the BSSID of the access point.
https://docs.freebsd.org/doc/7.0-RELEASE/usr/share/doc/handbook/network-wireless.html
In an environment where there are multiple access points with the same SSID (often done to simplify roaming) it may be necessary to associate to one specific device. In this case you can also specify the BSSID of the access point (you can also leave off the SSID):

ifconfig_ath0="ssid your_ssid_here bssid xx:xx:xx:xx:xx:xx WPA DHCP"

29.3.3.1.2.1 Selecting an Access Point​

Most of time it is sufficient to let the system choose an access point using the builtin heuristics. This is the default behaviour when you mark an interface up or otherwise configure an interface by listing it in /etc/rc.conf, e.g.:
ifconfig_ath0="DHCP"

If there are multiple access points and you want to select a specific one, you can select it by its SSID:
ifconfig_ath0="ssid your_ssid_here DHCP"

In an environment where there are multiple access points with the same SSID (often done to simplify roaming) it may be necessary to associate to one specific device. In this case you can also specify the BSSID of the access point (you can also leave off the SSID):
ifconfig_ath0="ssid your_ssid_here bssid xx:xx:xx:xx:xx:xx DHCP"

There are other ways to constrain the choice of an access point such as limiting the set of frequencies the system will scan on. This may be useful if you have a multi-band wireless card as scanning all the possible channels can be time-consuming. To limit operation to a specific band you can use the mode parameter; e.g.:
ifconfig_ath0="mode 11g ssid your_ssid_here DHCP"

will force the card to operate in 802.11g which is defined only for 2.4GHz frequencies so any 5GHz channels will not be considered. Other ways to do this are the channel parameter, to lock operation to one specific frequency, and the chanlist parameter, to specify a list of channels for scanning. More information about these parameters can be found in the ifconfig(8) manual page.

https://docs.freebsd.org/en/books/handbook/advanced-networking/
 
What wifi channel do use for the main Access Point and what wifi channel for the extender.
Edit /etc/rc.conf file to set the Wifi channel number
ifconfig_wlan0=" WPA channel 6 DHCP"

or manually issue command ifconfig wlan0 channel 11 ssid "My_Extender"
There is something about setting the MAC address of the AP you are looking to connect with.

Here are my manual Wifi setup documentation, read through and find debug details for your needs. You have an Intel Wifi chip.
https://forums.ghostbsd.org/viewtopic.php?f=64&t=570 PCI RTL8188CE
https://forums.ghostbsd.org/viewtopic.php?f=64&t=526 USB Edimax EW-7811un V1

Use the following line for testing with the Debug and Password debug printout options. Set the channel number in the wpa_supplicant.conf file
Code: Select all
killall dhclient
wpa_supplicant -d -K -i wlan0 -c /etc/wpa_supplicant.conf
dhclient wlan0


Select the BSSID of the access point.
https://docs.freebsd.org/doc/7.0-RELEASE/usr/share/doc/handbook/network-wireless.html
In an environment where there are multiple access points with the same SSID (often done to simplify roaming) it may be necessary to associate to one specific device. In this case you can also specify the BSSID of the access point (you can also leave off the SSID):

ifconfig_ath0="ssid your_ssid_here bssid xx:xx:xx:xx:xx:xx WPA DHCP"

29.3.3.1.2.1 Selecting an Access Point​

Most of time it is sufficient to let the system choose an access point using the builtin heuristics. This is the default behaviour when you mark an interface up or otherwise configure an interface by listing it in /etc/rc.conf, e.g.:
ifconfig_ath0="DHCP"

If there are multiple access points and you want to select a specific one, you can select it by its SSID:
ifconfig_ath0="ssid your_ssid_here DHCP"

In an environment where there are multiple access points with the same SSID (often done to simplify roaming) it may be necessary to associate to one specific device. In this case you can also specify the BSSID of the access point (you can also leave off the SSID):
ifconfig_ath0="ssid your_ssid_here bssid xx:xx:xx:xx:xx:xx DHCP"

There are other ways to constrain the choice of an access point such as limiting the set of frequencies the system will scan on. This may be useful if you have a multi-band wireless card as scanning all the possible channels can be time-consuming. To limit operation to a specific band you can use the mode parameter; e.g.:
ifconfig_ath0="mode 11g ssid your_ssid_here DHCP"

will force the card to operate in 802.11g which is defined only for 2.4GHz frequencies so any 5GHz channels will not be considered. Other ways to do this are the channel parameter, to lock operation to one specific frequency, and the chanlist parameter, to specify a list of channels for scanning. More information about these parameters can be found in the ifconfig(8) manual page.

https://docs.freebsd.org/en/books/handbook/advanced-networking/
Ok, I will try that enforced channel configuration.
 
It didn't work.
Here's my new rc.conf:
ifconfig_wlan0="country PT regdomain ETSI WPA channel 64 SYNCDHCP"

and the wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1


network={

ssid="******-5G" # extender SSID for 5G, same as main router SSID, same problem happens if I choose the non 5G network
bssid=14:****:CA # extender MAC Address
key_mgmt=WPA-PSK
proto=RSN
psk="***" # the extender password the same has the main router
}

Sometimes it connects just fine and for some reason the network goes down and it gets hard to get back.
I tried to replicate the Linux configurations that got configured automatically by the system it self, I just had to choose the SSID insert the password and done, no problems in Linux, but here in FreeBSD I have no success.
Same hardware different system, different drivers.
The only way to keep it going longer is by having a constant stream running i.e. youtube video.
I noticed that if it stays for a while without using it goes away.
So while I'm working on this system I keep listening online music, which I do most of the times anyway, if for some reason I turn it off I can kiss the network goodbye.
Just now, while typing this reply for sure I will not be able to post it at first try, this is really an annoying problem.
Maybe an issue with WEP encryption rotation or something like that?
 
Here's the ifconfig wlan0
When it's not working the output of this command is exactly the same:
(mac addresses and ssid are purposely masked)

wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:***:68
inet 192.168.1.92 netmask 0xffffff00 broadcast 192.168.1.255
groups: wlan
ssid M***-5G channel 64 (5320 MHz 11a ht/40-) bssid 14:***:ca
regdomain ETSI country PT authmode WPA2/802.11i privacy ON
deftxkey UNDEF TKIP 2:128-bit txpower 24 bmiss 10 mcastrate 6
mgmtrate 6 scanvalid 60 ampdulimit 32k ampdudensity 4 -amsdutx amsdurx
shortgi -stbc -ldpc -uapsd wme roaming MANUAL
parent interface: iwn0
media: IEEE 802.11 Wireless Ethernet MCS mode 11na
status: associated
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

here's the dmesg ouput of ifconfig wlan0 down and up several time until it starts working.
the last try it made it work.
wlan0: link state changed to UP
wlan0: link state changed to DOWN
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
wlan0: link state changed to UP
wlan0: link state changed to DOWN
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
wlan0: link state changed to UP
wlan0: link state changed to DOWN
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
wlan0: link state changed to UP
wlan0: link state changed to DOWN
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
ifa_maintain_loopback_route: insertion failed for interface wlan0: 12
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
ifa_maintain_loopback_route: insertion failed for interface wlan0: 12
wlan0: link state changed to UP
wlan0: link state changed to DOWN
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
wlan0: link state changed to UP
wlan0: link state changed to DOWN
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
wlan0: link state changed to UP
wlan0: link state changed to DOWN
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
wlan0: link state changed to UP
wlan0: link state changed to DOWN
iwn0: iwn_read_firmware: ucode rev=0x09dd0401
wlan0: link state changed to UP
 
I think I may just found the problem.
Here's the ifconfig wlan0 up scan for both
M***-5G 14:***:ca 36 54M -76:-95 100 EP HTCAP WPA RSN WME BSSLOAD VHTCAP VHTOPMODE
M***-5G 12:***:7d 36 54M -85:-95 100 EP RSN HTCAP VHTCAP VHTOPMODE VHTPWRENV WPS WPA WME
Both have the same channel and same SSID, so it's useless to specify the channel.
Since I'm not able to change the channel in the extender settings so the only way to workaround on this is to change the SSID of the extender.
After doing that it connected and seems stable, I feel improvements on network speed as well.
So this means it's a system software problem, it keeps switching networks with same SSID that are in the same channel even if the MAC addr is different.
It would be great this to be fix in next release.
Seems quite simple.
 
wb7odyfred
I confirm that after changing the extender SSID my network became stable and faster and it's been 1 day with no wifi issues at all.
So the problem is that the system keeps switching devices because the SSID and Channel are the same and packages get dropped.

The problem has a workaround but I would like to use the same SSID on both devices, it's an extender and its purpose is to extend the wifi range without setting up devices for other network while walking in the house.

In my opinion this is a critical security problem as it seems like other devices may receive wifi packages just by copying SSID and Channel of another wifi in range.
So I hope to see this bug resolved in a future patch or release.

Thank you for your help.
 
Select the BSSID of the Extender access point.
https://docs.freebsd.org/doc/7.0-RELEASE/usr/share/doc/handbook/network-wireless.html
In an environment where there are multiple access points with the same SSID (often done to simplify roaming) it may be necessary to associate to one specific device. In this case you can also specify the BSSID of the access point (you can also leave off the SSID):

ifconfig_ath0="ssid your_ssid_here bssid xx:xx:xx:xx:xx:xx WPA DHCP"

The point was to USE a very specific bssid xx:xx:xx:xx:xx:xx which is the unique MAC address for that Extender Access Point. That way, even with the same ssid 'my_wifi_ssid_name' and same wifi channel, your computer would only connect to the extender with that matching unique bssid and not to main access point. I think your solution of changing the SSID is good. Your total network seems more stable and faster with out the conflicting use of the same SSID. Think about the network RF packets exchanged through the air from the extender access point causing collisions for the wifi connecting computers.

You have a working solution using different ssid 'names'. I am happy for you. I learned something new by helping you, rmomota. Thanks for the learning experience.
 
Select the BSSID of the Extender access point.
https://docs.freebsd.org/doc/7.0-RELEASE/usr/share/doc/handbook/network-wireless.html
In an environment where there are multiple access points with the same SSID (often done to simplify roaming) it may be necessary to associate to one specific device. In this case you can also specify the BSSID of the access point (you can also leave off the SSID):

ifconfig_ath0="ssid your_ssid_here bssid xx:xx:xx:xx:xx:xx WPA DHCP"

The point was to USE a very specific bssid xx:xx:xx:xx:xx:xx which is the unique MAC address for that Extender Access Point. That way, even with the same ssid 'my_wifi_ssid_name' and same wifi channel, your computer would only connect to the extender with that matching unique bssid and not to main access point. I think your solution of changing the SSID is good. Your total network seems more stable and faster with out the conflicting use of the same SSID. Think about the network RF packets exchanged through the air from the extender access point causing collisions for the wifi connecting computers.

You have a working solution using different ssid 'names'. I am happy for you. I learned something new by helping you, rmomota. Thanks for the learning experience.
I've that in my WPA supplicant file.
The working solution is to use a different SSID.
But so what's the point of forcing a device? If I move to a different place in the house I would like to use the device with stronger signal.
All I needed to do is select the SSID of the network I wish to connect and it should just work even if I get the laptop and move in the house and the network switch to the other device.
So it's a bug, right?
Somewhere in the code there must be a moment when another device becomes preferred for some reason and the system does not reconnect to that device properly.
 
Back
Top