Pppoe can't connect until i stop it!?

In germany internet connections are not only slow, but also expensive and provider nags it customers
My line was up for more than 100 days, but the last weeks the provider reconnects it every night. And with this bug/feature i have to unplug the router or disable pppd every morning!
I'm wondering of no other Openwrt user uses Vodafon (DSL)?

So i added to /lib/netifd/proto/ppp.sh

nixPrell() {
	local secs="$1"
	local flag="/tmp/.pppd.lastconnect"
	local file="$(date +%s -r $flag 2>/dev/null)"
	local idle="$(( -1 * $(date +%s) + ${file:-0} + ${secs} ))"
	[ "$idle" -gt 0 ] && echo "Sleeping $idle seconds ..." && sleep $idle
	touch $flag
}

and the 1st line in "ppp_generic_setup()"

ppp_generic_setup() {
	nixPrell 300

This worked today, next time i will try 4 minutes. Maybe this could also be done with ip-up/down scripts. And if the interface is restarted manually the sleep keeps running

Btw, there are some Luci-glitches, or misunderstood it.:

Luci shows
LCP echo interval = empty (default: 5)
"Send LCP echo requests at the given interval in seconds, only effective in conjunction with failure threshold"

"ps" shows
lcp-echo-interval 1

--

Luci shows
LCP echo failure threshold = empty (default: 0)
"Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures"

"ps" shows
lcp-echo-failure 5

1 Like