1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 19:28:47 -05:00
sdrangel/plugins/channeltx/mod802.15.4
Jon Beniston c966f1cb5a dd maximize button to MainSpectrum and expandible Channels and Features.
Add sizeToContents in ChannelGUI and FeatureGUI, called when widget is
rolled, so we can remove resizing code from all of the individual
channels and features.

In RollupContents, use minimumSizeHint for calculated size, so that
minimumWidth can come from .ui file.

In DeviceGUI::sizeToContents(), call adjustSize(), so Device GUIs start
out at minimum needed size (which should restore appearance prior to
last patch).

In stackSubWindows, use available space for channels if no
spectrum/features present.
In stackSubWindows, fix spectrum from being sized too big, resulting in
scroll bars appearing.
Reset user-defined channel width in stackSubWindows, when channels are
removed.
Don't stack maximized windows.

There's one hack in Channel/FeatureGUI::maximizeWindow(). It seems that
when maximimzing a window, QOpenGLWidgets aren't always paint properly
immediately afterwards, so the code forces an additional update. I can't
see why the first call to paintGL doesn't work.
2022-11-11 12:24:27 +00:00
..
CMakeLists.txt Install debug symbols on Windows for debug builds 2022-02-06 12:56:58 +00:00
ieee_802_15_4_macframe.h
ieee_802_15_4_mod.cpp Replace deprecated QMutex(Recursive) with QRecursiveMutex 2022-09-17 23:00:07 +02:00
ieee_802_15_4_mod.h Replace deprecated QMutex(Recursive) with QRecursiveMutex 2022-09-17 23:00:07 +02:00
ieee_802_15_4_modbaseband.cpp Replace deprecated QMutex(Recursive) with QRecursiveMutex 2022-09-17 23:00:07 +02:00
ieee_802_15_4_modbaseband.h Replace deprecated QMutex(Recursive) with QRecursiveMutex 2022-09-17 23:00:07 +02:00
ieee_802_15_4_modgui.cpp dd maximize button to MainSpectrum and expandible Channels and Features. 2022-11-11 12:24:27 +00:00
ieee_802_15_4_modgui.h Massive UI revamping (v7): updated basic channel settings and indicate stream index for MIMO device and single stream channel 2022-04-18 01:42:03 +02:00
ieee_802_15_4_modgui.ui Massive UI revamping (v7): Fixed sizing of channel windows. Part of #1209 2022-04-24 12:28:56 +02:00
ieee_802_15_4_modplugin.cpp Updated main and plugin versions 2022-05-14 13:16:33 +02:00
ieee_802_15_4_modplugin.h
ieee_802_15_4_modrepeatdialog.cpp
ieee_802_15_4_modrepeatdialog.h Fix filename case for Linux 2020-10-08 16:14:29 +01:00
ieee_802_15_4_modrepeatdialog.ui
ieee_802_15_4_modsettings.cpp Massive UI revamping (v7): persistent channel show/hide 2022-04-12 18:27:27 +02:00
ieee_802_15_4_modsettings.h Massive UI revamping (v7): persistent channel show/hide 2022-04-12 18:27:27 +02:00
ieee_802_15_4_modsource.cpp IEEE 802.15.4 modulator: moved UDP handling to IEEE_802_15_4_ModSource 2021-11-17 08:09:54 +01:00
ieee_802_15_4_modsource.h IEEE 802.15.4 modulator: moved UDP handling to IEEE_802_15_4_ModSource 2021-11-17 08:09:54 +01:00
ieee_802_15_4_modtxsettingsdialog.cpp
ieee_802_15_4_modtxsettingsdialog.h Fix filename case for Linux 2020-10-08 16:14:29 +01:00
ieee_802_15_4_modtxsettingsdialog.ui
ieee_802_15_4_modwebapiadapter.cpp Fixed -Wunused-parameter warnings 2020-11-14 11:13:32 +01:00
ieee_802_15_4_modwebapiadapter.h
readme.md Massive UI revamping (v7): Channel window documentation. Show device type name in index tooltip 2022-04-17 10:20:07 +02:00

IEEE 802.15.4 modulator plugin

Introduction

This plugin can be used to transmit IEEE 802.15.4 frames. The 802.15.4 PHY & RF layers are used by networking layers such as ZigBee, 6LoWPAN and others.

Interface

The top and bottom bars of the channel window are described here

802.15.4 Modulator plugin GUI

1: Frequency shift from center frequency of transmission

Use the wheels to adjust the frequency shift in Hz from the center frequency of transmission. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

2: Channel power

Average total power in dB relative to a +/- 1.0 amplitude signal generated in the pass band.

3: Channel mute

Use this button to toggle mute for this channel.

4: PHY

This specifies the parameters of the PHY (physical layer), including the bit rate and modulation that is used for the frame transmission. Supported PHYs are 20kbps BPSK, 40kbps BPSK, 100kpbs <1GHZ O-QPSK, 250kpbs <1GHz O-QPSK and 250kbps 2.4GHz O-QPSK. These 802.15.4 PHYs use DSSS (Direct sequence spread spectrum), whereby multiple chips are transmitted per symbol. This means that a high baseband sample rate and large RF bandwidth is required. The baseband sample rate should be set to an integer multiple of the chip rate (at least 4x). Each PHY is applicable only for specific frequency bands as detailed below:

Channel Page Channels Frequencies (MHz) Bit rate (kbps) Chip rate (kcps) Modulation Shaping Min sample rate (MSa/s)
0 0 868.3 20 300 BPSK RC r=1 1.2
0 1-10 906, 908... 926 40 600 BPSK RC r=1 2.4
0 11-26 2405, 2410... 2480 250 2000 O-QPSK Sine 8
2 0 868.3 100 400 O-QPSK Sine/RC 2.4
2 1-10 906, 908... 926 250 1000 O-QPSK Sine 4
5 0-3 780, 782... 786 250 1000 O-QPSK RC r=.8 4
11 0-6 2363, 2368... 2393 250 2000 O-QPSK Sine 8
11 7-13 2367, 2372... 2397 250 2000 O-QPSK Sine 8
11 14 2395 250 2000 O-QPSK Sine 8

5: Chip rate

This is the chip rate. It must be a multiple of the baseband sample rate and the baseband sample rate should be at least twice the chip rate. If one or both of these conditions are not met the background turns to red and the tooltip details the condition.

6: RF Bandwidth

This specifies the bandwidth of a LPF that is applied to the output signal to limit the RF bandwidth.

PHY Occupied BW (99%)
20kbps BPSK 400kHz
40kbps BPSK 760kHz
100kbps O-QPSK 330kHz
250kbps <1GHz O-QPSK (Sine) 1.2MHz
250kbps <1GHz O-QPSK (RC) 1.2MHz
250kbps >2GHz O-QPSK 2.6MHz

7: Gain

Adjusts the gain in dB from -60 to 0dB. The gain should be set to ensure the level meter remains below 100% (see 8). If the baseband signal clips, this can lead to out-of-band spurious.

8: Level meter in %

  • top bar (beige): average value
  • bottom bar (brown): instantaneous peak value
  • tip vertical bar (bright red): peak hold value

9: UDP input

Check to get data from UDP

10: UDP address and port

This UDP data packets listening address and port

11: Get data in bytes format

Check this if the data received is in bytes. When not checked data is expected in string format as blank separated hex bytes same as data below (12))

12: Data

The frame of data to send as hex bytes. For example, to send a MAC ACK frame, enter "02 00 00". The MAC CRC should not be included, as this is calculated and appended automatically.

In the diagram below this is the blue part without the "frame check sequence". Thus its maximum length is 125 bytes.

802.15.4 Modulator frame

13: Repeat

Check this button to repeatedly transmit a frame. Right click to open the dialog to adjust the delay between retransmission and number of times the frame should be repeated.

14: TX

Transmits a frame containing the payload set in the data field. Right click to open a dialog to adjust transmission details allowing parameters different from standard values.

API

Full details of the API can be found in the Swagger documentation. Below are a few examples:

To transmit current data just send a "tx" action:

curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "IEEE_802_15_4_Mod",  "direction": 1, "IEEE_802_15_4_ModActions": { "tx": 1}}

To transmit a frame from the command line:

curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "IEEE_802_15_4_Mod",  "direction": 1, "IEEE_802_15_4_ModActions": { "tx": 1, "data": "02 00 00" }}'

To set the PHY to 20kbps BPSK:

curl -X PATCH "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/settings" -d '{"channelType": "IEEE_802_15_4_Mod", "direction": 1, "IEEE_802_15_4_ModSettings": {"beta": 1, "bitRate": 20000,
"modulation': 0, "pulseShaping": 0, "rfBandwidth": 400000, "subGHzBand": 1 }}'