SNTP does not work in bridged mode

billion_fan
Posts: 5374
Joined: Tue Jul 19, 2011 4:30 pm

Re: SNTP does not work in bridged mode

Post by billion_fan »

billion_fan wrote:
Gerry123 wrote:Great Thanks, Now how can I automate this, so it corrects the time or "resyncs" after a restart ?
You can either run a script or login manually and use the sync button the status page (with the script option you still have to manually set the date/time within the command line to set the correct time/date)
Gerry123
Posts: 5
Joined: Sun Jan 17, 2016 9:21 pm

Re: SNTP does not work in bridged mode

Post by Gerry123 »

OK. Are their any plans to update the next software release to have the router auto sync the time every hour or interval, when in bridged mode, to overcome this manual intervention ? If not, how are requests such as this considered when developing new software ? Thanks,
billion_fan
Posts: 5374
Joined: Tue Jul 19, 2011 4:30 pm

Re: SNTP does not work in bridged mode

Post by billion_fan »

Gerry123 wrote:OK. Are their any plans to update the next software release to have the router auto sync the time every hour or interval, when in bridged mode, to overcome this manual intervention ? If not, how are requests such as this considered when developing new software ? Thanks,
I'm really not sure how this can be done as the device needs to establish a internet connection to update the time from the NTP servers automatically. (when in bridge mode the device is not establishing a internet connection, the devices dialling in with PPPOE mode is establishing the internet/PPP connection)
Gerry123
Posts: 5
Joined: Sun Jan 17, 2016 9:21 pm

Re: SNTP does not work in bridged mode

Post by Gerry123 »

Is their not a way to duplicate the function of the "sync" button, which works on the 8800NL when in bridge mode ?
billion_fan
Posts: 5374
Joined: Tue Jul 19, 2011 4:30 pm

Re: SNTP does not work in bridged mode

Post by billion_fan »

Gerry123 wrote:Is their not a way to duplicate the function of the "sync" button, which works on the 8800NL when in bridge mode ?
I don't think so, as when you press the sync button it uses your computers clock time/date to sync the time, as no PC is directly connected to the 8800NL in bridge mode, that will be the problem.

When changing to bridging mode, you are turning the 8800NL into a dumb modem only, so some features will be redundant including time sync.
Gerry123
Posts: 5
Joined: Sun Jan 17, 2016 9:21 pm

Re: SNTP does not work in bridged mode

Post by Gerry123 »

ok. If we go back as to why I need to do a timed restart " I use the timed auto restart function to resync my SNR setting, as my SNR improves in early morning". Is their another way for me to get it to make / brake a connection at a particular time ? Thanks,
billion_fan
Posts: 5374
Joined: Tue Jul 19, 2011 4:30 pm

Re: SNTP does not work in bridged mode

Post by billion_fan »

Gerry123 wrote:ok. If we go back as to why I need to do a timed restart " I use the timed auto restart function to resync my SNR setting, as my SNR improves in early morning". Is their another way for me to get it to make / brake a connection at a particular time ? Thanks,
The only way you can do is adjust the reboot timing, (I haven't tried this, but maybe you can give it ago)

eg you need to reboot the device at 5:00am every morning, do a manual reboot at this time (the clock should then revert back to 00:00), then set the reboot time for 23:59 every day, this way it should reboot every 24 hours from the time you manually rebooted the router.
scuttleclun
Posts: 6
Joined: Wed Aug 12, 2015 2:21 pm

Re: SNTP does not work in bridged mode

Post by scuttleclun »

If like me you use a linux box as your router with PPPoE into the 7800N set up in bridge mode to PPPoA, then you can use a script on the linux box to set the time on the modem.
Here's a quick an dirty script I wrote, it supports multiple modems (I have two). It uses the linux 'expect' command to send telnet commands to the router. Make sure your distro has expect and telnet installed! I called this script 'setroutertime' and I run it from cron with an entry in crontab like this:

Code: Select all

00 3 * * * root /root/setroutertime 2>&1 >/dev/null

Code: Select all

#!/bin/bash

#list each router below. Each router definition is three values separated by commas:
#ipaddress/hostname,username,password (no spaces)
#each router definition is separated by a space
ROUTERLIST="192.168.0.1,admin,password 192.168.0.9,admin,password"

for i in $ROUTERLIST; do
        IP=`echo $i|cut -d"," -f1`
        USER=`echo $i|cut -d"," -f2`
        PWD=`echo $i|cut -d"," -f3`
        DATE=`date "+%m%d%H%M%Y"`
        cat <<EOF >/tmp/expectscript
spawn telnet $IP
expect "Login: "
send "$USER\r"
expect "Password:"
send "$PWD\r"
expect "> "
send "sh\r"
expect "# "
send "date $DATE\r"
expect "# "
send "exit\r"
expect "> "
send "logout\r"
expect "Bye bye."
EOF
        expect -f /tmp/expectscript
        rm -f /tmp/expectscript
done
Hope that helps!
scuttleclun
Posts: 6
Joined: Wed Aug 12, 2015 2:21 pm

Re: SNTP does not work in bridged mode

Post by scuttleclun »

You can also use this method to reboot the router too if you want as once in shell mode (after the 'sh' command) you can use the command 'reboot'
Of course this will have to be a separate (linux) script as rebooting will of course reset the time.

A better way to get the modem to resync is perhaps to send it a command to the web interface like this (again from linux box cron job):

Code: Select all

curl -u admin:password http://192.168.0.1/snr.cgi?snr=100
where the snr value is one that gives you the best speed/stability. Lower values than 100 will give more line speed at the expense of stability and SNR threshold. You'll have to play with that value.

Hope that helps!
Post Reply