-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with wireless card detection #1
Comments
Thank you for the detailed report! Here's my system: NAME UUID TYPE DEVICE
myssid myuuid wifi wlp3s0 (column $3 is wifi) I adjusted the match to have a condition: if [ "$(nmcli con show --active | awk '$3 ~ "wifi" || "*wireless"')" == "" ]; I matched column 3, instead of 4, as I have been in systems that also have different device names; I didn't realize the wifi/wireless difference was a thing. Please do a pull and see if the bugfix works for you. |
May be nmcli with -t and -f is better way |
Sorry, not sure I follow. Does the bugfix in master fix this issue for you? |
gwen ~/Downloads/wifi-channel-watcher $ ./channel-watch |
Can you post the first 2 lines of: nmcli dev show Should look something like this: GENERAL.DEVICE: wlp3s0
GENERAL.TYPE: wifi I have a suspicion Please do another pull and test the latest code, I believe that should fix this particular issue. |
for wifi GENERAL.DEVICE: wlp1s0 but very first two lines was from VPN |
I think problem is that I have NAME with two words: gwen ~ $ nmcli con show --active |
This was likely the problem. I believe this is fixed in the active master repo: Instead of: nmcli -g chan dev wifi list | sort | uniq -c) (a hard match on wifi) It does a soft match of nmcli -g chan dev wi list | sort | uniq -c Please pull the latest code and see if it works for you. When you update your local codebase, take note of the new threshold option, you'll need to add it to your config file located in: |
gwen ~ $ nmcli -g chan dev wi list | sort | uniq -c |
That is an extremely old version, even older than the Debian stretch version of nmcli. What operating system are you running? If you haven't updated in a while, you should consider updating the operating system. This was originally built on Debian buster, which is typically one of the distros that have the oldest packages. I tested on stretch and it too, lacks the Irregardless of what distro you're running, this is a good read about running old and outdated operating systems: https://blog.linuxmint.com/?p=4030 |
Was an outdated OS the problem, @kozliatko ? I'd like to help you get this working, but as even the most crusty of distros has a later version of nmcli, I don't see it worthwhile to backport changes to support a version so old. The output of nmcli's suggested script mode (
If you are on hardware that cannot update to a later OS, you could certainly update your installation to use If you or anyone else reading this has a better approach, I'm open to suggestions or PRs. |
Yes, this is an extremely old version, but still supported. I have Linux Mint 18.3, Long term support release (LTS), supported until April 2021 with all updates installed. |
I didn't realize Mint had such old packages in still supported versions!! According to Wikipedia, 18.3 is end of life in April 2021: https://en.wikipedia.org/wiki/Linux_Mint_version_history If you intend to do a dist-upgrade before the official EOL, please let me know what version of nmcli v19 has; if it too is old, I will rework the script to make it compatible. With only a month of life left in 18.3, I don't think it's worth the effort until we know what version v19 offers. |
I think it's because you assume a fixed number of columns, but Network name can contain more fields
and your script looks at position $3
The text was updated successfully, but these errors were encountered: