Automatic scanning over a band of frequencies