test/certification/main.c

/*******************************************************************************
* # License
* Copyright 2019 Silicon Laboratories Inc. www.silabs.com
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
/*
* Documentation for this app is available online.
* See https://docs.silabs.com/gecko-os/4/standard/latest/sdk/examples/test/certification
*/
#include "gos.h"
#define APPLICATION_START_LINE "\r\n\r\nCertification Test Application"
/*
* Start testmode by running 'testmode start'
* Once started the test cannot be stopped and normal wifi functions will no longer work.
* If testmode settings are changed while a test is in progress then the changes will be applied on the next 'testmode start'.
* There is no need to restart the device, running 'testmode start' will overwrite the running test.
*
* Testmode variables:
*
* \param testmode.mode selects the activated test, options: 'rx', 'tx_packet', 'tx_cw'
* \param testmode.period period in ms at which an indication message is sent.
* In the case of rx test, it returns the measurement results (PER).
Should not be less than 100ms.
* \param testmode.channel Wi-Fi 2.4GHz channel (1 -> 14)
*
* These options only apply in tx_cw mode:
* \param testmode.cw.mode options: 'single', 'dual'
* \param testmode.cw.tx_power Max CW output power (in quarter dB)
* \param testmode.cw.freq1 frequency offset of CW, integer range: -31 to 31 (with each step = 312.5kHz)
* \param testmode.cw.freq2 frequency offset of 2nd CW (in dual mode), integer range: -31 to 31 (with each step = 312.5kHz)
*
* These options only apply in tx_packet mode:
* \param testmode.protocol Wi-Fi protocol version to use, options: 'b', 'g', 'n'
* \param testmode.rate Wi-Fi protocol rate to use, options:
* b rates: '10' (1M), '20' (2M), '55' (5.5M), '11' (11M)
* g rates: '6', '9', '12', '18', '24', '36', '48', '54'
* n rates (MCS values): '1', '2', '3', '4', '5', '6', '7'
* \param testmode.tx.length Length of each frame in bytes, (25 -> 4091, excludes CRC)
* \param testmode.tx.number Number of frames to be sent before stopping (0 -> 65535, 0 means infinite)
* \param testmode.tx.ifs interframe spacing in us from 0 to 255
* \param testmode.tx.ht_format HT format (mixed mode or greenfield), options: 'MM', 'GF'
* \param testmode.tx.output_power Max TX packet mode output power (in quarter dB)
*/
/*************************************************************************************************/
void gos_app_init(void)
{
// This is called when the application first starts.
// This is where the application should initialize data structures and register event handlers.
// This API is required.
// Print to the log bus
GOS_LOG(APPLICATION_START_LINE);
}
/*************************************************************************************************/
void gos_app_deinit(void)
{
// This API is called just before the application finishes.
// Anything initialized or allocated by the app should be cleaned here.
// This API is optional.
}
/*************************************************************************************************/
void gos_app_idle(void)
{
// This is called when the event thread has no more pending events.
}