-
Notifications
You must be signed in to change notification settings - Fork 0
/
mywifi.h
43 lines (35 loc) · 933 Bytes
/
mywifi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef MYWIFI_H
#define MYWIFI_H
#include <QMainWindow>
#include "set_wifi.h"
#include <QDebug>
namespace Ui {
class MyWifi;
}
class MyWifi : public QMainWindow
{
Q_OBJECT
public:
explicit MyWifi(QMainWindow *parent = nullptr);
~MyWifi();
Set_Wifi WifiDlg;
void Get_Wifi_Name();
private slots:
void on_connectBTN_clicked();
void on_connectBTN_2_clicked();
void on_back_ptn_clicked();
private:
Ui::MyWifi *ui;
};
#endif // MAINWINDOW_H
/**
* @brief system <getWifiName>
*
system("wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf -B");
system("wpa_cli -i wlan0 scan");
system("wpa_cli -i wlan0 scan_results > ./wifilist");
system("cat wifilist |awk -F'\t' '{print $5}'> wifiname.txt");
// 添加网络
system("wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf -B");
system("wpa_cli -i wlan0 add_network > i.ini");
*/