Wireless-Innovation-Forum / 6-GHz-AFC

This repository contains code and data for testing the compliance of Automated Frequency Coordinator (AFC) software. The AFC is defined by the FCC in proceeding 18-295 on Unlicensed Use of the 6 GHz Band. This repository contains procedures, documentation, and tests for such software, and for the devices authorized by it. To contribute, please first read the CONTRIBUTING file in the repository for instructions.
14 stars 3 forks source link

Default communications timeout may not be large enough #42

Closed AEgbert closed 1 year ago

AEgbert commented 1 year ago

Description

The 10 second network timeout used by the test harness may unintentionally impose a time constraint on an AFC system's calculation speed.

Workaround

Currently, the AFC communication timeout can be adjusted from its default value of 10 seconds in the AFC configuration file (src/harness/cfg/afc.toml, line 33). This value can be set to a large enough of a value to allow the test to complete without a preemptive timeout due to a delayed AFC system response.

Long-term Solution

A change in the default value of the timeout (line 81 of src/harness/afc.py) to a substantially higher value (10-15 minutes) may be provided in a PR soon. In addition, explicit support for disabling the timeout entirely by providing a value of +Inf in the AFC config file may also be included.

To avoid unnecessary delays if an AFC system fails to connect at all, the PR will likely keep the connection timeout at a reasonably low value and only increase the read timeout. For more info on the two different timeouts, see: https://requests.readthedocs.io/en/latest/user/advanced/#timeouts. In this case, separate config options for the connect and read timeouts would likely be provided.

AEgbert commented 1 year ago

Per additional feedback, it is desired to only alter the afc.toml file, and make no modification to the existing afc.py implementation.

As such, the forthcoming change will only alter line 33 of afc.toml to provide an out-of-the-box timeout override.