Why is DMR Net now yellow?

Help with DMR issues
f1rmb
Posts: 31
Joined: Thu Feb 21, 2019 12:12 pm

Re: Why is DMR Net now yellow?

Post by f1rmb »

KE7FNS wrote: Fri Mar 19, 2021 5:54 am
KN2TOD wrote: Fri Mar 19, 2021 3:20 am Take these sample logs: re-logons are occurring quickly enough (like, one line later) but the delay rolling off those specific log lines can take a while, leaving one with the impression that they're disconnected.
A disconnection from the master is going to immediately indicate a RED "DMR Net", NOT yellow.
A red "DMR Net" means MMDVMHost or DMRGateay (depending on the configuration) process is not running (showMode(), called from repeaterinfo.php).

Code: Select all

... showMode() snippet:
                elseif ($mode == "DMR Network") {
                        if (getConfigItem("DMR Network", "Address", $mmdvmconfigs) == '127.0.0.1') {
                                if (isProcessRunning("DMRGateway")) {
                                        if (checkDMRLogin("DMRGateway") > 0) { echo "<td style=\"background:#ff9; color:#030; width:50%;\">"; }
                                        else { echo "<td style=\"background:#0b0; color:#030; width:50%;\">"; }
                                } else {
                                        echo "<td style=\"background:#b00; color:#500; width:50%;\">";
                                }
                        }
                        else {
                                if (isProcessRunning("MMDVMHost")) {
                                        if (checkDMRLogin("MMDVMHost") > 0) { echo "<td style=\"background:#ff9; color:#030; width:50%;\">"; }
                                        else { echo "<td style=\"background:#0b0; color:#030; width:50%;\">"; }
                                } else {
                                        echo "<td style=\"background:#b00; color:#500; width:50%;\">";
                                }
                        }
                }
                
... repeaterinfo.php excerpt:
<table>
  <tr><th colspan="2"><?php echo $lang['net_status'];?></th></tr>
  <tr><?php showMode("D-Star Network", $mmdvmconfigs);?><?php showMode("DMR Network", $mmdvmconfigs);?></tr>
  <tr><?php showMode("System Fusion Network", $mmdvmconfigs);?><?php showMode("P25 Network", $mmdvmconfigs);?></tr>
  <tr><?php showMode("YSF2DMR Network", $mmdvmconfigs);?><?php showMode("NXDN Network", $mmdvmconfigs);?></tr>
  <tr><?php showMode("YSF2NXDN Network", $mmdvmconfigs);?><?php showMode("YSF2P25 Network", $mmdvmconfigs);?></tr>
  <tr><?php showMode("DMR2NXDN Network", $mmdvmconfigs);?><?php showMode("DMR2YSF Network", $mmdvmconfigs);?></tr>
</table>

Cheers.
---
Daniel
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: Why is DMR Net now yellow?

Post by MW0MWZ »

f1rmb wrote: Fri Mar 19, 2021 5:59 am It's still possible to do it, I've build some shell command lines for this, but it's overkill in anyway, and still won't work when you have few enabled networks, as entries are mixed, so a connection can hide a disconnected network.
Interesting point, but connected networks stop logging that they are connected, while failed logins keep repeating in the log, so that should not be too much of an issue, and now I do check if the last login message of a type I care about is a success or a fail.

I've tweaked the code based on the comments here, and I'd appreciate some more feedback with the new version.
Andy

73 de MW0MWZ
http://pistar.uk
User avatar
G8SEZ
Posts: 553
Joined: Fri Apr 13, 2018 8:26 pm

Re: Why is DMR Net now yellow?

Post by G8SEZ »

KE7FNS wrote: Fri Mar 19, 2021 6:04 pm
f1rmb wrote: Fri Mar 19, 2021 6:46 am A red "DMR Net" means MMDVMHost or DMRGateay (depending on the configuration) process is not running (showMode(), called from repeaterinfo.php).
Interesting, I thought its label and color conveyed something else, my mistake.
I think it's fair to make this mistake, I found that prior to the changes that Andy made in the last week or two I could have a green Net indication but at the same time a live log window could show repeating login attempt->login failure until I fixed the underlying problem (usually password related). The yellow Net case is a very useful addition for me.
--

Brian G8SEZ
AF7FS
Posts: 8
Joined: Sat Aug 18, 2018 3:31 am

Re: Why is DMR Net now yellow?

Post by AF7FS »

I'll monitor the "DMR Net" status for a while to identify the impact to the connection. The status changed yellow on a DMR net 2 days ago and I did a reset back to green before my turn to check-in. At least I know the yellow indicator means something unusual is going on in the DMR network while I am still connected since the "DMR Net" status is not red. I have switched BM Servers and not sure if that made a difference yet.
KN2TOD
Posts: 264
Joined: Sun Nov 11, 2018 6:36 pm

Re: Why is DMR Net now yellow?

Post by KN2TOD »

MW0MWZ wrote: Fri Mar 19, 2021 5:52 pm I've tweaked the code based on the comments here, and I'd appreciate some more feedback with the new version.
I think your prior version of the function was/is better, but the test needed to be reformulated:

Instead of this (currently):

Code: Select all

$logCheck...DMRLogin = `tail -n 5 $logPath | awk '/master/ && /successfully/ || /master/ && /failed/' | tail -n 1`;
Or this (previously):

Code: Select all

$logCheck...HostDMRLogin = `tail -n5 $logPath | grep "Login to the master has failed" | wc -l`;
Perhaps this would do:

Code: Select all

$logCheck...HostDMRLogin = `tail -n5 $logPath | grep "Logged\|Login" | tail -n 1 | grep "Login" | wc -l`;
The use of AWK is overkill and expensive: generally, it's twice as slow as GREP and the overhead of the formatting capabilities is not really required for the test - the compound test pattern can be satisfied with just one additional GREP.

I agree that the testing of the link's status is less than perfect at this time, but you have to work with what you're given. Maybe, somewhere down the road, revisions to other pieces of code will yield better data for a more accurate rendering of the status in the dashboard (which, in turn, may mean that the initiate "tail -n 5" may need to be reevaluated at some later point).

But, what's currently being displayed (however flawed) is useful nevertheless.
f1rmb
Posts: 31
Joined: Thu Feb 21, 2019 12:12 pm

Re: Why is DMR Net now yellow?

Post by f1rmb »

Hi,

I think this log parsing thing could be dropped, as Jonathan merged a change I've made for DMRGateway and MMDVMHost, which makes possible to retrieve connections status using RemoteCommand.
Using this, you can have a real status per network (which is useful to turn the background color to red for each disconnected network, instead of yellowing the "DMR Net"). I refraining myself posting pictures of the result.


Cheers.
---
Daniel
User avatar
G8SEZ
Posts: 553
Joined: Fri Apr 13, 2018 8:26 pm

Re: Why is DMR Net now yellow?

Post by G8SEZ »

f1rmb wrote: Thu Mar 25, 2021 7:12 pm Hi,

I think this log parsing thing could be dropped, as Jonathan merged a change I've made for DMRGateway and MMDVMHost, which makes possible to retrieve connections status using RemoteCommand.
Using this, you can have a real status per network (which is useful to turn the background color to red for each disconnected network, instead of yellowing the "DMR Net"). I refraining myself posting pictures of the result.


Cheers.
---
Daniel
Well let's hope that this makes it into the new MMDVM binary that Andy has been talking about.
--

Brian G8SEZ
N6DMR
Posts: 23
Joined: Wed Apr 11, 2018 6:56 pm

Re: Why is DMR Net now yellow?

Post by N6DMR »

I am seeing that the Pi-Star Configuration Screen is not saving a new BM Hotspot Security Password (BM HS PW). My work around is to add the BM HS PW directly into the DMRGateway file. See attached picture.

I also did a video of the issue:

https://drive.google.com/file/d/1NSQlD7 ... sp=sharing
Attachments
DMR Network 1.jpg
DMR Network 1.jpg (37.23 KiB) Viewed 8021 times
M7LAA
Posts: 10
Joined: Wed Sep 01, 2021 10:16 am
Location: Fleetwood UK

Re: Why is DMR Net now yellow?

Post by M7LAA »

Hi Everyone,

I am also having some issues with the DMR Net being Yellow. I have read through the threads in these posts and have done everything possible so far.

I did go into the logs and I get the following message "DMR Slot 2, RF user 123 rejected".

Can anyone offer any help please?


Regards,

Andy
M7LAA
G4FDL
Posts: 44
Joined: Wed Apr 11, 2018 12:10 pm

Re: Why is DMR Net now yellow?

Post by G4FDL »

Check you have correct DMR ID set in the code plug for the radio.
Post Reply