Do an >ls /sys/class/net The eth device will always be there; you can tell if it has a cable connected by >sudo ip link dev eth0 up and looking at the output. There will also be a wlanx device in /sys/class/net if and only if a WiFi dongle is plugged in.
On Saturday, November 14, 2015 at 4:06:00 PM UTC-5, dlchambers wrote: > > How can I detect: > a) If Cat5 ethernet has a live connection (to, say, a switch/router, > though perhaps not to the internet) > b) If wifi has a live connection to > i) AP > ii) internet > c) If both ethernet and wifi are present, which adapter is the one I'm > currently using? > > Many thanks, > -Dave > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
