ping the device first to see if its up before trying to connect to make the scan faster.