YSF2DMR DMR Master "Options=" GUI tweak

Suggest new features here
Post Reply
M0MZF
Posts: 4
Joined: Tue Jan 21, 2025 9:48 pm

YSF2DMR DMR Master "Options=" GUI tweak

Post by M0MZF »

Hi folks,

Amazing project, thank you and well done! Seen this mentioned in the past on this forum and am wondering what your thoughts are on a GUI addition for this functionality. I'm running 4.2.1 on a Pi 3B+ with an MMDVM_HS_DUAL_HAT (GPIO) with 1.6.1 firmware

I'm connecting to an IPSC2+ DMR Master (Phoenix DVSPh-F) and would like to set a single static talkgroup so I can always monitor this TG using my Yaesu radio. Without this I have to key up first to monitor the TG, and it subsequently times out after 15 minutes. After doing some google-fu I've edited the ysf2dmr file in my zipfile to include an Options= line, so it now looks like:

Code: Select all

[DMR Network]
StartupDstId=23420
StartupPC=0
Jitter=500
EnableUnlink=1
TGUnlink=4000
PCUnlink=0
Debug=0
TGListFile=/usr/local/etc/TGList_BM.txt
Address=78.129.135.43
Password="PASSWORD"
Options="UserLink=1;TS2_1=23420"
Port=55555
Id=235012999
which works perfectly.

Any chance we can get a GUI form field to set the Options= line? Currently I have to tweak the ZIP file by hand every time I make a config change.

Cheers,
Jason M0MZF
M1DNS
Pi-Star Team
Posts: 1440
Joined: Thu Apr 05, 2018 5:30 am

Re: YSF2DMR DMR Master "Options=" GUI tweak

Post by M1DNS »

From the outset pistar was built to run headless with all access, setup and use provided in a browser which pistar serves across ur home network.
Its also designed to run across all pi hardware from the little Pi zero to a Pi4. Adding any form of hosted gui will kill access to users of their Pi zero (and models will low memory) which are usually the basis of a bought assembled hotspot. These types simply dont have the horsepower to run whats needed of pistar and the added bloat of a GUI.

whilst it could be added and work for users with greater model Pis, it would come as a cost to those using the lesser models, which is something we've always avoided to do.

Pistar 5.** will enclude a new dashboard which will give you more for less (though no release timescale yet) we'll see where that goes before we start excluding users on basis of their hardware choices.


Sent via smoke signals using my SM-G935F


Andrew M1DNS.
Pi-star Admin Team.
M0MZF
Posts: 4
Joined: Tue Jan 21, 2025 9:48 pm

Re: YSF2DMR DMR Master "Options=" GUI tweak

Post by M0MZF »

Thanks for the response Andrew. I don't fully understand the "hosted GUI", is this a reference to some sort of display connected directly to the Pi?

What I am referring to is the addition of an extra form field in the browser configuration web page (which I called the GUI in my previous post) where one can set some DMR master options when operating in YSF2DMR mode.

Cheers,
Jason
M1DNS
Pi-Star Team
Posts: 1440
Joined: Thu Apr 05, 2018 5:30 am

Re: YSF2DMR DMR Master "Options=" GUI tweak

Post by M1DNS »

Ok using the word GUI (graphical user interface) i thought you wanted a graphical user interface.

You want something like the options box in the dmr config, when using dmr, but for YSF2DMR



Sent via smoke signals using my SM-G935F


Andrew M1DNS.
Pi-star Admin Team.
KN2TOD
Posts: 324
Joined: Sun Nov 11, 2018 6:36 pm

Re: YSF2DMR DMR Master "Options=" GUI tweak

Post by KN2TOD »

A "full edit" selection in the Expert panel can be created for the YSF2DMR init file (easily cloned from an existing edit with just a couple of commands), but it will merely function as a kludge around the core problem: certain entries (like Options= and Local=) in various init files are routinely dropped whenever certain reconfigurations are made, such as switching from Direct mode to Gateway mode and back again, or when changes to the addresses of various network blocks (switching from DMR+ to TGIF, for example) are made.

It appears that some of these additional lines were tentative features added in earlier development that have now become regular functionality, so the reasoning behind the automatic removal of these lines may need to be changed in the regular configuration processing.

Perhaps you can shed some light on this, since you are active in this particular cross-modal area: I'm curious if the parameter string you specify for the DMR+ Options= selection in the main configuration panel is the same as the Options= string you are adding to the YSF2DMR config: maybe the full solution is simply cloning (moving) that option string to the appropriate init file during reconfigurations.
M0MZF
Posts: 4
Joined: Tue Jan 21, 2025 9:48 pm

Re: YSF2DMR DMR Master "Options=" GUI tweak

Post by M0MZF »

Hi Folks,

@Andrew - Yes, exactly. Wrong terminology on my part, apologies.

@KN2TOD I'm really glad it was tentatively added, I discovered this by rummaging through old posts on this forum, threw in the line and hey presto, it worked! For posterity here is the thread from 2019 - viewtopic.php?t=1785. I didn't want to necro-bump so fired up a new forum thread.

Indeed, when making various changes through the web interface the by-hand-added "Options=" line is dropped (and furthermore the YSF2DMR mode toggle becomes disabled and must be re-enabled and all the fields re-set up). I've been setting up the pi-star using the web interface, then once it's where I want it I download the configuration, add the "Options=" line to ysf2dmr as above, then upload the tweaked configuration.

The "Options=" string I am adding to the YSF2DMR configuration file is different to the "Options=" string I was previously using for plain DMR+ mode. As Andy MM0MWZ commented in the aforementioned thread when using YSF2DMR only one talkgroup can be active; this is the reasoning for no "Options=" configuration field because the intention is to drive YSF2DMR using the radios' Wires-X functionality. I suspect that blindly cloning the DMR+ "Options=" line to YSF2DMR might generate an undesired effect because folks could well be setting more than one static talkgroup in DMR+ mode, so one may end up with a non-sane, but hidden, configuration.

Cheers,
Jason
KN2TOD
Posts: 324
Joined: Sun Nov 11, 2018 6:36 pm

Re: YSF2DMR DMR Master "Options=" GUI tweak

Post by KN2TOD »

The following patch adds full edits on the YSF2* and DMR* ini files to the Expert panel:

Code: Select all

rpi-rw
cd /var/www/dashboard/admin/expert
#cd /tmp
sudo cp -p /var/www/dashboard/admin/expert/fulledit_dmrgateway.php                      fulledit_ysf2dmr.php
sudo sed -i 's/dmrgateway/ysf2dmr/g'                                                    fulledit_ysf2dmr.php
sudo sed -i 's/fmehg65694eg.tmp/KO9xBc5Gu6sEJP.tmp/g'                                   fulledit_ysf2dmr.php
sudo sed -i 's/DMRGateway/YSF2DMR/g'                                                    fulledit_ysf2dmr.php

sudo cp -p /var/www/dashboard/admin/expert/fulledit_dmrgateway.php                      fulledit_ysf2nxdn.php
sudo sed -i 's/dmrgateway/ysf2nxdn/g'                                                   fulledit_ysf2nxdn.php
sudo sed -i 's/fmehg65694eg.tmp/ih0lq4qmebyeV2.tmp/g'                                   fulledit_ysf2nxdn.php
sudo sed -i 's/DMRGateway/YSF2NXDN/g'                                                   fulledit_ysf2nxdn.php

sudo cp -p /var/www/dashboard/admin/expert/fulledit_dmrgateway.php                      fulledit_ysf2p25.php
sudo sed -i 's/dmrgateway/ysf2p25/g'                                                    fulledit_ysf2p25.php
sudo sed -i 's/fmehg65694eg.tmp/itINyjqkEYPU14.tmp/g'                                   fulledit_ysf2p25.php
sudo sed -i 's/DMRGateway/YSF2p25/g'                                                    fulledit_ysf2p25.php

sudo cp -p /var/www/dashboard/admin/expert/fulledit_dmrgateway.php                      fulledit_dmr2ysf.php
sudo sed -i 's/dmrgateway/dmr2ysf/g'                                                    fulledit_dmr2ysf.php
sudo sed -i 's/fmehg65694eg.tmp/d2BnxIF4WOF51m.tmp/g'                                   fulledit_dmr2ysf.php
sudo sed -i 's/DMRGateway/dmr2ysf/g'                                                    fulledit_dmr2ysf.php

sudo cp -p /var/www/dashboard/admin/expert/fulledit_dmrgateway.php                      fulledit_dmr2nxdn.php
sudo sed -i 's/dmrgateway/dmr2nxdn/g'                                                   fulledit_dmr2nxdn.php
sudo sed -i 's/fmehg65694eg.tmp/mFHiisgxD7aFPc.tmp/g'                                   fulledit_dmr2nxdn.php
sudo sed -i 's/DMRGateway/dmr2nxdn/g'                                                   fulledit_dmr2nxdn.php

#sudo cp -p /var/www/dashboard/admin/expert/header-menu.inc                             header-menu.inc
sudo sed -i '/.*configuration.*/,/^$/ s/ text-align: right; / text-align: center; /g'   header-menu.inc
sudo sed -i 's/.*Tools:.*/    <br \/><b>\&nbsp\&nbsp<\/b>\
    <a href="fulledit_ysf2dmr.php" style="color: #ffffff;">YSF2DMR<\/a> |\
    <a href="fulledit_ysf2nxdn.php" style="color: #ffffff;">YSF2NXDN<\/a> |\
    <a href="fulledit_ysf2p25.php" style="color: #ffffff;">YSF2P25<\/a> |\
    <a href="fulledit_dmr2ysf.php" style="color: #ffffff;">DMR2YSF<\/a> |\
    <a href="fulledit_dmr2nxdn.php" style="color: #ffffff;">DMR2NXDN<\/a><br \/>\
&/g'                                                                                    header-menu.inc
Note that the menu on the Expert panel changes a bit to make room for these new selections.

Embedded in these full edits is a restart on the underlying service task. Whether the restart immediately implements the changes in the options you've made or a full system restart would be required instead, you'll have to test that out.
M0MZF
Posts: 4
Joined: Tue Jan 21, 2025 9:48 pm

Re: YSF2DMR DMR Master "Options=" GUI tweak

Post by M0MZF »

Hi (Mark is it?)

Great stuff, that beats editing the config files by hand; works as intended. It seems that the restart of the underlying service task is enough to reconnect to the DMR+ server with the extra Options= and a full reboot isn't required. Upload & restore configuration works fine, of course making edits in the configuration dashboard breaks the functionality but that's to be expected!

Thank you, really appreciate this patch. My next task is to determine exactly which model of Yaesu radio, running exactly which firmware, can receive properly from the MMDVM when in HRI-200 mode. Proprietary systems, joy of joys... onwards and sideways :roll:

Cheers,
Jason
KN2TOD
Posts: 324
Joined: Sun Nov 11, 2018 6:36 pm

Re: YSF2DMR DMR Master "Options=" GUI tweak

Post by KN2TOD »

Thank you, thank you for the feedback! Without it, there would be no progress!
Indeed, when making various changes through the web interface the by-hand-added "Options=" line is dropped (and furthermore the YSF2DMR mode toggle becomes disabled and must be re-enabled and all the fields re-set up).
You mentioned this before (the disabling), and I've seen it myself during my own machinations a while back, but didn't jot down or remember what exactly I was doing at the time, so I haven't been able to recreate this particular disabling. If you remember, perhaps you could outline for me the steps you took/were taking when you saw this, so I might be able to track it down and see if it can be fixed as well. What all do you have enabled to begin with, before you start re-configuring - what's your starting point/settings?

Thanks in advance.
Post Reply