Skip to main content

Customizing Modem Operation with JSON

The Popoto Modem system has a database of configurable parameters that allow users to customize modem operation. These parameters are referred to as settable and gettable variables.

Settable and gettable variables provide system information, such as battery voltage; control modulation parameters, such as transmission power and carrier frequency; and provide runtime status, such as constellation points and PLL errors.

Variables include permissions and bounds checking. Some variables, such as BatteryVoltage, are read-only. Others, such as UPCONVERT_Carrier, are readable and writable.

Setting Variables with the JSON API

Variables are set through the JSON API using the Set command. The message format is:

{"Command":"Set", "Arguments": "SPACE DELIMITED ARGUMENT LIST"}

The argument list uses the following format:

VariableData TypeValueChannel
BBAND_DownCarrierintValue0

For example, to set the baseband recording downconvert carrier to 45 kHz:

{"Command":"Set","Arguments":"BBAND_DownCarrier int 45000.0 0"}

Variable Set Return Conditions

Variable Set Return Conditions
APIConditionExample Return
{"Command":"SetValue","Arguments":"BBAND_DownCarrier 25000 0"}Success{"Info":"Value Set BBAND_DownCarrier=25000"}
{"Command":"SetValue","Arguments":"BBAND_DownCarrier 5000 0"}Below minimum{"Info":"Value Out of Range: BBAND_DownCarrier=5000 Below Minimum"}
{"Command":"SetValue","Arguments":"BBAND_DownCarrier 500000 0"}Above maximum{"Info":"Value Out of Range: BBAND_DownCarrier=500000 Above Maximum"}
{"Command":"SetValue","Arguments":"bband_downcarrier 25000 0"}Misspelled variable{"Error":"Unknown Element bband_downcarrier"}

The full variable reference lists the controllable variables available within the Popoto Modem system.