DUDE-Star (RX) projects and hack fix for Pi-Star DMR->YSF

Discussion in 'Homebrew and Kit Projects' started by AD8DP, Sep 9, 2019.

ad: L-HROutlet
ad: l-rl
ad: Left-2
ad: Left-3
ad: L-MFJ
ad: Subscribe
  1. AD8DP

    AD8DP Ham Member QRZ Page

    Howdy Hamsters,

    I have been working on a cool project lately for digital modes. I call it DUDE-Star, which is a combination of software and hardware of my design, to RX and TX various digital modes, both over the Internet and ultimate over RF using, for example, an old analog radio with a packet radio interface or access to the discriminator (RX) and RF Amp (TX). I have created a software only version of all this for monitoring various modes, which I call DUDE-Star RX. My primary development platform is Linux, which the source code was written on. I have included a Windows executable at Github as well, and there is an android version of this on the Google Play store called DROID-Star. The links and more info can be found at my QRZ page.

    While working on Fusion TX support, I struggled with an issue where my transmissions would only be heard by people connected directly to the same YSF reflector as me, and would be rejected by Wires-X and not reach any users and repeaters on the other end of these nodes. After resolving this issue I learned that the same issue exists for hamsters that use the MMDVM based hotspots like Pi-Star to transmit to Fusion reflectors with a DMR radio. The software that interacts with MMDVMHost to do this is called DMR2YSF. I studied the source code for this software to learn how to add Fusion TX ability to my gadget, so it was no surprise to me that my gadget suffered from the same problem as the DMR2YSF users. From what I have been told, this is a relatively new issue, and appeared with some recent updates to the Wires-X server software.

    The issue is that with this new version of the Wires-X server software being used out there, the server will reject Fusion Internet frames that are not sent with a CM (Call Mode) of 1 (RadioID mode) in the FICH (Frame Info CHannel). This mode requires that a Yaesu Fusion Radio ID be correctly defined in the Internet frames. The diff file referenced below shows the changes I made to the DMR2YSF source code that, when built and used in place of the stock DMR2YSF executable binary, allows DMR users to be heard across Wires-X nodes and out repeaters, over RF, etc.

    It should be understood that this is not really a 'fix', because that implies that something is wrong with the existing software. This can better be described as a mod or a hack. This works by sending a bogus radio ID over the internet to trick servers into thinking that the TX originates from a real Fusion radio. Is it appropriate to do this? My position on this subject is that in ham radio, anything goes. The basis for this hobby is experimentation, reverse engineering, hacking, tinkering, and so on. I have no interest in the feelings of any major corporation like Yaesu, in the event that they disagree. That being said, here is a step-by-step procedure on how to apply this 'hack' to a pi-star. I use a made up radio ID of H0000 in this example. A great explanation of the Yaesu radio ID format is detailed in this document from K9EQ:
    http://www.hamoperator.com/Fusion/FusionFiles/K9EQ-FUSION-PDF-0014_Fusion_Identification.pdf

    The text below is from a ssh session where I log in and perform the following steps. Notice that I make a copy of the stock executable that I replace, so that the system can be restored to stock very easily if desired. The software chages are provided as a diff file (for differences) that I uploaded to my own web server, and download with the wget command. It is applied to the stock source code with the 'patch' command:
    • rpi-rw (creates read-write filesystem)
    • mkdir src (make a new dir called 'src' where I will download the source code and build)
    • cd src (enter this directory)
    • git clone https://github.com/juribeparada/MMDVM_CM.git (pull source from github)
    • cd MMDVM_CM (enter source dir)
    • wget http://www.dudetronics.com/radio/dmr2ysf.diff (download my software patch)
    • patch -p1 < dmr2ysf.diff (apply patch to source code)
    • cd DMR2YSF (enter DMR2YSF source dir, we dont need the other programs in this github repo)
    • make (build the software)
    • sudo mv /usr/local/bin/DMR2YSF /usr/local/bin/DMR2YSF.bak (backup stock binary)
    • sudo cp DMR2YSF /usr/local/bin (copy new binary to the system)
    Reboot the pi-star after this, and you should be good to go. You can view the diff file to see the C++ code changes here:
    http://www.dudetronics.com/radio/dmr2ysf.diff

    The text below is the entire process from a Linux terminal. All text inputted by me is bold:
    $ ssh -lpi-star x.x.x.x
    pi-star@10.0.0.11's password:
    Linux pi-star 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l

    The Pi-Star Dashboard can be found at one of the following locations:
    http://pi-star/ http://pi-star.local/ http://2601:406:5100:4f70::26/

    Pi-Star's disk is read-only by default, enable read-write with "rpi-rw".
    Pi-Star built by Andy Taylor (MW0MWZ), pi-star tools all start "pistar-".

    Welcome to Pi-Star: v4.1.0-RC4

    Last login: Mon Sep 9 12:28:08 2019 from 10.0.0.9
    pi-star@pi-star(ro):~$ rpi-rw
    pi-star@pi-star(rw):~$ mkdir src
    pi-star@pi-star(rw):~$ cd src
    pi-star@pi-star(rw):src$ git clone https://github.com/juribeparada/MMDVM_CM.git
    Cloning into 'MMDVM_CM'...
    remote: Enumerating objects: 8, done.
    remote: Counting objects: 100% (8/8), done.
    remote: Compressing objects: 100% (8/8), done.
    remote: Total 642 (delta 0), reused 0 (delta 0), pack-reused 634
    Receiving objects: 100% (642/642), 1.09 MiB | 3.08 MiB/s, done.
    Resolving deltas: 100% (454/454), done.
    pi-star@pi-star(rw):src$ cd MMDVM_CM
    pi-star@pi-star(rw):MMDVM_CM$ wget http://www.dudetronics.com/radio/dmr2ysf.diff
    --2019-09-09 14:07:36-- http://www.dudetronics.com/radio/dmr2ysf.diff
    Resolving www.dudetronics.com (www.dudetronics.com)... 69.163.164.85
    Connecting to www.dudetronics.com (www.dudetronics.com)|69.163.164.85|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 3932 (3.8K) [text/x-diff]
    Saving to: ‘dmr2ysf.diff’

    dmr2ysf.diff 100%[============================================================================================================================>] 3.84K --.-KB/s in 0.001s

    2019-09-09 14:07:37 (5.23 MB/s) - ‘dmr2ysf.diff’ saved [3932/3932]

    pi-star@pi-star(rw):MMDVM_CM$ patch -p1 < dmr2ysf.diff
    patching file DMR2YSF/DMR2YSF.cpp
    patching file DMR2YSF/YSFFICH.cpp
    patching file DMR2YSF/YSFFICH.h
    pi-star@pi-star(rw):MMDVM_CM$ cd DMR2YSF
    pi-star@pi-star(rw):DMR2YSF$ make
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o BPTC19696.o BPTC19696.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Conf.o Conf.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o CRC.o CRC.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o DMRLookup.o DMRLookup.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o DMREMB.o DMREMB.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o DMREmbeddedData.o DMREmbeddedData.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o DMR2YSF.o DMR2YSF.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o DMRFullLC.o DMRFullLC.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o MMDVMNetwork.o MMDVMNetwork.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o DMRLC.o DMRLC.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o DMRSlotType.o DMRSlotType.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o DMRData.o DMRData.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Golay2087.o Golay2087.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Golay24128.o Golay24128.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Hamming.o Hamming.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Log.o Log.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o ModeConv.o ModeConv.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Mutex.o Mutex.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o QR1676.o QR1676.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o RS129.o RS129.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o StopWatch.o StopWatch.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Sync.o Sync.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o SHA256.o SHA256.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Thread.o Thread.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Timer.o Timer.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o UDPSocket.o UDPSocket.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o Utils.o Utils.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o YSFConvolution.o YSFConvolution.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o YSFFICH.o YSFFICH.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o YSFNetwork.o YSFNetwork.cpp
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o YSFPayload.o YSFPayload.cpp
    g++ BPTC19696.o Conf.o CRC.o DelayBuffer.cpp DMRLookup.o DMREMB.o DMREmbeddedData.o DMR2YSF.o DMRFullLC.o MMDVMNetwork.o DMRLC.o DMRSlotType.o DMRData.o Golay2087.o Golay24128.o Hamming.o Log.o ModeConv.o Mutex.o QR1676.o RS129.o StopWatch.o Sync.o SHA256.o Thread.o Timer.o UDPSocket.o Utils.o YSFConvolution.o YSFFICH.o YSFNetwork.o YSFPayload.o -g -O3 -Wall -std=c++0x -pthread -lm -lpthread -o DMR2YSF
    pi-star@pi-star(rw):DMR2YSF$ sudo mv /usr/local/bin/DMR2YSF /usr/local/bin/DMR2YSF.bak
    pi-star@pi-star(rw):DMR2YSF$ sudo cp DMR2YSF /usr/local/bin
    pi-star@pi-star(rw):DMR2YSF$
     
    Last edited: Sep 9, 2019
    AF6IF likes this.
  2. N8PWM

    N8PWM XML Subscriber QRZ Page

    Good morning! First, thank you for your work on this project. I am trying to install the patch and new binary however, I am running into an issue. I have included the outputs below from the session. Any help you can provide would be greatly appreciated.

    Pi-STAR VERSION: 3.4.17

    pi-star@pi-star(ro):~$ rpi-rw
    pi-star@pi-star(rw):~$ mkdir src
    pi-star@pi-star(rw):~$ cd src
    pi-star@pi-star(rw):src$ git clone https://github.com/juribeparada/MMDVM_CM.git
    Cloning into 'MMDVM_CM'...
    remote: Enumerating objects: 8, done.
    remote: Counting objects: 100% (8/8), done.
    remote: Compressing objects: 100% (8/8), done.
    remote: Total 642 (delta 0), reused 0 (delta 0), pack-reused 634
    Receiving objects: 100% (642/642), 1.09 MiB | 1.86 MiB/s, done.
    Resolving deltas: 100% (454/454), done.
    Checking connectivity... done.
    pi-star@pi-star(rw):src$ cd MMDVM_CM/
    pi-star@pi-star(rw):MMDVM_CM$ wget http://dudetronics.com/radio/dmr2ysf.diff
    --2019-09-21 09:24:42-- http://dudetronics.com/radio/dmr2ysf.diff
    Resolving dudetronics.com (dudetronics.com)... 69.163.164.85
    Connecting to dudetronics.com (dudetronics.com)|69.163.164.85|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: http://www.dudetronics.com/radio/dmr2ysf.diff [following]
    --2019-09-21 09:24:43-- http://www.dudetronics.com/radio/dmr2ysf.diff
    Resolving www.dudetronics.com (www.dudetronics.com)... 69.163.164.85
    Reusing existing connection to dudetronics.com:80.
    HTTP request sent, awaiting response... 200 OK
    Length: 5444 (5.3K) [text/x-diff]
    Saving to: ‘dmr2ysf.diff’

    dmr2ysf.diff 100%[=======================================================================================================================>] 5.32K --.-KB/s in 0s

    2019-09-21 09:24:43 (15.1 MB/s) - ‘dmr2ysf.diff’ saved [5444/5444]

    pi-star@pi-star(rw):MMDVM_CM$ patch -p1 < dmr2ysf.diff
    patching file DMR2YSF/DMR2YSF.cpp
    patching file DMR2YSF/YSFFICH.cpp
    patching file DMR2YSF/YSFFICH.h
    pi-star@pi-star(rw):MMDVM_CM$ cd DMR2YSF/
    pi-star@pi-star(rw):DMR2YSF$ make
    g++ -g -O3 -Wall -std=c++0x -pthread -c -o BPTC19696.o BPTC19696.cpp
    g++: internal compiler error: Segmentation fault (program cc1plus)
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
    Makefile:19: recipe for target 'BPTC19696.o' failed
    make: *** [BPTC19696.o] Error 4
     
  3. N8PWM

    N8PWM XML Subscriber QRZ Page

    Got it. I needed to be on the RC version of Pi-Star. Works great! Thanks for the work on this.
     

Share This Page

ad: ProAudio-1