FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14165 questions

16819 answers

27656 comments

54126 members

0 votes
123 views 1 comments
by
Is there any way to switch for example the relay output of the RUT955 when a wan connection is established.

i'd like to build the rut955 in an case and show with a lamp outside the case, if an internet connection is ok!

1 Answer

0 votes
by

Hi,

Unfortunately, there's no dedicated way to do what you're asking. What I could recommend is to make a script that always checks if Wired WAN got the link detected or not.

As you want it to check on "Connection established" you would also need to ping through that interface link.

To check if you got the link use third-party opkg package called ethtool. Download it with these commands:

opkg update

opkg install ethtool

Once you're done with downloading, execute ethtool eth1 and you'll get the information about WAN port of the router, but what is important in there is "Link Detected" line. Use it to check if LINK is established.

If you want to check if you got the working connection through Wired WAN - you will have to ping outside networking through Wired WAN interface.

Use ping -I eth1 8.8.8.8 (or any other address that you like) and depending on the ping response - activate relay output with the script.

EB.

by
Hello, I know this an old thread.  But can you not use mwan3 to do this?