1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-03 07:21:14 -05:00
sdrangel/plugins/feature/pertester
2022-09-20 11:48:25 +01:00
..
CMakeLists.txt Install debug symbols on Windows for debug builds 2022-02-06 12:56:58 +00:00
pertester.cpp #1346: Update threading model in Star Tracker, PER Tester and APRS features 2022-09-20 11:48:25 +01:00
pertester.h #1346: Update threading model in Star Tracker, PER Tester and APRS features 2022-09-20 11:48:25 +01:00
pertestergui.cpp v7: API: added workspace handling for device, spectrum, feature and channel. Implements #1242 2022-05-13 22:24:48 +02:00
pertestergui.h v7: API: added workspace handling for device, spectrum, feature and channel. Implements #1242 2022-05-13 22:24:48 +02: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 main and plugin versions 2022-05-14 13:16:33 +02:00
pertesterplugin.h Add PER tester feature 2021-04-07 20:25:12 +01:00
pertesterreport.h Add PER tester feature 2021-04-07 20:25:12 +01:00
pertestersettings.cpp Massive UI revamping (v7): created configurations with just Features for now 2022-04-05 16:28:07 +02:00
pertestersettings.h Massive UI revamping (v7): created configurations with just Features for now 2022-04-05 16:28:07 +02:00
pertesterwebapiadapter.cpp Add PER tester feature 2021-04-07 20:25:12 +01:00
pertesterwebapiadapter.h Add PER tester feature 2021-04-07 20:25:12 +01:00
pertesterworker.cpp #1346: Update threading model in Star Tracker, PER Tester and APRS features 2022-09-20 11:48:25 +01:00
pertesterworker.h #1346: Update threading model in Star Tracker, PER Tester and APRS features 2022-09-20 11:48:25 +01:00
readme.md Fix typing errors in readme's 2022-05-15 12:39:57 +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 protcols such as AX.25 (Packet mod/demod), LoRa (ChipChat 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 (Acquistion 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, LoRo 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/0/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/0/feature/0/run"