The xsup_get_state utility accepts a single argument of a network interface name and returns the current status of xsupplicant for that interface.
Diagnostics
An exit status of 0 is returned when the current state does not reflect an error condition, all other conditions including a failure to connect to the domain socket result in an exit status of 1.