I am using "nmcli networking connectivity" command to know the connectivity of my wifi connection. After establishing the connection with a wifi & if I see that it has no internet connection then "nmcli networking connectivity" show "limited" which is quite natural. But when that wifi connection got internet connection back and then if I run "nmcli networking connectivity" then also I am getting "limited" instead of "full". I have rescanned the network and also wait for few seconds and then run the command but I got the same result.(i.e. limited)
But if I reconnect with the wifi by running "nmcli device wifi connect [SSID] password [wap_key]" & then try to see the network connectivity then I got "full"
So, that means every time I want to check the the network connectivity I have to reconnect with the wifi (which is not desired). Is it so?
If not then please tell me suitable method (linux command, not via gui or not via ping, system command is more acceptable) to check whether my wifi has internet access or not. [any c/c++ code is also acceptable]