diff --git a/README-Tetra b/README-Tetra new file mode 100644 index 00000000..8d1a344f --- /dev/null +++ b/README-Tetra @@ -0,0 +1,37 @@ +* +* Adi Bier / DL1HRC +* dl1hrc { at } gmx . de +* + +This branch only works if you have the following things: + +- Motorola MTM5x00, MTM800E, MTM800FuG +- active data cable, e.g. PMKN4104 +- (Sepura/Cleartone my work, but no warranty) + +The MS is completely controlled by AT-commands over the PEI interface + +Installation instructions from Frédéric/F1IWQ can be found here: +https://github.com/f1iwq2/Tetra_Link_boardIWQ/blob/main/Doc/Download%20svxlink-tetra.pdf + +Here are two quick-and-dirty installation/update documentation, keep +in mind: No configuration will be done! + +1) first time installation (including German(!) voice announcements): + +You may use my semi-automatic installation-script from here +http://svxlink.ham-radio-op.net/svxlink/svxlink-tetra-contrib.sh + +Start installation as root: +wget -O - http://svxlink.ham-radio-op.net/svxlink/svxlink-tetra-contrib.sh | bash + + +2) Update an existing tetra-contrib installation made by the previous script +as root: + +systemctl stop svxlink +cd /home/svxlink/svxlink/src/build/ +git pull +make install +systemctl start svxlink + diff --git a/src/svxlink/reflector/Reflector.cpp b/src/svxlink/reflector/Reflector.cpp index c0671623..5316bd34 100644 --- a/src/svxlink/reflector/Reflector.cpp +++ b/src/svxlink/reflector/Reflector.cpp @@ -966,8 +966,11 @@ void Reflector::writeUserData(std::map userdata) string Reflector::jsonToString(Json::Value eventmessage) { - Json::FastWriter jsontoString; - std::string message = jsontoString.write(eventmessage); + Json::StreamWriterBuilder builder; + std::unique_ptr writer(builder.newStreamWriter()); + std::ostringstream ostream; + writer->write(eventmessage, &ostream); + std::string message = ostream.str(); message.erase(std::remove_if(message.begin(), message.end(), [](unsigned char x){return std::iscntrl(x);})); return message; diff --git a/src/svxlink/svxlink/ReflectorLogic.cpp b/src/svxlink/svxlink/ReflectorLogic.cpp index 66df5059..49b05e94 100644 --- a/src/svxlink/svxlink/ReflectorLogic.cpp +++ b/src/svxlink/svxlink/ReflectorLogic.cpp @@ -1867,8 +1867,11 @@ void ReflectorLogic::handlePlayDtmf(const std::string& digit, int amp, string ReflectorLogic::jsonToString(Json::Value eventmessage) { - Json::FastWriter jsontoString; - std::string message = jsontoString.write(eventmessage); + Json::StreamWriterBuilder builder; + std::unique_ptr writer(builder.newStreamWriter()); + std::ostringstream ostream; + writer->write(eventmessage, &ostream); + std::string message = ostream.str(); message.erase(std::remove_if(message.begin(), message.end(), [](unsigned char x){return std::iscntrl(x);})); return message;