Scanning for Clear Frequency

This tutorial describes how to scan a clear frequency for a FM transmitter.

Purpose

This tutorial shows you how to use the FM Transmitter Utility to scan clear frequencies for the FM transmitter.

Required Background

The FM Transmitter Library Overview provides an overview of the FM Transmitter library.

Introduction

Clear frequencies are frequencies without much interference.

Setup and Configuration Requirements

Make sure the device supports FM Transmitter and the transmitter has scanning capabilities.

Check the capability of the transmitter using the CMMTransmitterUtility::GetCapabilities method.

Using FM Transmitter Utility

The following tasks will be covered in this tutorial:

  • Scanning for clear frequencies

  • Setting auto clear frequency mode

Scanning for Clear Frequencies

The high level steps to scan a frequency using FM Transmitter Utility are shown here:

  1. Create an instance of CMMTransmitterScannerUtility scanner utility class using CMMTransmitterUtility::CreateTransmitterScannerUtilityL method.

    See also Creating Scanner Utilities.

  2. Scan for clear frequencies using the CMMTransmitterScannerUtility::ScanClearFrequenciesL method. Specify the start frequency, scanning direction and the search limits of the specific band.

  3. When a clear frequency is detected, the client receives a MTransmitterScannerUtilityObserver::TxScannerClearFrequencyFound callback.

    Note: The client receives separate call-back for each detected clear frequency.

  4. The client receives MTransmitterScannerUtilityObserver::TxScannerEvent callback with event type ETxScannerEventScanComplete and error KErrNone, when search is complete. Otherwise, the client receives appropriate error.

    Note: The Transmitter does not change its frequency, when a clear frequency is detected.

  5. Use the CMMTransmitterScannerUtility::CancelScanClearFrequenciesL method to cancel search for frequencies.

Setting Auto Clear Frequency Mode

Auto clear frequency mode is the mode in which the transmitter continuously scans for interference from other transmitters. The transmitter automatically changes its frequency to the next available clear frequency, when interference is detected.