1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00
sdrangel/plugins/feature/pertester
2024-05-19 19:44:45 +02:00
..
CMakeLists.txt Update CMakeLists.txt to support both Qt5 and Qt6. Add option ENABLE_QT6 2022-11-17 14:34:54 +00:00
pertester.cpp Do not create a Message if there is no worker to send to 2024-05-19 19:44:45 +02:00
pertester.h Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
pertestergui.cpp Remove unused includes and use more direct includes 2024-04-11 23:31:34 +02:00
pertestergui.h Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
pertestergui.ui Massive UI revamping (v7): Fixed sizing of feature windows. Part of #1209 2022-04-24 19:34:48 +02:00
pertesterplugin.cpp Updated versions and changelogs 2024-04-14 11:41:00 +02:00
pertesterplugin.h Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
pertesterreport.h Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
pertestersettings.cpp Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
pertestersettings.h Remove unused includes and use more direct includes 2024-04-20 19:10:18 +02:00
pertesterwebapiadapter.cpp Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
pertesterwebapiadapter.h Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
pertesterworker.cpp Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
pertesterworker.h Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
readme.md Fix spellling errors found with aspell 2024-04-26 21:18:32 +02:00

Packer Error Rate (PER) Tester Feature Plugin

Introduction

The Packet Error Rate (PER) Tester feature can be used to measure the packet error rate over digital, packet based protocols such as AX.25 (Packet mod/demod), LoRa (ChirpChat mod/demod), AIS and 802.15.4.

The PER Tester feature allows you to define the contents of the packets to transmit, which can include a per-packet 32-bit identifier, as well as a user-defined or random payload, how many packets are sent and the interval between them.

Packets are sent and received from the feature to modulators and demodulators via UDP. This allows the transmitter or receiver to be connected to remote computer.

Interface

PER Tester feature plugin GUI

1: Start/Stop plugin

This button starts or stops the PER test. If when starting the test, the number of transmitted packets is equal to the number of packets to transmit, the statistics will be reset and the test restarted. Otherwise, the test will be resumed.

2: Reset Statistics

Pressing the reset statistics button will clear the number of packets transmitted and received.

3: Packets

Specify the number of packets to transmit.

4: Start test

Controls when the test is started, after the start button (1) is pressed. This can be either:

  • Immediately
  • On satellite AOS (Acquisition of signal)
  • On satellite mid pass ((AOS-LOS)/2)

When either satellite option is selected, the Satellites field appears, allowing you to enter the names of satellites which should start the test.

5: Interval

Specify the interval in seconds between packet transmissions.

6: Packet

Specify the contents of the packet to transmit and expect to be received. Data should be entered in hexadecimal bytes (E.g: 00 11 22 33 44).

The exact format required will depend on the underlying protocol being used. For AX.25 using the Packet modulator, LoRa using the ChirpChat modulator, AIS and 802.15.4, it is not necessary to include the trailing CRC, as this is appended automatically by the SDRangel modulators.

Aside from hex values, a number of variables can be used:

  • %{num} - Inserts a 32-bit packet identifier, that counts from 0 to the number of packets to be transmitted minus 1.
  • %{data=n,m} - Inserts a random number of bytes, ranging in length from n to m bytes.
  • %{ax25.dst=MYCALL} - Encodes the callsign MYCALL as an AX.25 destination address.
  • %{ax25.src=MYCALL} - Encodes the callsign MYCALL as an AX.25 source address.
  • "some text" - Encode the string contained within the quotes as ASCII.

As an example, for AX.25, the following packet could be used:

%{ax25.dst=MYCALL} %{ax25.src=MYCALL} 03 f0 %{num} "Hello" %{data=0,100}

This:

  • Encodes MYCALL as a 7-byte AX.25 destination address.
  • Encodes MYCALL as a 7-byte AX.25 source address.
  • Inserts hex value 0x03.
  • Inserts hex value 0xf0.
  • Inserts a 32-bit packet identifier.
  • Inserts the 5 bytes of the ASCII encoding of Hello.
  • Inserts a random payload of between 0 and 100 bytes.

7: Ignore Leading and Trailing bytes

When the PER Tester receives a packet, it compares it against a list of packets that it has transmitted. The ignore Leading and Trailing bytes field, reduce the number of bytes in the received packet, used for this comparison.

This can be used in cases where the demodulator outputs a different byte sequence than what the modulator requires. For example, the Packet Modulator does not require the CRC to be included, but the Packet Demodulator includes the CRC in the packet it outputs. Therefore, for the packet to match, the trailing two bytes should be ignored.

  • For AX.25 (with Packet mod/demod), set Leading to 0 and Trailing to 2.
  • For LoRa (with ChirpChat mod/demod), set Leading to 0 and Trailing to 0.
  • For AIS set Leading to 0 and Trailing to 0.

8: TX UDP port

Specifies the IP address and UDP port number of the modulator to send to packets to, to be transmitted.

9: RX UDP port

Specifies the IP address and UDP port number of the demodulator to receive packets from.

Statistics

The statistics fields display the statistics for the current test:

  • Transmitted - number of packets transmitted.
  • Received and Matched - number of packets received that matched a packet that was transmitted.
  • Received and Unmatched - number of packets received that did not match a packet that was transmitted.
  • PER - packet error rate - calculated as 100-(matched/transmitted)*100.

API

Full details of the API can be found in the Swagger documentation. Here is a quick example of how to set the azimuth and elevation from the command line:

curl -X PATCH "http://127.0.0.1:8091/sdrangel/featureset/feature/0/settings" -d '{"featureType": "PERTester",  "PERTesterSettings": { "packetCount": 100 }}'

To start sending the test:

curl -X POST "http://127.0.0.1:8091/sdrangel/featureset/feature/0/run"