Code Monkey home page Code Monkey logo

angela-d / wifi-channel-watcher Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 1.0 121 KB

Monitor channel usage of neighboring routers & get an alert if your active channel is not optimal. Troubleshoot wifi without lifting a finger!

License: GNU General Public License v3.0

Shell 100.00%
wifi wifi-network wifi-configuration network-manager linux-desktop wifi-modules wifi-security access-point wireless-network nmcli gnome-desktop gnome3 gnome-shell-extension systemd-service systemd-timer

wifi-channel-watcher's Introduction

Wifi Channel Watcher for GNU/Linux-based desktop environments

Monitor channel usage of neighboring routers / access points and get a desktop alert if your active channel is not optimal (has more than 1 user on it, other than you). Troubleshoot your wifi without lifting a finger!

Additional options:

  • Suggest a better, less congested channel
  • MAC address/BSSID lookups of neighbors - Useful when troubleshooting rogue access points or evil twin attacks
  • MAC address caching - No need to pull lookups from the internet when most neighboring routers are likely static
  • Enterprise access point lookup - Useful when you have several access points with the same SSID; reference a list of BSSIDs and easily set custom identifiers (see 'Full Detail' screenshot)

Better Channel Suggestion

Better wifi channel suggestion

Full Detail

Wifi channel warning - SSID, BSSID & Access Point Names

Without Custom Access Point Lookups

Wifi channel warning - SSID, BSSID & Access Point Names

Minimum Detail

Wifi channel warning - minimum detail


Installation

This script can be cloned and run manually, or added as a service that runs on a scheduled interval.

See detailed install instructions for built-in systemd user service options (no sudo/root needed).

  • After installing dependencies (most Gnome users may already have them), clone the repo to a directory on your hard drive.

    git clone https://github.com/angela-d/wifi-channel-watcher.git

    That's it.

    You can manually run the script any time via command-line:

    /your/directory/path/to/wifi-channel-watcher/channel-watch

Upgrading

If you previously cloned this repo (prior to the version(s) mentioned, you'll have to add the new config variables to ~/.config/wifi-channel-watcher/config.conf in order for your existing config to be read by the script.

You can also simply delete the folder: ~/.config/wifi-channel-watcher and re-run the script to re-initialize setup (wipe existing config) to take effect, also.

Prior to v1.3.0

  • Add the following to your ~/.config/wifi-channel-watcher/config.conf file:
    CHANNELS_5G="36|40|44|48|149|153|157"
    IGNORE_5G="1|2|3|4|5|6|7|8|9|10|11|12|13|52|56|60|64|100|104|108|112|116|120|124|128|132|136|140|38|46|54|62|102|110|118|126|134|134|142|151|159|42|58|106|122|138|155|161|165"
    CHANNELS_2G="1|6|11"
    IGNORE_2G="2|3|4|5|7|8|9|10|12|13|14|16|36|40|44|48|149|153|157|161|165|52|56|60|64|100|104|108|112|116|120|124|128|132|136|140|38|46|54|62|102|110|118|126|134|134|142|151|159|42|58|106|122|138|155"
    These options move the channel selections from being hardcoded, to give the user greater control over what channels are considered or ignored.

Prior to v1.2.0

  • Add the v1.3.0 changes above
  • Add the new THRESHOLD variable to your ~/.config/wifi-channel-watcher/config.conf file:
    THRESHOLD="1"
    Threshold is the greater than or equal to value, for how many are on your channel (excluding you) before you get a notification.

Customizing

All customizations are optional, in most cases, the script will work out of the box.

wifi-channel-watcher's People

Contributors

angela-d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hansendm

wifi-channel-watcher's Issues

Problem with wireless card detection

wlp1s0    Link encap:Ethernet  HWaddr 44:03:2c:9d:81:b8  
          inet addr:10.0.0.113  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::e6d4:d75d:d152:dcb0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:472967 errors:0 dropped:0 overruns:0 frame:0
          TX packets:254140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:299563101 (299.5 MB)  TX bytes:60382595 (60.3 MB)

gwen wifi-channel-watcher # ./channel-watch 
Wifi interface appears to be inactive.  Using a Pi?
For troubleshooting: https://github.com/angela-d/wifi-channel-watcher/wiki/Troubleshooting

I think it's because you assume a fixed number of columns, but Network name can contain more fields


gwen wifi-channel-watcher # nmcli con show --active
NAME           UUID                                  TYPE             DEVICE 
Auto slniecko  561a7513-cd9b-4887-8a6b-15ebeeaa4293  802-11-wireless  wlp1s0 
vpn0           09273c1c-a70e-4d5f-a371-e2b6a247b443  tun              vpn0   

and your script looks at position $3

# wifi active?
if [ "$(nmcli con show --active | awk '$3 ~ "wifi"')" == "" ];

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.