OpenWrt client does not auto-reconnect if booted out of range

Hi,
I am using a Komikan (8devices) as a client, with a configured SSID to look for.

  • If I boot the device in range of the Access Point, it connects immediately
  • If I boot out of range and bring the device into range, it will never connect, with the wpa_cli messages shown below
  • If I do /etc/init.d/network restart, (or 'wifi' restart) once in range of the AP it will happily connect.

I would like to make sure the device automatically connects every time it sees the correct SSID. Can you help?

root@Komikan:/# wpa_cli
wpa_cli v2.7-devel
Copyright (c) 2004-2017, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.


Selected interface 'wlan0'

Interactive mode

<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>Trying to associate with SSID 'LiamC'
<3>Association request to the driver failed
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>Trying to associate with SSID 'LiamC'
<3>Association request to the driver failed
[   77.710000] random: nonblocking pool is initialized
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>Trying to associate with SSID 'LiamC'
<3>Authentication with b2:82:2c:bb:44:a4 timed out.
<3>CTRL-EVENT-DISCONNECTED bssid=b2:82:2c:bb:44:a4 reason=3 locally_generated=1
<3>CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="LiamC" auth_failures=1 duration=10 reason=CONN_FAILED
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>CTRL-EVENT-SSID-REENABLED id=0 ssid="LiamC"
<3>Trying to associate with SSID 'LiamC'
<3>Authentication with b2:82:2c:bb:44:a4 timed out.
<3>CTRL-EVENT-DISCONNECTED bssid=b2:82:2c:bb:44:a4 reason=3 locally_generated=1
<3>CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="LiamC" auth_failures=2 duration=20 reason=CONN_FAILED
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>CTRL-EVENT-SSID-REENABLED id=0 ssid="LiamC"
<3>Trying to associate with SSID 'LiamC'
<3>Association request to the driver failed
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
  • Interestingly, if I boot out of range, bring into range (get errors logged), bring out of range and restart networking, then when I bring into range it will connect successfully
  • However if I boot out of range and restart networking immediately, and then bring into range it will NOT connect automatically.

Hardware:
Komikan with RTL8822BEH wifi chip.
This problem is replicable accross lots of different AP hardware, so I would say the issue is likely with rtl8822 driver or firmware.
I see this on boot, but there doesn't appear (to me) anything out of ordinary:
(From line [ 24.350000] onwards also appears every time wifi interface is restarted)

[   17.330000]
[   17.330000]  found 8822B !!!
[   17.340000] halmac_check_platform_api ==========>
[   17.340000] 12089M
[   17.340000] HALMAC_MAJOR_VER = 0
[   17.350000] HALMAC_PROTOTYPE_VER = 0
[   17.350000] HALMAC_MINOR_VER = 0
[   17.350000] halmac_init_adapter_88xx ==========>
[   17.360000] halmac_init_adapter Succss
[   17.360000] IS_RTL8822B_SERIES value8 = a
[   17.370000] MACHAL_version_init
[   17.380000] Device Name = RTKWiFi1
[   17.390000] VIF_NUM=0
[   17.390000] MACHAL_version_init
[   17.400000] RFE TYPE =0
[   17.410000] RFE TYPE =0
[   17.410000] Error: Driver 'gpio-keys' is already registered, aborting...
[   17.420000] Error: Driver 'gpio-keys' is already registered, aborting...
[   17.430000] kmodloader: 1 module could not be probed
[   17.440000] kmodloader: - gpio_keys - 0
[   22.460000] device eth0 entered promiscuous mode
[   22.460000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   24.350000] WlanSupportAbility = 0x3
[   24.360000] [hard_code_8822_mibs] +++
[   24.360000] MAX_RX_BUF_LEN = 4000
[   24.370000] [ODM_software_init]
[   24.370000] clock 25MHz
[   24.370000] InitPON OK!!!
[   24.370000] load efuse ok
[   24.370000] rom_progress: 0x200007f
[   24.370000] rom_progress: 0x400007f
[   24.370000] InitMAC Page0
[   24.370000] Init Download FW OK
[   24.370000] halmac_init_mac_cfg OK
[   24.370000] halmac_cfg_rx_aggregation OK
[   24.370000] halmac_init_mac_cfg OK
[   24.420000] [GetHwReg88XX][size PHY_REG_PG_8822Bmp_Type10]
[   24.420000] [GetHwReg88XX][PHY_REG_PG_8822Bmp_Type10
[   24.430000] RL6302_MAC_PHY_Parameter_v018_20140708
[   25.240000] [set_8822_trx_regs] +++
[   25.500000] efuse content 0x3D7 = 0xf0
[   25.500000] efuse content 0x3D8 = 0xf2

travelmate is the package that provides periodic scanning and auto-connection to access points.

1 Like

Thank you for your suggestion @patrakov .
I am not using the package travelmate. I should add that the network is being bridged to an ethernet interface, so only one wireless interface being used.