Page 2 of 2
Re: YSF2DMR DMR Master "Options=" GUI tweak
Posted: Tue Feb 11, 2025 6:27 pm
by KN2TOD
From here if I make any changes to the configuration dashboard (change my DMRID, change the Hotspot TRX frequency, turn off AutoAP, anything from this page) then the following happens:
- YSF2DMR toggle becomes disabled
- Looking in Expert > Full Edit YSF2DMR the extra Options= line is still present
Re-enabling the YSF2DMR toggle then clears out the Full Edit YSF2DMR configuration, DMR+ master, Options= line and all, ready to be set up again.
While in the Full Edit YSF2DMR step above, have you looked at the [ENABLE] section at the bottom of init file? Is it showing "disabled" (zero)? Try setting it back to "1", save, and then continue back to the config panel and see if it's ok (enabled).
Code: Select all
$: cat /etc/ysf2dmr
[Info]
:
[Log]
DisplayLevel=0
FileLevel=0
FilePath=/var/log/pi-star
FileRoot=YSF2DMR
[Enabled]
Enabled=0 <----- (re)set to "1"
Still looking at a fix for all this, but the above could be a possible work-around for the moment. (Assuming it works the way I think it's processing all the selections; let me know.)
Re: YSF2DMR DMR Master "Options=" GUI tweak
Posted: Wed Feb 12, 2025 7:48 am
by M0MZF
Hi Mark,
- Starting from the working configuration I changed something in "General Configuration" (the Town field) and hit apply, thus causing the YSF2DMR toggle to become disabled.
- Then, looking in Expert > Full Edit > YSF2DMR, I see that Enabled=1 still.
- I tried setting it to 0, applying changes, then setting it to 1 again and applying changes.
- No difference on the dashboard after manually setting Enabled=0 and then Enabled=1 again.
It appears that the YSF2DMR toggle remains disabled regardless of the Enabled= configuration line once I've made manual changes to ysf2dmr, then changed something in the configuration dashboard. Good idea though!!
Would SSH-ing to my hotspot help you out for the purposes of tinkering? From there you could run a SOCKS5 tunnel to hit the web interface too. If so DM / email me and I'll get you set up. Or I could send you my Pi-Star_Config_xxx.zip for you to start from, anything you like.
Cheers,
Jason
(edit - Just noticed something. Once I have made the above changes in "General Configuration" which leave the YSF2DMR toggle disabled if I look at the Pi-Star main dashboard I see that "YSF" and "YSF Xmode" are running in the "Modes Enabled" pane, and "YSF Net" and "YSF2DMR" are running in the "Network Status" pane. Indeed, when I look at the DMR+ server monitor I see that I am still statically linked to the DMR TG too. So it appears that the YSF2DMR Enabled=1 configuration is still being "honoured" and the issue lies only with parsing the configuration files for the purposes of displaying them in the config dashboard.)
Re: YSF2DMR DMR Master "Options=" GUI tweak
Posted: Wed Feb 12, 2025 4:59 pm
by KN2TOD
... So it appears that the YSF2DMR Enabled=1 configuration is still being "honoured" and the issue lies only with parsing the configuration files for the purposes of displaying them in the config dashboard.)
Thank you for disabling my tunnel vision!! I've been assuming that the config panel loads all the relevant init's into memory and then displays 'em, without considering that it just might be tweaking some settings before displaying them *and* before committing those settings back to their respective files. With 5000+ lines of code to plow through, I missed that! Thanks for your insight here!
This makes it easier to fix, but harder to find, so it will take me some time to pinpoint the line(s) of code that needs to be changed.
Would SSH-ing to my hotspot help you out for the purposes of tinkering? ...
Appreciate the offer, but this isn't the kind of problem that is amenable to such probing, IMHO. But I do appreciate your willingness to work together on this problem. Your testing and feedback is invaluable.
Re: YSF2DMR DMR Master "Options=" GUI tweak
Posted: Wed Feb 12, 2025 7:45 pm
by M0MZF
Ha I also had massive tunnel vision. Been looking at this for some time now and I never noticed what the actual MMDVM board was up to... confirmation bias. D'oh.
OK on the SSH, just a thought. In your own time, of course, and again, thanks - really appreciate the help!
Cheers,
Jason
Re: YSF2DMR DMR Master "Options=" GUI tweak
Posted: Tue Feb 25, 2025 9:53 pm
by KN2TOD
In my testing, I have not been able to replicate the scenario you outlined above. But I've come to the conclusion that this is because failures in other parts of the configuration process were contributing factors: fixing one error fixes other errors.
The core problem here is, as you've noted, the processing (or lack therein) of the Options= lines in the YSF2DMR config file: this particular line contains special characters (mainly "=") that is causing the rewrites of the config file(s) to blow up (behind the scenes); other processing errors cascade out from this oversight/flaw.
The following patch should correct this:
Code: Select all
rpi-rw
cd /var/www/dashboard/admin
#sudo cp configure.php /tmp
#cd /tmp
sudo sed -i '/\/\//! s/unset (\$configysf2dmr.*Options/\/\/&/g' configure.php
sudo sed -i '/\/\//! s/unset (\$configysf2dmr.*Local/\/\/&/g' configure.php
sudo sed -i 's/\(.*\)$ysf2dmrContent \(.= $ysf2dmrKey.*$ysf2dmrValue.*\)/\1if ($ysf2dmrKey == "Options" \&\& $ysf2dmrValue) { $ysf2dmrValue = "\\"".$ysf2dmrValue."\\""; }\n\1$syf2dmrContent \2/g' configure.php
#sudo sed -i 's/\(.*\)$dmrgwContent \(.= $dmrgwKey."=".$dmrgwValue.*\)/\1if ($dmrgwKey == "Options" \&\& $dmrgwValue) { $dmrgwValue = "\\"".$dmrgwValue."\\""; }\n\1$dmrgwContent \2/g' configure.php <-- remove this change!
sudo sed -i 's/\(.*if (!isset($configysf2dmr.*YSF Network.*DT2.*; \)}/\1 }\
if (!isset($configysf2dmr\[\x27DMR Network\x27\]\[\x27Options\x27\])) {\
$configysf2dmr\[\x27DMR Network\x27\]\[\x27Options\x27\] = "UserLink=1;TS2_1=".$configysf2dmr\[\x27DMR Network\x27\]\[\x27StartupDstId\x27\];\
}/g' configure.php
Note that this patch does several things:
1) fixes/corrects the rewrites of the Options= lines in the YSF2DMR config file
2) stops the removal of the Options= lines when a config is disabled, so it retained for future reactivation
3) Adds/constructs the Options= line in a new/reactivated config if that line is missing.
This should make your future reconfigurations in the field run a bit smoother from here on out. Hopefully.
Try it out. Fiddle with it! Pound on it! Let me know the results!!
Re: YSF2DMR DMR Master "Options=" GUI tweak
Posted: Thu Feb 27, 2025 6:46 am
by M0MZF
Hi Mark,
Wow - preliminary results, that seems to work! I applied the patch then tweaked a couple of knobs in the configuration dashboard; the YSF2DMR toggle remained on and the contents of the dashboard look sane - amazing
I'll give it a good thrashing over the next few days and see if there's anything which misbehaves - start from a freshly deployed Pi-star image and work through the whole process. Interesting that you couldn't replicate it, I wonder what we're doing differently... there are obviously some potential gremlins in there so I will iterate (obsessively!) through the configuration process, see if anything is broken & report back.
Great stuff
Cheers,
Jason
Re: YSF2DMR DMR Master "Options=" GUI tweak
Posted: Sun Mar 02, 2025 1:59 am
by KN2TOD
After playing with this some more, I realized I inserted a "fix" I should not have: the Options= lines in the
DMRGateway configs end up being quoted incorrectly.
The patch previously posted above has been amended (for future ref); the following patch will correct the error if that prior patch had been applied:
Code: Select all
rpi-rw
cd /var/www/dashboard/admin
#sudo cp configure.php /tmp
#cd /tmp
sudo sed -i '/.*if (\$dmrgwKey == \"Options\" && \$dmrgwValue).*/d' configure.php
If you're not using gateway mode in your configuration, you wouldn't see this error, but in any case, this (prior) fix needs to be removed.
Sorry 'bout that!
Re: YSF2DMR DMR Master "Options=" GUI tweak
Posted: Wed Mar 05, 2025 7:35 am
by M0MZF
Hi Mark,
Thanks for the update. I will get to properly testing this soon, work has got rather busy and that pesky real life thing is getting in the way! I'm not using DMR gateway so I suppose I haven't hit any problems, this patch has applied cleanly tho and doesn't appear to have broken anything.
Cheers,
Jason