Run a command if a device is connected otherwise wait.

TODO: less waiting echo/feedback.