Skip to content

Repository files navigation

Windows Mobile Hotspot Manager

A lightweight, modern Windows desktop utility for managing the built-in Mobile Hotspot in Windows 11 — designed as a full replacement for the native Settings page.

Controls Tab Network Info Tab

Features

  • QR Code Connect — auto-generated QR code on the Network Info tab. Scan from any iOS/Android device to connect instantly (standard WIFI:T:WPA;S:...;P:...;; format).
  • Connected Clients Table — real-time table with Device Name, IP Address (resolved via ARP), and MAC Address for every connected device.
  • Network Properties — live SSID, Password, and Wi-Fi Band display pulled directly from WinRT.
  • Shutdown Timer — set an auto-off timer in minutes from the GUI or the system tray (1h / 2h quick presets).
  • Auto-Restart — periodic hotspot restart to prevent session hangs (configurable interval, 0 to disable).
  • System Tray — runs silently in the background with a dynamic green/gray tray icon and quick-access context menu via pystray.
  • Start with Windows — one-click autostart toggle, properly registered in the Windows Registry.
  • Thread-Safe Architecture — all background polling uses threading.Lock and root.after() to avoid Tkinter cross-thread crashes.
  • Memory Optimized — explicit garbage collection on window minimize, cached tray icons, QR code regeneration only on SSID/password change.

Installation

From Source

  1. Python 3.11+ required.
  2. Clone this repository:
    git clone https://github.com/YOUR_USERNAME/GSPOT.git
    cd GSPOT
  3. Install dependencies:
    pip install -r requirements.txt
  4. Run the application:
    python src/hotspot_manager.py

    The application will prompt for Administrator privileges — required for controlling the Windows Mobile Hotspot via WinRT API.

Pre-built Executable

Download the latest HotspotManager_v3.0.exe from the Releases page. No Python installation needed — just run the .exe (it will request admin rights automatically).

Building the Executable

Compile into a standalone .exe with the included build script:

.\build.bat

This runs PyInstaller with all necessary flags:

  • --onefile — single self-contained binary
  • --windowed — no console window
  • --uac-admin — embedded UAC manifest for auto admin prompt
  • --add-data — bundles customtkinter themes and assets
  • --hidden-import — includes pystray, qrcode, winsdk backends

Output: dist\HotspotManager_v3.0.exe

⚠️ Windows Defender may flag PyInstaller executables as false positives. See BUILD_README.md for detailed mitigation steps.

Testing

pytest

31 tests covering API service, background logic, config, tray behavior, and project structure.

What's New in v3.0

New Features

  • QR Code Generation — scan-to-connect QR code on the Network Info tab using the WIFI:T:WPA standard format
  • macOS-Style Redesign — complete visual overhaul: dark theme, card frames (corner_radius=12), CTkSwitch toggle, Helvetica typography, macOS system color palette
  • IP Address Resolution — connected clients table now shows IP addresses via Windows ARP table parsing

Bug Fixes

  • Thread SafetyIntVar.set() and shared state protected with root.after() + threading.Lock (no more "main thread is not in main loop" crashes)
  • Async Fix — replaced asyncio.run() with new_event_loop() to prevent RuntimeError from background threads
  • WinRT Type Safety — all HostName objects explicitly converted to str() before f-string formatting (fixes TypeError: unsupported format string crash in compiled .exe)
  • Log Deduplication — repeated errors logged once instead of every 5 seconds
  • Exception Handling — bare except: replaced with except Exception:

Previous Versions

v2.0
  • Tabbed interface (CTkTabview) separating Controls and Network Info
  • Network properties display (SSID, Password, Band)
  • Connected clients monitor with live counter
v1.2
  • Hibernation crash fix
  • Start with Windows registry fix
  • Silent startup (--minimized flag)
  • Graceful exit from system tray

Technologies

Component Technology
GUI Framework CustomTkinter
System Tray Pystray + Pillow
Network API WinSDK (Windows Runtime)
QR Code qrcode + Pillow
Testing Pytest
Build PyInstaller
This project uses pystray (LGPLv3). The pystray library can be replaced by the end user via pip install.

License

This project is provided as-is for personal use and educational purposes.

About

A lightweight, modern desktop utility designed to manage the built-in Mobile Hotspot functionality in Windows 11.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages