Hi, This patch adds itone data to the status message packet.
This feature is useful for 'digital transceivers' as they NO longer need to rely on the AFP-FSK technique, which introduces a non-zero error into the transmitted tone values. While this approach is not as transparent as the AFP-FSK technique, it eliminates the non-zero error associated with AFP-FSK. As an alternate approach, the 'digital transceivers' can use ft8_lib to derive the tones from the 'm_currentMessage' data, which is already a part of the status message packet. However, ft8_lib is currently unable to handle all the possible types of input messages. Related: - https://github.com/kholia/Easy-Transceiver/ (PDX++ design and others) - https://qrpguys.com/qrpguys-digital-fsk-transceiver-iii - https://github.com/agustinmartino/wsjtx_transceiver_interface - https://github.com/agustinmartino/wsjt_transceiver Testing notes: This patch was tested with following software: - https://github.com/bmo/py-wsjtx software - https://github.com/kholia/py-wsjtx (can show 'itone data') A packet capture file (.pcapng) which has samples of the new UDP status message packets in it can be found at the following URL: https://github.com/kholia/py-wsjtx Thanks for your time, and attention. Cheers, Dhiru (VU3CER / WQ6W)
From 24e9761818a3e4bf8062630d816983997e1ea032 Mon Sep 17 00:00:00 2001 From: Dhiru Kholia <dhiru.kholia@gmail.com> Date: Sun, 31 Oct 2021 11:36:48 +0530 Subject: [PATCH] [PATCH v1] Add itone data to the status message packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This feature is useful for 'digital transceivers' as they NO longer need to rely on the AFP-FSK technique, which introduces a non-zero error into the transmitted tone values. While this approach is not as transparent as the AFP-FSK technique, it eliminates the non-zero error associated with AFP-FSK. As an alternate approach, the 'digital transceivers' can use ft8_lib to derive the tones from the 'm_currentMessage' data, which is already a part of the status message packet. However, ft8_lib is currently unable to handle all the possible types of input messages. Related: - https://github.com/kholia/Easy-Transceiver/ (PDX++ design and others) - https://qrpguys.com/qrpguys-digital-fsk-transceiver-iii - https://github.com/agustinmartino/wsjtx_transceiver_interface - https://github.com/agustinmartino/wsjt_transceiver Testing notes: This patch was tested with following software: - https://github.com/bmo/py-wsjtx software - https://github.com/kholia/py-wsjtx (can show 'itone data') A packet capture file (.pcapng) which has samples of the new UDP status message packets in it can be found at the following URL: https://github.com/kholia/py-wsjtx Co-authored-by: Rafał Rozestwiński <rrozestwinski@gmail.com> --- Network/MessageClient.cpp | 7 ++++--- Network/MessageClient.hpp | 2 +- Network/NetworkMessage.hpp | 1 + UDPExamples/MessageServer.cpp | 6 ++++-- UDPExamples/MessageServer.hpp | 3 ++- widgets/mainwindow.cpp | 33 ++++++++++++++++++++++++++++++++- 6 files changed, 44 insertions(+), 8 deletions(-) diff --git a/Network/MessageClient.cpp b/Network/MessageClient.cpp index 1991f1593..fc3998500 100644 --- a/Network/MessageClient.cpp +++ b/Network/MessageClient.cpp @@ -571,7 +571,8 @@ void MessageClient::status_update (Frequency f, QString const& mode, QString con , bool fast_mode, quint8 special_op_mode , quint32 frequency_tolerance, quint32 tr_period , QString const& configuration_name - , QString const& tx_message) + , QString const& tx_message + , QString const& itone_data) { if (m_->server_port_ && !m_->server_.isNull ()) { @@ -581,8 +582,8 @@ void MessageClient::status_update (Frequency f, QString const& mode, QString con << tx_enabled << transmitting << decoding << rx_df << tx_df << de_call.toUtf8 () << de_grid.toUtf8 () << dx_grid.toUtf8 () << watchdog_timeout << sub_mode.toUtf8 () << fast_mode << special_op_mode << frequency_tolerance << tr_period << configuration_name.toUtf8 () - << tx_message.toUtf8 (); - TRACE_UDP ("frequency:" << f << "mode:" << mode << "DX:" << dx_call << "report:" << report << "Tx mode:" << tx_mode << "tx_enabled:" << tx_enabled << "Tx:" << transmitting << "decoding:" << decoding << "Rx df:" << rx_df << "Tx df:" << tx_df << "DE:" << de_call << "DE grid:" << de_grid << "DX grid:" << dx_grid << "w/d t/o:" << watchdog_timeout << "sub_mode:" << sub_mode << "fast mode:" << fast_mode << "spec op mode:" << special_op_mode << "frequency tolerance:" << frequency_tolerance << "T/R period:" << tr_period << "configuration name:" << configuration_name << "Tx message:" << tx_message); + << tx_message.toUtf8 () << itone_data.toUtf8 (); + TRACE_UDP ("frequency:" << f << "mode:" << mode << "DX:" << dx_call << "report:" << report << "Tx mode:" << tx_mode << "tx_enabled:" << tx_enabled << "Tx:" << transmitting << "decoding:" << decoding << "Rx df:" << rx_df << "Tx df:" << tx_df << "DE:" << de_call << "DE grid:" << de_grid << "DX grid:" << dx_grid << "w/d t/o:" << watchdog_timeout << "sub_mode:" << sub_mode << "fast mode:" << fast_mode << "spec op mode:" << special_op_mode << "frequency tolerance:" << frequency_tolerance << "T/R period:" << tr_period << "configuration name:" << configuration_name << "Tx message:" << tx_message << "itone data:" << itone_data); m_->send_message (out, message); } } diff --git a/Network/MessageClient.hpp b/Network/MessageClient.hpp index 3f21a598a..69bada98d 100644 --- a/Network/MessageClient.hpp +++ b/Network/MessageClient.hpp @@ -64,7 +64,7 @@ public: , QString const& dx_grid, bool watchdog_timeout, QString const& sub_mode , bool fast_mode, quint8 special_op_mode, quint32 frequency_tolerance , quint32 tr_period, QString const& configuration_name - , QString const& tx_message); + , QString const& tx_message, QString const& itone_data); Q_SLOT void decode (bool is_new, QTime time, qint32 snr, float delta_time, quint32 delta_frequency , QString const& mode, QString const& message, bool low_confidence , bool off_air); diff --git a/Network/NetworkMessage.hpp b/Network/NetworkMessage.hpp index c211abb0f..9dbc23626 100644 --- a/Network/NetworkMessage.hpp +++ b/Network/NetworkMessage.hpp @@ -161,6 +161,7 @@ * T/R Period quint32 * Configuration Name utf8 * Tx Message utf8 + * Itone Data utf8 * * WSJT-X sends this status message when various internal state * changes to allow the server to track the relevant state of each diff --git a/UDPExamples/MessageServer.cpp b/UDPExamples/MessageServer.cpp index 74090395b..20cab593c 100644 --- a/UDPExamples/MessageServer.cpp +++ b/UDPExamples/MessageServer.cpp @@ -244,10 +244,11 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s quint32 tr_period {quint32_max}; QByteArray configuration_name; QByteArray tx_message; + QByteArray itone_data; in >> f >> mode >> dx_call >> report >> tx_mode >> tx_enabled >> transmitting >> decoding >> rx_df >> tx_df >> de_call >> de_grid >> dx_grid >> watchdog_timeout >> sub_mode >> fast_mode >> special_op_mode >> frequency_tolerance >> tr_period >> configuration_name - >> tx_message; + >> tx_message >> itone_data; if (check_status (in) != Fail) { Q_EMIT self_->status_update (client_key, f, QString::fromUtf8 (mode) @@ -259,7 +260,8 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s , QString::fromUtf8 (sub_mode), fast_mode , special_op_mode, frequency_tolerance, tr_period , QString::fromUtf8 (configuration_name) - , QString::fromUtf8 (tx_message)); + , QString::fromUtf8 (tx_message) + , QString::fromUtf8 (itone_data)); } } break; diff --git a/UDPExamples/MessageServer.hpp b/UDPExamples/MessageServer.hpp index c18cc95fd..4d7217067 100644 --- a/UDPExamples/MessageServer.hpp +++ b/UDPExamples/MessageServer.hpp @@ -97,7 +97,8 @@ public: , QString const& de_call, QString const& de_grid, QString const& dx_grid , bool watchdog_timeout, QString const& sub_mode, bool fast_mode , quint8 special_op_mode, quint32 frequency_tolerance, quint32 tr_period - , QString const& configuration_name, QString const& tx_message); + , QString const& configuration_name, QString const& tx_message + , QString const& itone_data); Q_SIGNAL void client_closed (ClientKey const&); Q_SIGNAL void decode (bool is_new, ClientKey const&, QTime time, qint32 snr, float delta_time , quint32 delta_frequency, QString const& mode, QString const& message diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 783afb7fe..f3077db18 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1090,6 +1090,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, void MainWindow::not_GA_warning_message () { + MessageBox::critical_message (this, "This is a pre-release version of WSJT-X 2.7.0-rc2 made\n" "available for testing purposes. By design it will\n" @@ -9292,6 +9293,36 @@ void MainWindow::statusUpdate () const { tr_period = quint32_max; } + + // Collect itone data to send in the status message packet + char str[MAX_NUM_SYMBOLS+1]; + int i = 0, index = 0, num_symbols = 0; + if ("JT4" == m_mode) + num_symbols = NUM_JT4_SYMBOLS; + else if ("JT65" == m_mode) + num_symbols = NUM_JT65_SYMBOLS; + else if ("JT9" == m_mode) + num_symbols = NUM_JT9_SYMBOLS; + else if ("WSPR" == m_mode) + num_symbols = NUM_WSPR_SYMBOLS; + else if ("MSK144" == m_mode) + num_symbols = NUM_MSK144_SYMBOLS; + else if ("Q65" == m_mode) + num_symbols = NUM_Q65_SYMBOLS; + else if ("FT8" == m_mode) + num_symbols = NUM_FT8_SYMBOLS; + else if ("FT4" == m_mode) + num_symbols = NUM_FT4_SYMBOLS; + else if ("FST4" == m_mode) + num_symbols = NUM_FST4_SYMBOLS; + else if ("CW" == m_mode) + num_symbols = NUM_CW_SYMBOLS; + if (m_transmitting) + for (i = 0; i < num_symbols; i++) + index += snprintf(&str[index], MAX_NUM_SYMBOLS+1-index, "%d", itone[i]); + else + str[0] = 0; + m_messageClient->status_update (m_freqNominal, m_mode, m_hisCall, QString::number (ui->rptSpinBox->value ()), m_mode, ui->autoButton->isChecked (), @@ -9302,7 +9333,7 @@ void MainWindow::statusUpdate () const submode != QChar::Null ? QString {submode} : QString {}, m_bFastMode, static_cast<quint8> (m_specOp), ftol, tr_period, m_multi_settings->configuration_name (), - m_currentMessage); + m_currentMessage, str); } void MainWindow::childEvent (QChildEvent * e) -- 2.34.1
_______________________________________________ wsjt-devel mailing list wsjt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wsjt-devel