Page 1 of 1

Solved: Frontend forgetting server on Shield

Posted: Sat Mar 13, 2021 9:29 am
by loddonlily
Hi all
I got Mythfrontend running nicely on my Nvidia shield pro last year - all working as it should, more or less.

Several days ago the Shield was getting most insistent about updating itself (to 8.2.2??) so I foolishly let it. I think that was the trigger event for my current problem.

Now, whenever I startup Mythfrontend, it fails to connect to the database. The server name is shown as being set to the hostname of my server. If I change that to the IP address and then "save and exit" it all works fine. Until the next time I start it up, when it's been set back to the hostname and fails to connect.

I'm getting really fed up with typing in an IP address with the shield remote!

Any suggestions?

Re: Frontend forgetting server on Shield

Posted: Sat Mar 13, 2021 2:25 pm
by pgbennett
In your mythbackend, mythtv-setup -> General -> Host Address Backend Setup -> Primary IP Address/DNS name do you have the backend ip address set as the host name or the ip address? Try setting it to the ip address.

Re: Frontend forgetting server on Shield

Posted: Sat Mar 13, 2021 4:18 pm
by loddonlily
Thanks for the response. The backend setting you describe is currently already set to the ip address. (I did just for fun change it the other way, so it was a name, but as expected this made no difference. I've put it back)

One thing that puzzles me is how the Shield-based front end would be able to resolve the hostname into an ip address anyway ... well, I guess the point is that it isn't, but presumably it once did?

And why isn't my change in the front end sticking?

Still confused...

Re: Frontend forgetting server on Shield

Posted: Sat Mar 13, 2021 6:24 pm
by pgbennett
Your shield frontend is likely using UPNP to get the backend info. When it does this it gets the backend ip address or dns name from the backend via UPNP, and updates it every time you start the frontend.

One suggestion - you can change the PIN on the backend (normally defaults to 0000). The shield uses the PIN to find and update the backend ip address every time it starts. By changing the PIN it will not be able to update the ip address.

Make sure you restart the backend after changing the PIN or the IP address / dns name.

You can also prevent the UPNP updates by editing your frontend config.xml and removing the upnp stuff, and leaving the database setting stuff. Unfortunately, editing config.xml on Android is not easy, but is possible.

Re: Frontend forgetting server on Shield

Posted: Mon Mar 15, 2021 5:00 pm
by loddonlily
Well, it did feel a little like black magic, but I followed the spell as directed and it seems to have worked - thank you! I just changed the PIN on the backend, restarted it, started up the front end and it connected fine.

I have to say I'm a bit puzzled by the proper function of the PIN option if its not required for frontends ... but never mind. My immediate problem is solved so I'll mark the thread accordingly.