g4klx / MMDVMHost

The host program for the MMDVM
GNU General Public License v2.0
373 stars 271 forks source link

ON7LDS Nextion Layout - IP Address field #355

Open AndyTaylorTweet opened 6 years ago

AndyTaylorTweet commented 6 years ago

In Nextion.cpp around line 83 the current IP address appears to only be pulled in once when starting the serial connection to the Nextion screen - there is no provision for this IP to change, ever while the daemon is running (unless I missed it - and that is entirely possible).

These screens are being used increasingly on hotspots that are able to move about and indeed change WiFi connections while the daemon is running, it would be nice to have this information pulled in occasionally, it doesn't need to be live, and every 120 secs (or more) should not noticeably raise the load on the device.

If I am missing a trick here, feel free to point it out.

on7lds commented 6 years ago

I initially thought about it, but did not yet implement this, because I do not know if all network connections from MMDVMHost to servers recover when the IP address changes and if it was relevant in that case. But maybe, indeed, it is good to know so you know where to point your (browser|ssh) to.

I'm working on a new version where all layout codes will be removed from Nextion.cpp so all processing will have to be done in the Nextion (or in a helper program). I'll see if I can add it.

On the other side, in Hotspots, the helper program could be a better place to do this (there you also have the possibility to execute commands by pressing a button on the display, ie restarting mmdvmhost)

What do you or other think is the best way to go ?

g4klx commented 6 years ago

If your IP address changes then the screen will be the least of your problems! The whole set of gateways for each mode will need to be restarted! I don't think the display is a big issue in comparison.

zs5cey commented 6 years ago

I would like to see this feature, and I also note @g4klx comment, but I find that, when I move away from my home, and the hotspot is connected to my home network, and Pi reconnects to my phone, the MMDVM, ircDDBGateway, DMRGateway all seem to reconnect automatically with very limited interruption. Really good recovery in the software.

on7lds commented 6 years ago

At this moment, it is possible if you use NextionDriver as a companion to MMDVMHost. ( https://github.com/on7lds/NextionDriver/ ). Note that this program is linux only.