This is a Python application with a graphical user interface (GUI) that allows you to manage and connect to WiFi networks.
- Cross-platform: Works on Windows, Linux, and macOS.
- Save known networks: Store WiFi networks and their passwords for easy connection.
- Connect to WiFi: Connect to a saved WiFi network with a single click.
- QR Code Generation: Generate a QR code for a WiFi network to easily share the connection with other devices.
- Add new networks: Easily add new WiFi networks to the list.
- Search: Search for a specific network in the list.
The project is structured as follows:
.
├── config.json
├── gui.py
├── main.py
├── wifi_manager.py
└── __pycache__/
main.py: The entry point of the application. It checks for dependencies and starts the GUI.gui.py: Contains the code for thetkinterGUI. It defines theWifiConnectorAppclass, which creates the main window, widgets, and handles user interactions.wifi_manager.py: This file manages the core WiFi functionality. It includes functions to:- Load and save known networks from a
config.jsonfile. - Connect to WiFi networks on different operating systems (Windows, Linux, macOS).
- Scan for available WiFi networks.
- Generate QR codes for WiFi connections.
- Load and save known networks from a
config.json: Stores the SSIDs and passwords of known WiFi networks.
The application uses the tkinter library to create the GUI. The wifi_manager.py script uses system commands to manage WiFi connections:
- Windows:
netsh - Linux:
nmcli - macOS:
networksetup
The config.json file is used to store the WiFi networks and their passwords. The application reads this file to populate the list of available networks. When you connect to a network, the application uses the information from this file to establish the connection.
-
Install the dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
-
Add a WiFi network:
- Click the "Add Network" button.
- Enter the SSID (network name) and password.
- Click "Add".
-
Connect to a WiFi network:
- Select a network from the list.
- Click the "Connect" button.
-
Generate a QR code:
- Select a network from the list.
- Click the "Show QR" button.
- A new window will open with the QR code. You can scan this code with your phone to connect to the network.
To create an executable file, you can use a tool like pyinstaller.
-
Install pyinstaller:
pip install pyinstaller
-
Create the executable:
pyinstaller --onefile --windowed main.py
--onefile: Creates a single executable file.--windowed: Prevents the console window from appearing when you run the application.
-
The executable file will be created in the
distfolder.