Hi,
Is that any python that used to detect PPP down in WR11?
BR
Hi,
Is that any python that used to detect PPP down in WR11?
BR
Hi the easy way is to use saroscli library and talk to the WR11 at CLI with the “PPP 1 status” or “PPPstat 1”
this will tell you if the ppp is idle or if it has an IP address
def ppp_is_up(ppp_nb):
…ret = False
…mycmd = “ppp " + str(ppp_nb) + " status”
…res = writeCli(mycmd)
…if “IP Address:” in res:
…if not “IP Address: 0.0.0.0” in res:
…ret = True
…return ret
this was some code i used to check if PPP had a IP address and could pass it which instance of PPP to check if your doing dual sim fail over
The WriteCLI is used to talk to the CLI of the transport
import saroscli
def writeCli( str ):
…cli = sarcli.open()
…cli.write( str )
…res = cli.read()
…cli.close()
…return( res )
hope that helps
regards
James