Giter Site home page Giter Site logo

bt-wifi-reconnect's Introduction

BT Wifi logs me out for no apparent reason several times a day.. so I wrote a cron script to reconnect me every few minutes!

If it detects a lack of internet connectivity, it runs a virtual browser (phantom JS) and logs you in.

Setup

Recursive clone is important since I am using submodule!

git clone --recursive [email protected]:karlicoss/bt-wifi-reconnect.git

Running

cp config.py.example config.py
vim config.py # type in path to phantomjs, and your credentials
python3 check_and_reconnect.py

Adding to cron

  1. crontab -e
  2. add an entry like this */2 * * * * /usr/bin/python3 /full/path/to/script/bt_check_and_reconnect.py, this runs the script every two minutes

Easy peasy!

Prerequisites

  • pip3 install -r requirements.txt
  • phantomjs (see config.py.example for more details)

bt-wifi-reconnect's People

Contributors

karlicoss avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ffuuugor

bt-wifi-reconnect's Issues

BT WiFi Login Site Pages have Drastically Changed Recently?

I do not know yet if this script still works, I'm awaiting the next kick from the network. I'll update this to fix it if I encounter any problems.
Recently BT WiFi changed their SSID and updated the initial page for the Login Domain.

Also I'm Curious Why You Decided on Such an Elegant* Solution Compared to Simple wget HTTP POST?

  • I have chosen this solution over the simpler solutions because this is far more reliable because of its design.
    And I appreciate the effort you've put into this compared to the 5 minute scripts that hit wget.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.