Ansuel / tch-nginx-gui

Modified file to apply to a stock technicolor GUI
GNU General Public License v3.0
344 stars 52 forks source link

TG800VAC DHCP Wan Not Connecting #534

Closed Townie-au closed 5 years ago

Townie-au commented 5 years ago

Hi I have a couple of issues with GUI 8.11.49. Ive been talking kevdagoat. I installed by usin WinSCP method.

I have static internet connection VDSL. I have a home server with dhcp/dns servers and have a different subnet to the default setting. Ive found that I can get the internet to connect if I choose fixed ip put all the details in, close the window, then open the window again, switch to dhcp and then back to static and close. Then it will connect, providing I only use the default router address. Also after awhile the internet drops out and I need to do the above again. I have in the xdsl section "No direct path found" on several driver items.

Townie-au commented 5 years ago

7.2.1 firmware too

FrancYescO commented 5 years ago

what IP are you setting when putting fixed ip mode and is working? DHCP is provided by the ISP?

Townie-au commented 5 years ago

10.40.27.1. DHCP works fine. It received a address, just doesn't connect to the internet for some reason. ISP is like static arp. Give the same address when modem is on DHCP normally.

FrancYescO commented 5 years ago

So if you set the same value that the DHCP assign to you in static mode internet is working but not when in DHCP?!

Townie-au commented 5 years ago

It does work for awhile and then drops out again but on DHCP nothing. I've left it for ages too, still nothing. Weird ay.

Townie-au commented 5 years ago

Any thoughts? I'm going to try putting the isp router mac address in the tg800vac to see of that helps. Other than that not sure. I dunno why the internet drops out when I put static details in. Doesn't drop out with the isp router.

FrancYescO commented 5 years ago

probably it drops because the fixed IP you are assigning is not the one that the isp would give to you with DHCP or something like that

do you know what ip is assigning to you when putting the ISP's modem?

the gateway is still pingable from the modem when internet drops? how much is "a while"?

Townie-au commented 5 years ago

It's the same. I checked on the isp modem.

Yes I do.

I'm trying that know. I'm having trouble getting it to connect at all now.

What driver should I be using in the xdsl section for tg800vac?

Do I need to install a driver?

Townie-au commented 5 years ago

I got it connected. Also managed to change the modem address, disable the dhcp and use my server after the connection was established. If it drops I'll try and ping the isp gateway. Firmware version says A2pvfbH043g.d26q Driver Version says B2pvbH042l (DSL-AC87VG v1.00.10) I notice there is a TG799VAC version but no TG800VAC.

FrancYescO commented 5 years ago

how?

changing the xdsl driver is not needed, but in some circumstance will help getting better stability/sync speed with the DSLAM 799 and 800 have totally different hardware (SoC) so also the driver choices are different

Townie-au commented 5 years ago

Ok. So it did drop, was unable to ping the gateway. Then had to get to reconnect by Internet/Select DHCP/Change connection/Select Static/Change connection

FrancYescO commented 5 years ago

have you tried spoofing the original mac address? how much time you can stay online?

Townie-au commented 5 years ago

It drops out about every 30mins. No. I went to spoof the address but found that option is only available in PPP mode.

Townie-au commented 5 years ago

I noticed dyndns is enabled too but can't turn it off. Says invalid ip address and has dropbear command in domain section.

Townie-au commented 5 years ago

Thanks for all your help and putting this together btw. Really appreciate it.

Townie-au commented 5 years ago

I think even though my isp is giving the same address it's renewing the lease every 30mins.

FrancYescO commented 5 years ago

Set MAC address in PPPoE mode it should remain spoofed when going in static/DHCP mode

Dropbear commands in dyndns section i guess is something related on how you got root access on your gateway

Brw what's your ISP? Does it have a public webpage that recap the connection settings?


From: Townie-au notifications@github.com Sent: Sunday, March 3, 2019 3:04:32 AM To: Ansuel/tch-nginx-gui Cc: Francesco M; Comment Subject: Re: [Ansuel/tch-nginx-gui] TG800VAC DHCP Wan Not Connecting (#534)

I think even though my isp is giving the same address it's renewing the lease every 30mins.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Ansuel/tch-nginx-gui/issues/534#issuecomment-468979274, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEXNgV1090rd-dxErpqPifph7flTGepJks5vSy2wgaJpZM4bYlY7.

Townie-au commented 5 years ago

MyRepublic. It does have a section explaining how to setup 3rd party routers on the NZ site but the Australian one it just states that myrepublic routers are preconfigured to work with their connection and that a 3rd party will not receive any support if it doesn't work. I'll try the mac spoofing.

Townie-au commented 5 years ago

No. It doesn't change gateway address.

Townie-au commented 5 years ago

Good news. I downgraded to 16.3, then the tg799vac matched the installed driver and upgraded gui with the same file used to install it.

I did what you said, went to ppp mode and put in the isp modem wan mac address and then changed back to dhcp and then it picked up the ip.

I thought it would change the mac on the gateway info page but it doesn't and I thought it wasn't working.

It shouldn't drop out now I don't think.

Thanks a lot, this gui is awesome!

kevdagoat commented 5 years ago

Glad you like it and have sorted the problem.

Will have to mark this as 17.2 compatibility bug

Sent from my iPhone

On 3 Mar 2019, at 4:52 pm, Townie-au notifications@github.com wrote:

Good news. I downgraded to 16.3 and upgraded gui with the same file used to install it.

I did what you said, went to pop mode and put in the isp modem wan mac address and then changed back to dhcp and then it picked up the ip.

It shouldn't drop out now I don't think.

Thanks a lot, this gui is awesome!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Townie-au commented 5 years ago

Looks like it or just my isp blocking the modem and the mac spoofing did it. Thanks again guys.

FrancYescO commented 5 years ago

Thats pretty strange, and still have not clear why you downgraded.

Actually we are showing all xDSL drivers collected only on >=17.3 Firmwares (as setting the driver on an old kernel module like the one of the 16.x firmwares can cause bootloops), but probably 17.2 (or 17.1) is good enought and will help showing/matching the A2pvfbH043g driver in the select when installing it on a TG800

TG799 should be an arm device and it should have a totally different driver versione/list (idk what is the default on this device and it can change olso on different firmwares)

but all of this question about xDSL drivers does not concerne your connectivity issue that is on Layer3

is DHCP mode working after spoofing the MAC?

Townie-au commented 5 years ago

I dunno. I downgraded to 16.3 because after spoofing the mac address, dhcp still didn't work. The dhcp is working great now with no drops. The only hiccup I had was the dns servers from the static config caused only the dns to drop when the lease expired and couldn't be removed from the interface. I had to use WinSCP to edit the network config file to remove the listed dns addresses. Then I reboot and picked up the dns addresses as well and it's been great ever since. I could possibly upgrade it to 17.2 again and it might be ok but it's working and don't want to mess with it. The ddns issue was gone to when I flashed 16.3 via the gui also.

Townie-au commented 5 years ago

I'll try 17.2 tommorrow just to clear up the real cause of the issue. It's not hard to put back if it doesn't work.

Townie-au commented 5 years ago

Nope. 17.2 not working. 16.3 worked straight away. The required driver for 17.2 is A2pvfbH043g.d26q. For some reason the voip isn't trying to register anymore. It's enabled and all my details are but it says na on the status page. Can you's fix that? I tried mmpbx restart command.

FrancYescO commented 5 years ago

Thats pretty strange, we need a comparison btw /etc/config/network of 16.3 and 17.1 to go over and get what's wrong

the error you have on mmpbx is probably caused due to a misconfiguration, have you used the GUI to change some telephony setting?

logread -l200 | grep mmpbx after ~30sec from /etc/init.d/mmpbxd restarting should help debugging whats wrong

Townie-au commented 5 years ago

Oh man. The kids are going to kill me. Got 4 kids and the whole house go bizerk when I turn the net off. My Mrs hates IT related troubleshooting. Doesn't want me to spend the time working stuff out but wants everything to work at all times as well! Haha

I ran these commands as per the rooting guide here...

https://whirlpool.net.au/wiki/hack_technicolor

Could any of these caused issues? Other than that I just added my sip details. Was a mission to get it this stage. The upgrade firmware wasn't working for some reason, with a error code 9. I had to use the PXE flashing method to get it to 16.3. Even a factory reset. Sometimes when I'd try an install gui, I'd get to the Rootdevice force part and it would say command not found but the script was where it should be. I noticed there is a update 8.8.55 stable but it's a different file type, can that be applied to this build?

Block 1

uci delete cwmpd.cwmpd_config uci delete firewall.cwmpd uci delete dhcp.hotspot uci delete dhcp.fonopen uci delete wifi_doctor_agent.acs uci delete wifi_doctor_agent.config uci delete wifi_doctor_agent.as_config uci delete tls-vsparc.Config uci delete tls-vsparc.Passive uci delete autoreset.wifidoctor_enabled uci delete autoreset.vsparc_enabled uci delete autoreset.thor_enabled uci set ddns.myddns_ipv4.enabled='0' uci set dropbear.wan.enable='0' uci set dropbear.lan.enable='1' uci set dropbear.lan.PasswordAuth=on uci set dropbear.lan.RootPasswordAuth=on uci add_list web.ruleset_main.rules=iproutesmodal uci set web.iproutesmodal=rule uci set web.iproutesmodal.target='/modals/iproutes-modal.lp' uci add_list web.iproutesmodal.roles='admin' uci add_list web.ruleset_main.rules=systemmodal uci set web.systemmodal=rule uci set web.systemmodal.target='/modals/system-modal.lp' uci add_list web.systemmodal.roles='admin' uci add_list web.ruleset_main.rules=relaymodal uci set web.relaymodal=rule uci set web.relaymodal.target='/modals/relay-modal.lp' uci add_list web.relaymodal.roles='admin' uci add_list web.ruleset_main.rules=natalghelpermodal uci set web.natalghelpermodal=rule uci set web.natalghelpermodal.target='/modals/nat-alg-helper-modal.lp' uci add_list web.natalghelpermodal.roles='admin'

Block 2

uci add_list web.ruleset_main.rules=diagnosticstcpdumpmodal uci set web.diagnosticstcpdumpmodal=rule uci set web.diagnosticstcpdumpmodal.target='/modals/diagnostics-tcpdump-modal.lp' uci add_list web.diagnosticstcpdumpmodal.roles='admin' uci set system.config.export_plaintext='1' uci set system.config.export_unsigned='1' uci set system.config.import_plaintext='1' uci set system.config.import_unsigned='1' uci set web.uidefault.upgradefw_role='admin' uci add_list web.parentalblock.roles='admin' uci commit sed -e 's/session:hasAccess("\/modals\/diagnostics-network-modal.lp")/session:hasAccess("\/modals\/diagnostics-network-modal.lp") and \n session:hasAccess("\/modals\/diagnostics-tcpdump-modal.lp")/' -i /www/cards/009_diagnostics.lp sed -e 's^alt="network">

\^alt="network">
\\n
network
\^' -i /www/cards/009_diagnostics.lp sed -e 's/{"logviewer-modal.lp", T"Log viewer"},/{"logviewer-modal.lp", T"Log viewer"},\n {"diagnostics-tcpdump-modal.lp", T"tcpdump"},\n/' -i /www/snippets/tabs-diagnostics.lp sed -e 's/if currentuserrole == "guest" /if currentuserrole == "admin" /' -i /www/docroot/modals/gateway-modal.lp echo > /etc/rc.local killall -q -9 hotspotd cwmpd cwmpdboot watchdog-tch wifi-doctor-agent tls-vsparc

Super modders may wish to remove the next line before running. Most people want it to free up overlay space.

opkg --force-removal-of-dependent-packages remove conf-cwmpd cwmpd autoreset-tch mappings-fon geolocation-tch find /rom/usr/lib/ipk -type f |xargs -n1 basename | cut -f 1 -d '_' |xargs opkg --force-removal-of-dependent-packages remove echo > /etc/dropbear/authorized_keys /etc/init.d/dnsmasq restart /etc/init.d/nginx restart /etc/init.d/dropbear start

Townie-au commented 5 years ago

I'm pretty sure some of those cleanup commands are interfering with install of gui because when I run those commands, the gui gets an error at the rootdevice command and installs fine without but then cwmp is still enabled and can't be disabled through gui. Also I think the new version of autogui gives permanent root already by what I have found. So I'll copy that files you asked for and then flash 7.21 by PXE method and then install gui with only running the cwmp commands and see if the dhcp connects. How do I attach a file on here?

FrancYescO commented 5 years ago

zip or rename in .txt than drag&drop post here all errors you get on rootdevice, run it with de debug flag instead of force

btw GUI is intended to be installed on a clean system, 90% of these commands are unnedded as installing the GUI you have all options ready to be set

Townie-au commented 5 years ago

Ahhh I see but how do I run it on a clean system with no ssh or internet access?

FrancYescO commented 5 years ago

i intend clean system as a gateway with only root access gained,

your wiki is saying Setting up permanent root access and other stuff that

basically for root only these commands are needed:

echo root:root | chpasswd
uci set dropbear.lan.enable='1'
uci set dropbear.lan.PasswordAuth=on
uci set dropbear.lan.RootPasswordAuth=on
/etc/init.d/dropbear restart
Townie-au commented 5 years ago

So I did a factory reset and flashed 7.2.1 via PXE method. Then rooted with autogui with no flash. Then I got the new gui version copied it across with WinSCP. Then changed ssh password I only ran the ucicommand to remove the ddns and uci commit. Then ran gui commands, this time with debug. It's doing what it did before connecting on static but actually no web access from browser, but if I set static, close, then open change dhcp and then back to static. I get web access on the browser. It's connected now, I'll see if it drops out. I checked the etc/config/network files, they are identical apart from this one says static with all the details of course and the phones working.

Townie-au commented 5 years ago

Yeah it dropped again.

Townie-au commented 5 years ago

Thu Feb 28 19:18:48 2019 daemon.warn dnsmasq[3631]: no servers found in /tmp/resolv.conf.hotspot, will retry This anything?

FrancYescO commented 5 years ago

try to remove reqopts line, than /etc/init.d/network restart

we need to compare 16.3 vs 17.2 configs not dhcp vs static

Townie-au commented 5 years ago

Yep will do. That's is, network old is 16.3 and the other is 17.2.

FrancYescO commented 5 years ago

but network old is configured in static mode, the best is to compare same connection mode... but also looking at this comparison i guess there will be not too much differences probably the issue is somewhere else :/

using latest dev version the xdsl driver selected in the dropdown is corresponding to the firmware version? are xdsl firmware changing btw 16.3 and 17.2 ?

and probably @kevdagoat or @flywire can help: is somewhere an extracted 16.3 firmware?

actually i should have an extracted vant-y_CRF779-17.2.0213-820-RB

looking at this page there are other 3 fw available for TG800 (and idk what of the 3 17.2 you are using) https://bc.whirlpool.net.au/bc/hardware/?action=h_view&model_id=1622

Townie-au commented 5 years ago

I'm using 17.2.0261-820-RA and 16.3.7567-660-RD. The gui ver is 8.8.55.

Yes the firmware does change but only when use PXE method, if I try with autogui I get authorization error for some reason. Haven't tried with the new gui yet.

FrancYescO commented 5 years ago

8.8.55 ?! thats pretty old! use the latest dev or at least stable

Townie-au commented 5 years ago

But it says flashing dev will brick my device.

Townie-au commented 5 years ago

That is the latest stable isn't it?

Townie-au commented 5 years ago

Awww man. That hacking guide is out of date and the requred driver is in the repository! Can I use creat_zip.bat to run initialize_gui.sh to install gui without using autogui to root it first?

Townie-au commented 5 years ago

And is the dev version safe to use?

kevdagoat commented 5 years ago

Yes on a tg800, you have 512mbyte flash vs 128

Sent from my iPhone

On 6 Mar 2019, at 2:44 am, Townie-au notifications@github.com wrote:

And is the dev version safe to use?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Townie-au commented 5 years ago

Ok. I installed the latest version gui_dev and the xdsl driver matches but still no wan connection.

Townie-au commented 5 years ago

Also get "Validation missing for uci_wan_peerdns" when trying to set wan spoof address.

Townie-au commented 5 years ago

I set the wan spoof address manually in the file.

Townie-au commented 5 years ago

Is there a way I can use a script to get the modem to request a wan address?

Townie-au commented 5 years ago

How do I fix Validation missing for uci_wan_peerdns?