Hi there! My application now reconnects successfully, using patch for 3.7. I had some unnecessary wifi driver related calls in the code before calling iwcfg_set_scan after Adapter_g->event_type has become DEAUTH. Now that part seems to work.
However, a new problem seems to be in the wifi initialization part if the network with specified ssid is not available. In such a case iwcfg_set_scan hangs and the system only recovers after watchdog resets it. If I turn the network on while iwcfg_set_scan is waiting it never finds the network (only finds it if the network is available when set_scan is called). My wifi initialization routine goes as follows (simplified):
RTCS_create(); IPCFG_default_enet_device = BSP_RSI_WIFI_DEVICE; ipcfg_get_mac(IPCFG_default_enet_device, IPCFG_default_enet_address); //seems to get correct mac for wifi device instead of using ENET_get_mac_addressipcfg_init_device(IPCFG_default_enet_device, IPCFG_default_enet_address);iwcfg_set_passphrase(IPCFG_default_enet_device,CFG_WIFI_PASSWORD);iwcfg_set_essid(IPCFG_default_enet_device,CFG_WIFI_SSID); //comment this to get list of networks instead of joining one directlyiwcfg_set_scan(IPCFG_default_enet_device,CFG_WIFI_SSID);
If I comment the row where ssid is set, then it properly lists all available networks, but I would like to wait for the specified network to become available and then join it. Some configurable timeout would be nice as well.