Take a device index from the command line. Added connection text back in