Some devices take a while to tune and 500ms was too short to detect successful tuning. As well as waiting for 5 seconds each 100ms the status is checked and the loop is broken out of when tuning has suceeded.