.. |degc| unicode:: U+02103 .. DEGREE CELSIUS

Properties
==========

Configuration, status and telemetry download from the device is handled using a number of property variables. Each variable has a type (signed/unsigned integers, floating point numbers, strings, etc.) and a default value. Some properties are used for configuration and can be modified and stored in (optionally write-protected) non-volatile memory. Others are read-only and used for telemetry purposes. Some property changes take effect immediately, while others require a store and a system reset after update.

The system properties are divided into a number of property groups, each covering a specific part of the firmware. 

Property values can be listed, modified and stored using the ``prop`` debug shell commands or remotely through the :ref:`prop-client`.  As an example, to change the CSP address of the device to 21 and the default interface to RS422/KISS, run:

.. code-block:: none

    [polaris] prop get sys.csp.address
    23
    [polaris] prop set sys.csp.address 21
    [polaris] prop set sys.csp.routes "0/0 KISS"
    [polaris] prop unlock sys
    [polaris] prop save sys
    [polaris] prop unlock -f sys
    [polaris] prop save -f sys
    [polaris] reboot
    ...
    [polaris] prop get sys.csp.address
    21 
    [polaris] prop get sys.csp.routes
    "0/0 KISS"

System Group
------------

The ``sys`` group contains system parameters which remain fixed after launch. The group can be stored twice in ``boot`` and ``fallback`` configuration. Both are write-protected and must be unlocked using ``prop unlock sys`` before they can be written to.

=====================   =========   =========   =======================================
Property                Type        Default     Description
=====================   =========   =========   =======================================
sys.name                string      polaris     String name for system
sys.serial              uint32      ---         Serial number/ID of the device
sys.sw.version          uint32      ---         Running software version
sys.bootcount           uint32      ---         Number of times the system was booted
sys.csp.address         uint8       23          CSP address of the device
sys.csp.routes          string      ---         Additional CSP routes in CIDR notation
sys.can.rate            uint32      1000000     CAN-bus bitrate
sys.uart.rate           uint32      1000000     UART baudrate
sys.uart.multidrop      bool        false       UART multidrop mode (only drive bus on transmit)
=====================   =========   =========   =======================================

Configuration Group
-------------------

The ``conf`` group contains runtime settings.  The group can be stored to the ``boot`` configuration and is not write protected.

=====================   =========   ==========   =======================================
Property                Type        Default      Description
=====================   =========   ==========   =======================================
conf.led.enable         bool        false        Onboard LEDs enabled
conf.power.fpga         bool        false [1]_   FPGA power channel
conf.power.rf           bool        false [1]_   RF power channel
conf.power.sdcard       bool        false        SD-card power channel
conf.power.eth          bool        false        Ethernet power channel
conf.fs.mount           bool        false        SD-card filesystem mount
=====================   =========   ==========   =======================================

.. [1] The power channels are powered off at boot time, but powered on when the demodulator starts.

Telemetry Group
---------------

Telemetry values are stored in the ``tm`` group and updated once every second. The group does not support storage.

=====================   =========   =========   ===========================================
Property                Type        Default     Description
=====================   =========   =========   ===========================================
tm.temp.mcu             int16       0           MCU package temperature in 1/100 |degc|
tm.temp.fpga            int16       0           FPGA junction temperature in 1/100 |degc|
tm.temp.power           int16       0           Power regulators temperature in 1/100 |degc|
tm.temp.lna             int16       0           LNA temperature in 1/100 |degc|
tm.temp.adc             int16       0           ADC temperature in 1/100 |degc|
tm.temp.sdcard          int16       0           SD-card temperature in 1/100 |degc|
tm.volt.vin             uint16      0           Input voltage in mV
tm.volt.3v3             uint16      0           3.3 V rail voltage in mV
tm.volt.2v0             uint16      0           2.0 V rail voltage in mV
tm.volt.1v0             uint16      0           1.0 V rail voltage in mV
tm.cur.vin              int16       0           Input current in mA
tm.cur.3v3              int16       0           3.3 V rail current in mA
tm.cur.2v0              int16       0           2.0 V rail current in mA
tm.cur.1v0              int16       0           1.0 V rail current in mA
tm.power.vin            uint16      0           Input power in mW
tm.power.3v3            uint16      0           3.3 V rail power in mW
tm.power.2v0            uint16      0           2.0 V rail power in mW
tm.power.1v0            uint16      0           1.0 V rail power in mW
=====================   =========   =========   ===========================================

Demodulator Group
-----------------

The ``demod`` group contains configuration and information on the demodulator. The group can be stored to the ``boot`` configuration and is not write protected.

=====================   =========   =========   =======================================
Property                Type        Default     Description
=====================   =========   =========   =======================================
demod.enable            bool        true        Enable or disable demodulator
demod.filter            uint32      0x20000     Mode-S DF filter. Default is DF17 only.
demod.apframe           uint8       2           Number of frames required to accept AP frames
demod.timeout           uint16      60          Timeout in seconds before ICAOs are purged from cache
demod.decoded           uint32      ---         Number of decoded messages with correct CRC
demod.unknown           uint32      ---         Number of AP frames received from unknown ICAOs
demod.invalid           uint32      ---         Number of frames received with unknown DF type
demod.dropped           uint32      ---         Number of frames dropped due to lack of resources
demod.rate              uint16      ---         Number of frames received in the last second
demod.rate.max          uint16      ---         Maximum number of frames received in one second
demod.rate.avg          uint16      ---         Average number of frames received in one second in the last minute
demod.rf.gain           float       0.0         Front end RF gain in dB
demod.pps.valid         bool        ---         Valid PPS signal received
demod.pps.last          uint32      ---         Number of sample clocks in last PPS cycle
demod.pps.avg           uint32      ---         Average number of sample clocks in PPS cycle
=====================   =========   =========   =======================================

Store Group
-----------

The ADS-B message store is controlled and monitored through the ``store`` group. The group can be stored to the ``boot`` configuration and is not write protected.

=====================   =========   =========   =======================================
Property                Type        Default     Description
=====================   =========   =========   =======================================
store.enable            bool        true        Enable or disable message store
store.seq               uint32      ---         Last sequence number stored
store.stored            uint32      ---         Number of frames currently stored
store.dropped           uint32      ---         Number of frames dropped due to lack of resources
=====================   =========   =========   =======================================
