Is the following a possibility, or just pipe dream
Reason:
I am working with the TGIF Spot Nextion Screen package
From this screen we can change many fields in /etc/mmdvmhost, such as
We can turn on/off main modes
We can change Hang Times
We can turn on/off Cross Modes
We can switch Master Servers
We can change TX/RX Offsets
We can turn on/off DMRGateway, and its Networks
Currently we have to stop MMDVMHost, make changes and restart it. This causes a disruption in the screen as the NextionDriver relies heavily on the operation of MMDVMHost
Request:
Can we have a change file similar to local hostfiles that can be used to modify /etc/mmdvmhost without causing it to be stopped and restarted
Possibly a timed check for changes, grab the changes, then delete the file.
Alternatively, check for changes in /etc/mmdvmhost and run with the changes without the restart
Phil VE3RD
MMDCMHost Real Time Changes
Re: MMDCMHost Real Time Changes
This is a worthy request but involves more than just the MMDVMHost program and the specific fields you mentioned: the current list of DMR id's, for instance, updated once a night, need to be reloaded in both the MMDVMHost and NextionDriver programs - both programs would need to be revised to update on the fly like you suggest. And there are probably some other tasks that could/should use this feature.
Such a feature would have to come from the developers of those respective programs (so this request should be made to them) and then the Pi-Star software adjusted to accommodate the feature.
In any case, any reloading of init parms would still involve some kind of disruption to processes that you may or may not see.
But, in the mean time I would ask a couple questions:
1) Why are you stopping the program to make the changes?
You can make changes to the host ini file while the program is running, any time, as many times as you want. No need to stop it. Once all the changes you need are in place, then can you restart the program to reload the changes. A restart is relatively quick. Or you can wait a bit before restarting, pick a time that's less disruptive. You have the same considerations for the Nextion driver as well: the MMDVMHost init file contains params for both the MMDVMHost and NextionDriver programs.
2) Can you wait for the daily (nightly) processes to effect the changes?
Assuming you (can) leave your hotspot on overnight, the nightly (daily) processes stop all the applicable programs, updates all the requisite files, and then restarts 'em. Your changes would get applied as part of the process.
And, if you're not running your HS 24/7, how do you get all the related host files updated? If you're manually initiating a host file update outside of the normal daily processing, that process involves a recycling of MMDVMHost, NextionDriver, and other programs, so your init changes would be reapplied as well.
3) Are you running on/could be running on, a Pi5?
If you're running on a Pi5, the recycling of the host tasks take but a couple seconds (2-3 secs), a disruption that is easy to forgive/forget, more so than on slower platforms.
Just some thoughts.
Such a feature would have to come from the developers of those respective programs (so this request should be made to them) and then the Pi-Star software adjusted to accommodate the feature.
In any case, any reloading of init parms would still involve some kind of disruption to processes that you may or may not see.
But, in the mean time I would ask a couple questions:
1) Why are you stopping the program to make the changes?
You can make changes to the host ini file while the program is running, any time, as many times as you want. No need to stop it. Once all the changes you need are in place, then can you restart the program to reload the changes. A restart is relatively quick. Or you can wait a bit before restarting, pick a time that's less disruptive. You have the same considerations for the Nextion driver as well: the MMDVMHost init file contains params for both the MMDVMHost and NextionDriver programs.
2) Can you wait for the daily (nightly) processes to effect the changes?
Assuming you (can) leave your hotspot on overnight, the nightly (daily) processes stop all the applicable programs, updates all the requisite files, and then restarts 'em. Your changes would get applied as part of the process.
And, if you're not running your HS 24/7, how do you get all the related host files updated? If you're manually initiating a host file update outside of the normal daily processing, that process involves a recycling of MMDVMHost, NextionDriver, and other programs, so your init changes would be reapplied as well.
3) Are you running on/could be running on, a Pi5?
If you're running on a Pi5, the recycling of the host tasks take but a couple seconds (2-3 secs), a disruption that is easy to forgive/forget, more so than on slower platforms.
Just some thoughts.
Re: MMDCMHost Real Time Changes
Thanks for the reply
just as I thought. Just wishful thinking. However
I can update all the support files, like the DMRGateway and crossmode files and reboot them without affecting the screen.
Many of the changes I make don't affect the nextion driver. Those that do will result in a restart.
The main culprit is MMDCMHost.
No the changes cannot wait for an overnight reboot. If a user wants to change a hang time, or switch a DMRGateway network, he wants it immediately.
Your suggestion to make the changes then do a restart makes a lot of sense. I will have a look at that.
These are mostly Pi3B's and are on 24/7, at lease mine are.
Thanks for the tip
Phil VE3RD
just as I thought. Just wishful thinking. However
I can update all the support files, like the DMRGateway and crossmode files and reboot them without affecting the screen.
Many of the changes I make don't affect the nextion driver. Those that do will result in a restart.
The main culprit is MMDCMHost.
No the changes cannot wait for an overnight reboot. If a user wants to change a hang time, or switch a DMRGateway network, he wants it immediately.
Your suggestion to make the changes then do a restart makes a lot of sense. I will have a look at that.
These are mostly Pi3B's and are on 24/7, at lease mine are.
Thanks for the tip
Phil VE3RD