Tested a loop that waits for GPS and GPRS