How to properly debug what is going on with my DSL connection? How to enable verbose DSL logs?

Ok so I have BT HomeHub 5A and a TD-W8980. Back in LEDE days (17.x) my ADSL connection established first try, from 18.x it requires first to fail the first try and than it works successfully. I know it is a really minor thing but I would like to solve it.

How can I provide all possible details to this forum to properly understand what is going on? I know ho to compile my own custom image, make changes to kernel configs and so on, i just do now know what/where/how should I enable verbose dsl logs? Should I just edit /etc/ppp/options to have debug and logfile /tmp/somefilename ?

Have you try

tail -f [yourlog_filename]

Yes but it just shows the 2 connection attempts. the first fails the second one succeeds.

The system logfile (try logread on a shell or Status->System Log in LuCI) should give you the information about why a PPP connection fails, no special settings necessary.

That is the point. From logread there is nothing apparently wrong. I just see daemon.err pppd[2111]: connect(0.8.35): No such device when it tries to connect the first time. Under System > System > Logging both log level are set to Debug.

Update:

Furthermore enabling debug and logging inside /etc/ppp/options (by de-commenting #debug and changing logfile /dev/null to logfile /tmp/ppp_logfile) is just see this (with cat cat /tmp/ppp_logfile):

Plugin pppoatm.so loaded.
connect(0.8.35): No such device
Plugin pppoatm.so loaded.
connect(0.8.35): No such device
Plugin pppoatm.so loaded.
connect(0.8.35): No such device
Plugin pppoatm.so loaded.
connect(0.8.35): No such device
Plugin pppoatm.so loaded.
using channel 1
Renamed interface ppp0 to pppoa-wan
Using interface pppoa-wan
Connect: pppoa-wan <--> 0.8.35
sent [LCP ConfReq id=0x1 <mru 1478> <magic 0x732be826>]
rcvd [LCP ConfReq id=0x99 <auth chap MD5> <magic 0x151d28ed>]
sent [LCP ConfAck id=0x99 <auth chap MD5> <magic 0x151d28ed>]
rcvd [LCP ConfAck id=0x1 <mru 1478> <magic 0x732be826>]
sent [LCP EchoReq id=0x0 magic=0x732be826]
rcvd [LCP EchoRep id=0x0 magic=0x151d28ed]
rcvd [CHAP Challenge id=0x24 <6c170a9aad0d3da963cd2b8ffd1d3ef3ec9b53>, name = "JUNOS"]
sent [CHAP Response id=0x24 <c555c23de89b8969de156455e6e5f02c>, name = "benvenuto"]
rcvd [CHAP Success id=0x24 ""]
CHAP authentication succeeded
CHAP authentication succeeded
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::b82f:6855:248b:8e89>]
rcvd [LCP ProtRej id=0x9a 80 57 01 01 00 0e 01 0a b8 2f 68 55 24 8b 8e 89]
Protocol-Reject for 'IPv6 Control Protocol' (0x8057) received
rcvd [IPCP ConfReq id=0xfd <addr 151.6.141.19>]
sent [IPCP ConfAck id=0xfd <addr 151.6.141.19>]
rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfNak id=0x2 <addr 151.71.74.57> <ms-dns1 151.5.216.15> <ms-dns2 151.5.216.150>]
sent [IPCP ConfReq id=0x3 <addr 151.71.74.57> <ms-dns1 151.5.216.15> <ms-dns2 151.5.216.150>]
rcvd [IPCP ConfAck id=0x3 <addr 151.71.74.57> <ms-dns1 151.5.216.15> <ms-dns2 151.5.216.150>]
local  IP address 151.71.74.57
remote IP address 151.6.141.19
primary   DNS address 151.5.216.15
secondary DNS address 151.5.216.150
Script /lib/netifd/ppp-up started (pid 4698)
Script /lib/netifd/ppp-up finished (pid 4698), status = 0x1

I know I just posted my (old) IP address. I rebooted my router so I already got a new one from my ISP.

But that is something that is very apparantly wrong, and it told you the same as the debug log: The device that PPP wants to use, i.e. the ATM interface, is not yet available.

As for why, sorry, can't make anything but guesses, but I'm sure someone else can chime in.

Yes I know that is the problem. PPP daemon wants to use something that still does not exist but it is not clear why it takes so much time to bring up the ATM interface and/or why pppd is not simply started after the ATM interface is brought up. I really hope that someone with pppd/atm/openwrt knowledge chimes in :frowning: