From 08f96bc8af2a014a04710f1149a48e86b1068090 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Wed, 28 Jun 2023 07:11:40 +0200 Subject: [PATCH 1/6] Inclue header in slow data #37 --- DGWVoiceTransmit/VoiceTransmit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DGWVoiceTransmit/VoiceTransmit.cpp b/DGWVoiceTransmit/VoiceTransmit.cpp index eb7f6b3..68ff288 100644 --- a/DGWVoiceTransmit/VoiceTransmit.cpp +++ b/DGWVoiceTransmit/VoiceTransmit.cpp @@ -114,7 +114,7 @@ bool CVoiceTransmit::run() if (!opened) return false; - in_addr address = CUDPReaderWriter::lookup("127.0.0.1"); + in_addr address = CUDPReaderWriter::lookup("192.168.234.2");//CUDPReaderWriter::lookup("127.0.0.1"); unsigned int id = CHeaderData::createId(); @@ -134,7 +134,7 @@ bool CVoiceTransmit::run() if(!m_text.empty()) { slowData = new CSlowDataEncoder(); - // slowData->setHeaderData(*header); + slowData->setHeaderData(*header); if(!m_text.empty()) slowData->setTextData(m_text); if(!m_dprs.empty()) slowData->setGPSData(m_dprs); } From 181d314ed587101475441383884cb6f53e9d8b80 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Wed, 28 Jun 2023 07:32:04 +0200 Subject: [PATCH 2/6] Tmep fix for #37, corrupts slow data, needs improvment --- DGWVoiceTransmit/VoiceTransmit.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/DGWVoiceTransmit/VoiceTransmit.cpp b/DGWVoiceTransmit/VoiceTransmit.cpp index 68ff288..38b93ff 100644 --- a/DGWVoiceTransmit/VoiceTransmit.cpp +++ b/DGWVoiceTransmit/VoiceTransmit.cpp @@ -132,7 +132,9 @@ bool CVoiceTransmit::run() header->setRptCall2(m_callsign); header->setDestination(address, G2_DV_PORT); - if(!m_text.empty()) { + bool overrideSlowData = !m_text.empty(); + + if(overrideSlowData) { slowData = new CSlowDataEncoder(); slowData->setHeaderData(*header); if(!m_text.empty()) slowData->setTextData(m_text); @@ -152,6 +154,8 @@ bool CVoiceTransmit::run() while (loop) { unsigned int needed = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - start).count(); needed /= DSTAR_FRAME_TIME_MS; + unsigned char buffer[DV_FRAME_LENGTH_BYTES]; + unsigned char slowDataBuffer[DATA_FRAME_LENGTH_BYTES]; while (out < needed) { CAMBEData* ambe = m_store->getAMBE(); @@ -172,19 +176,23 @@ bool CVoiceTransmit::run() break; } - if(slowData != nullptr) { // Override slowdata if specified so - unsigned char buffer[DV_FRAME_LENGTH_BYTES]; - ambe->getData(buffer, DV_FRAME_LENGTH_BYTES); - + ambe->getData(buffer, DV_FRAME_LENGTH_BYTES); + if(overrideSlowData) { // Override slowdata if specified so // Insert sync bytes when the sequence number is zero, slow data otherwise if (seqNo == 0U) { ::memcpy(buffer + VOICE_FRAME_LENGTH_BYTES, DATA_SYNC_BYTES, DATA_FRAME_LENGTH_BYTES); } else { slowData->getInterleavedData(buffer + VOICE_FRAME_LENGTH_BYTES); } - ambe->setData(buffer, DV_FRAME_LENGTH_BYTES); } + else { + if(seqNo == 0U) { + ::memcpy(slowDataBuffer, buffer + VOICE_FRAME_LENGTH_BYTES, DATA_FRAME_LENGTH_BYTES); + ::memcpy(buffer + VOICE_FRAME_LENGTH_BYTES, DATA_SYNC_BYTES, DATA_FRAME_LENGTH_BYTES); + ambe->setData(buffer, DV_FRAME_LENGTH_BYTES); + } + } ambe->setSeq(seqNo); ambe->setDestination(address, G2_DV_PORT); From 63f83305965ba2abd3dd5795d0d60b3b31edcf3b Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 1 Jul 2023 07:39:19 +0200 Subject: [PATCH 3/6] Simplify code #37 --- DGWVoiceTransmit/VoiceTransmit.cpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/DGWVoiceTransmit/VoiceTransmit.cpp b/DGWVoiceTransmit/VoiceTransmit.cpp index 38b93ff..9e36968 100644 --- a/DGWVoiceTransmit/VoiceTransmit.cpp +++ b/DGWVoiceTransmit/VoiceTransmit.cpp @@ -114,7 +114,7 @@ bool CVoiceTransmit::run() if (!opened) return false; - in_addr address = CUDPReaderWriter::lookup("192.168.234.2");//CUDPReaderWriter::lookup("127.0.0.1"); + in_addr address = CUDPReaderWriter::lookup("127.0.0.1"); unsigned int id = CHeaderData::createId(); @@ -155,7 +155,6 @@ bool CVoiceTransmit::run() unsigned int needed = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - start).count(); needed /= DSTAR_FRAME_TIME_MS; unsigned char buffer[DV_FRAME_LENGTH_BYTES]; - unsigned char slowDataBuffer[DATA_FRAME_LENGTH_BYTES]; while (out < needed) { CAMBEData* ambe = m_store->getAMBE(); @@ -177,23 +176,14 @@ bool CVoiceTransmit::run() } ambe->getData(buffer, DV_FRAME_LENGTH_BYTES); - if(overrideSlowData) { // Override slowdata if specified so - // Insert sync bytes when the sequence number is zero, slow data otherwise - if (seqNo == 0U) { - ::memcpy(buffer + VOICE_FRAME_LENGTH_BYTES, DATA_SYNC_BYTES, DATA_FRAME_LENGTH_BYTES); - } else { - slowData->getInterleavedData(buffer + VOICE_FRAME_LENGTH_BYTES); - } - ambe->setData(buffer, DV_FRAME_LENGTH_BYTES); + // Insert sync bytes when the sequence number is zero, slow data otherwise + if (seqNo == 0U) { + ::memcpy(buffer + VOICE_FRAME_LENGTH_BYTES, DATA_SYNC_BYTES, DATA_FRAME_LENGTH_BYTES); + } else if (overrideSlowData) { + slowData->getInterleavedData(buffer + VOICE_FRAME_LENGTH_BYTES); } - else { - if(seqNo == 0U) { - ::memcpy(slowDataBuffer, buffer + VOICE_FRAME_LENGTH_BYTES, DATA_FRAME_LENGTH_BYTES); - ::memcpy(buffer + VOICE_FRAME_LENGTH_BYTES, DATA_SYNC_BYTES, DATA_FRAME_LENGTH_BYTES); - ambe->setData(buffer, DV_FRAME_LENGTH_BYTES); - } - } - + ambe->setData(buffer, DV_FRAME_LENGTH_BYTES); + ambe->setSeq(seqNo); ambe->setDestination(address, G2_DV_PORT); ambe->setEnd(false); From d19a44127f609d89949bf9aa21f7f0ccae319eac Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 1 Jul 2023 07:39:44 +0200 Subject: [PATCH 4/6] Update launch parameters #37 --- .vscode/launch.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ae32c96..0c7b9c8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -109,7 +109,8 @@ "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/DGWVoiceTransmit/dgwvoicetransmit", - "args": ["F4FXL B", "${workspaceFolder}/Sandbox/Announce_F5ZEE__B.dvtool", "-text", "www.F5KAV.fr", "-dprs", "!4858.72N/00736.91Er/"], + "args": ["F5ZEE B", "${workspaceFolder}/Sandbox/french_male.dvtool", "${workspaceFolder}/Sandbox/german_male.dvtool", "-text", "abcdefghij", "-dprs", "!4858.72N/00736.91Er/"], + //"args": ["F5ZEE B", "${workspaceFolder}/Sandbox/french_male.dvtool", "${workspaceFolder}/Sandbox/german_male.dvtool"], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], From 4c9b40be4ff7c85325c4d0f81cdf995973bd6d61 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 1 Jul 2023 07:41:25 +0200 Subject: [PATCH 5/6] Update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f451764..226908d 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,7 @@ The testing framwework used is Google Test. # 5. Version History ## 5.1. Version 0.7 +- [**Bugfix**] Fix #37 Unable to transmit multiple files (DGWVoiceTransmit) ([#37](https://github.com/F4FXL/DStarGateway/issues/37)) - [**Bugfix**] Unknow repeater entries in log when using Icom Hardware ([#34](https://github.com/F4FXL/DStarGateway/issues/34)) - [**Bugfix**] Malformed callsign in some cases when using DV-G (NMEA) ([#33](https://github.com/F4FXL/DStarGateway/issues/33)) - [**Bugfix**] Crash on startup with Icom Hardware. Thanks to Josh AB9FT for reporting the issue.([#31](https://github.com/F4FXL/DStarGateway/issues/31)) From 9cee1b72770b664c2b106cebc4105c871848d38a Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 1 Jul 2023 07:54:55 +0200 Subject: [PATCH 6/6] update readme --- README.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 226908d..1581021 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,14 @@ - [4.1. Work Flow](#41-work-flow) - [4.2. Continuous Integration](#42-continuous-integration) - [5. Version History](#5-version-history) - - [5.1. Version 0.7](#51-version-07) - - [5.2. Version 0.6](#52-version-06) - - [5.3. Version 0.5](#53-version-05) - - [5.4. Version 0.4](#54-version-04) - - [5.5. Version 0.3](#55-version-03) - - [5.6. Version 0.2](#56-version-02) - - [5.7. Version 0.1](#57-version-01) + - [5.1. Version 1.0](#51-version-10) + - [5.2. Version 0.7](#52-version-07) + - [5.3. Version 0.6](#53-version-06) + - [5.4. Version 0.5](#54-version-05) + - [5.5. Version 0.4](#55-version-04) + - [5.6. Version 0.3](#56-version-03) + - [5.7. Version 0.2](#57-version-02) + - [5.8. Version 0.1](#58-version-01) - [6. Future](#6-future) @@ -144,14 +145,15 @@ I have added some basic CI using CircleCI [![F4FXL](https://circleci.com/gh/F4FX The testing framwework used is Google Test. # 5. Version History -## 5.1. Version 0.7 +## 5.1. Version 1.0 - [**Bugfix**] Fix #37 Unable to transmit multiple files (DGWVoiceTransmit) ([#37](https://github.com/F4FXL/DStarGateway/issues/37)) +## 5.2. Version 0.7 - [**Bugfix**] Unknow repeater entries in log when using Icom Hardware ([#34](https://github.com/F4FXL/DStarGateway/issues/34)) - [**Bugfix**] Malformed callsign in some cases when using DV-G (NMEA) ([#33](https://github.com/F4FXL/DStarGateway/issues/33)) - [**Bugfix**] Crash on startup with Icom Hardware. Thanks to Josh AB9FT for reporting the issue.([#31](https://github.com/F4FXL/DStarGateway/issues/31)) - [**Improvement**] Add/Fix DPRS Object support([#28](https://github.com/F4FXL/DStarGateway/issues/28)) - [**Improvement**] Log incoming DPRS frames so they can be used in e.g. dashboards([#29](https://github.com/F4FXL/DStarGateway/issues/29)) -## 5.2. Version 0.6 +## 5.3. Version 0.6 - [**Improvement**] Add DRats Support ([#24](https://github.com/F4FXL/DStarGateway/issues/24)) - [**Improvement**] Add call sign lists ([#22](https://github.com/F4FXL/DStarGateway/issues/22)) - [**Improvement**] Add a way to override Slow Data in VoiceTransmit ([#23](https://github.com/F4FXL/DStarGateway/issues/23)) @@ -159,7 +161,7 @@ The testing framwework used is Google Test. - [**Improvement**] Gracefully exit on SIGINT and SIGTERM ([#21](https://github.com/F4FXL/DStarGateway/issues/21)). DStarGateway can also be run as a "forking" daemon. This might be required for distros still using sysv. Systemd can live without it. - [**Improvement**] Add text transmit utility dgwtexttransmit ([#18](https://github.com/F4FXL/DStarGateway/issues/18)) - [**Improvement**] Add voice transmit utility dgwvoicetransmit ([#18](https://github.com/F4FXL/DStarGateway/issues/18)) -## 5.3. Version 0.5 +## 5.4. Version 0.5 - [**Improvement**] Add remote control utility dgwremotecontrol ([#17](https://github.com/F4FXL/DStarGateway/issues/17)) - [**Bugfix**] Two simultaneous incoming G2 streams would fail to be transmitted on dual band repeaters ([#16](https://github.com/F4FXL/DStarGateway/issues/16)) - [**Improvement**] Add NAT Traversal for G2 and DExtra, using IRCDDB as a Rendez Vous server ([#5](https://github.com/F4FXL/DStarGateway/issues/5)) @@ -167,17 +169,17 @@ The testing framwework used is Google Test. - [**Bugfix**] Failed to download XLX Hosts when URL contains a = sign ([#14](https://github.com/F4FXL/DStarGateway/issues/14)) - [**Bugfix**] Remote control connection failed ([#13](https://github.com/F4FXL/DStarGateway/issues/13)) - [**Bugfix**] Trying to connect to ghost ircDDB when no ircDDB is configured -## 5.4. Version 0.4 +## 5.5. Version 0.4 - [**Improvement**] Add APRS status link feature ([#8](https://github.com/F4FXL/DStarGateway/issues/8)) - [**Bugfix**] Posotions received over radio were not sent to APRS-IS when GPDS connection failed. ([#7](https://github.com/F4FXL/DStarGateway/issues/7)) - [**Improvement**] Bring back GPSD support ([#6](https://github.com/F4FXL/DStarGateway/issues/6)) - [**Improvement**] Log enhancements ([#4](https://github.com/F4FXL/DStarGateway/issues/4)) -## 5.5. Version 0.3 +## 5.6. Version 0.3 - [**Improvement**] Get ride of libcongig++ dependency. When upgrading from earlier version you need to manualy delete the config file before reinstalling. -## 5.6. Version 0.2 +## 5.7. Version 0.2 - [**Bugfix**] ircDDBFreeze when repeater not found ([#1](https://github.com/F4FXL/DStarGateway/issues/1)) - Code sanitization -## 5.7. Version 0.1 +## 5.8. Version 0.1 First working version # 6. Future I started this during my 2021 seasons holiday. It took me almost 8 days to get to a workable version. Here are a couple of stuff I'd like to do :