In this tutorial, we explore a much more valuable feature of PicoScenes: arbitrary carrier frequency tuning, or enabling Ultra Wide Bandwidth (UWB) sensing on commodity Wi-Fi devices. Two ways are provided to access this feature: Carrier Frequency Direct Tuning, and Carrier Frequency Scanning. In the following text, I use CF for the abbreviation of Carrier Frequency.

## Carrier Frequency Direct Tuning

Tuning NIC phy0 to an arbitrary CF demands only one argument: –freq. The following example argument tunes NIC phy0 to 5432.1MHz:

--interface phy0 --freq 5432100000

* Note: for frequency related arguments, the unit is Hz.

## Carrier Frequency Scanning

Recall the injector and chronos-initiator examples in the previous tutorials, we use “–inj-freq-repeat” argument to specify the number of packet injection. However, why use such strange argument name?

The answer is that, CF scanning is the primary design goal of chronos-initiator and chronos-responder. “–inj-freq-repeat” is one of the 4 arguments controlling CF scanning. They are all listed below:

• –inj-freq-begin, the beginning CF of scanning
• –inj-freq-end, the ending frequency of scanning
• –inj-freq-step, the frequency step of scanning
• –inj-freq-repeat, the number of injections in each frequency

If one or both of –inj-freq-begin and –inj-freq-end are absent, both of them are set to current working frequency, e.g., no CF scanning.

The following argument scans the carrier frequency of NIC phy0 from 5200MHz to 5300MHz with 5MHz step and injects 10 packets per CF using chronos-initiator mode:

--interface phy0 --mode chronos-initiator --freq 5200000000 --inj-freq-begin 5200000000 --inj-freq-end 5300000000 --inj-freq-step 5000000 --inj-freq-repeat 10

The corresponding argument for chronos-responder is the same as in the previous tutorial.