Index: sources/wifi/WifiInterface.h =================================================================== diff -u -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/wifi/WifiInterface.h (.../WifiInterface.h) (revision 6c6f1f5d466badd9b4fd67be7c907234c342b2a2) +++ sources/wifi/WifiInterface.h (.../WifiInterface.h) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file WifiInterface.h - * \author (last) Vy - * \date (last) 17-May-2023 + * \author (last) Behrouz NematiPour + * \date (last) 08-Dec-2023 * \author (original) Behrouz NematiPour * \date (original) 11-May-2021 * @@ -71,12 +71,21 @@ QProcess _processReadNetworkInfo; WifiNetworkData _network; - const QString _iface = "wlan0"; - const QString _wpaSupplicantConfPath = QString("/etc/wpa_supplicant/wpa_supplicant-%1.conf").arg(_iface); + const QString _wpaSupplicantConfPath = QString("/etc/wpa_supplicant/wpa_supplicant-%1.conf").arg(iface()); // Singleton SINGLETON(WifiInterface) +public: + + static QString iface() { + #ifdef BUILD_FOR_DESKTOP + return "wlp4s0"; + #else + return "wlan0"; + #endif + } + private: bool checkScript(QString &vScript, const QString &vShellScript); QString getTextBetweenDelimiters(const QString &vText, const QString &vLeftDelim, const QString &vRightDelim);