Well, why would there be such a thing?
For one, the AVR side doesn't know diddly squat about WiFi in the first place. Second, for the Linux side, being "connected" might refer to both WiFi and "Wired" connections, with the later possibly considered "always on".
But it should be possible to deduce the status in either case by checking the Lua code for LuCi, which could be then be handed down to the AVR side...
You could run ifconfig. Maybe something like that: "ifconfig wlan0 | grep status".
If you parse the returned string you'll get something like "associated". See "runShellCommand()" in the references how to do that.
had a look around but couldn't find anything. How would I go about checking to see if the wifi on the Yún is connected to a router or not?
Was expecting something like if(!client.connected) ... But couldn't find anything.
Help would be appreciated,
the Yun as two CPU. one is an Atmel (often referred to as the AVR) and one is from Qualcomm. Qualcomm controls the wifi and it has a variant of Linux OS on it. It is a full computer with no monitor.