Skip to content

Commit

Permalink
[linux] Fix the device failed to reconnect wifi after power cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed Nov 4, 2022
1 parent 42b4438 commit a5d3c57
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/platform/Linux/ConnectivityManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,24 @@ void ConnectivityManagerImpl::_ConnectWiFiNetworkAsyncCallback(GObject * source_
mpConnectCallback = nullptr;
});
}
else
{
GError * gerror = nullptr;

result = wpa_fi_w1_wpa_supplicant1_interface_call_save_config_sync(mWpaSupplicant.iface, nullptr, &gerror);
if (result)
{
ChipLogProgress(DeviceLayer, "wpa_supplicant: save config succeeded!");
}
else
{
ChipLogProgress(DeviceLayer, "wpa_supplicant: failed to save config: %s",
gerror ? gerror->message : "unknown error");
}

if (gerror != nullptr)
g_error_free(gerror);
}
}
}

Expand Down

0 comments on commit a5d3c57

Please sign in to comment.