jhubig / FritzBoxShell

Some shell scripts for controlling and checking the Fritz!Box/Fritz!Repeater
MIT License
139 stars 22 forks source link

DNS does not completely work for BoxIP env variable #45

Open devloberto opened 7 months ago

devloberto commented 7 months ago

The documentation says

Enviroment  |  Argument  |  Description
------------+------------+-----------------------
BoxIP       |  --boxip   |  IP or DNS of FritzBox

but that is (at least in my case) partially wrong: The configured fritzbox name of my 7530 device leads to an additional usable DNS like my-home.fritz.box.

So when I run one of the following commands

BoxIP=192.168.178.1 BoxUSER=my-user BoxPW=my-password ./fritzBoxShellTest.sh
BoxIP=fritz.box BoxUSER=my-user BoxPW=my-password ./fritzBoxShellTest.sh

everything works fine and I get these output:

WLAN_2G STATISTICS      is working!
WLAN_2G STATE   is working!
WLAN_5G STATISTICS      is working!
WLAN_5G STATE   is working!
WLAN STATE      is working!
LAN STATE       is working!
DSL STATE       is working!
WAN STATE       is working!
LINK STATE      is working!
IGDWAN STATE    is working!
IGDDSL STATE    is working!
IGDIP STATE     is working!
TAM 0 GetInfo   is working!
OnTel GetCallList 1     is working!
NewModelName FRITZ!Box 7530
NewSoftwareVersion 164.07.57
fritzBoxShell.sh version 1.0.8

But when I run

BoxIP=my-home.fritz.box BoxUSER=my-user BoxPW=my-password ./fritzBoxShellTest.sh

the script prints

WLAN_2G STATISTICS      is not working!
WLAN_2G STATE   is not working!
WLAN_5G STATISTICS      is not working!
WLAN_5G STATE   is not working!
WLAN STATE      is working!
LAN STATE       is not working!
DSL STATE       is not working!
WAN STATE       is not working!
LINK STATE      is not working!
IGDWAN STATE    is not working!
IGDDSL STATE    is not working!
IGDIP STATE     is not working!
TAM 0 GetInfo   is working!
OnTel GetCallList 1     is working!
fritzBoxShell.sh version 1.0.8

I think either the code should be adapted to cover this case or the documentation should be more clearly so that not even more people run in this issue 🙂


P.S. the fritzbox name can be configured here: https://my-home.fritz.box/#boxname image