DhanushNehru / Python-Scripts

A curated list of python scripts for automating your tasks
https://dhanushnehru.github.io/Python-Scripts/
MIT License
558 stars 262 forks source link

Add Reconnection Attempts and Logging for Wi-Fi Checker #347

Open Stonebanks-js opened 1 month ago

Stonebanks-js commented 1 month ago

Description:

The current wifi checker.py script does not have the ability to automatically retry Wi-Fi reconnection if the connection fails, nor does it log Wi-Fi status or reconnection attempts for future reference. Adding these features would improve the script by providing better reliability and diagnostic capabilities.

Proposed Features:

Reconnection Attempts:

Add functionality to attempt reconnection multiple times (e.g., 3 attempts) when the Wi-Fi connection fails. After the specified number of attempts, the script should stop trying and notify the user that reconnection failed.

Logging Wi-Fi Status:

Implement a logging feature that writes Wi-Fi status (enabled/disabled), reconnection attempts, and success/failure to a log file (wifi_status_log.txt). This will help the user track the script's behavior over time.

Steps to Reproduce:

Expected Behavior:

The script should automatically retry reconnecting to Wi-Fi if the connection fails, up to a certain number of attempts. All significant actions (Wi-Fi status checks, reconnection attempts, and results) should be logged in a file for future reference

I will be completing this issue by tomorrow

NOTE - THIS ISSUE IS SUBJECTED TO @Stonebanks-js ONLY.

SIGNATURE - ARADHYA CHAUDHARY

Stonebanks-js commented 1 month ago

@hasan-py or @DhanushNehru Assign this issue to me and add these labels

DhanushNehru commented 1 month ago

Done @Stonebanks-js