Setup connection to device