Skip to content

Instantly share code, notes, and snippets.

@dot1q
Last active February 22, 2019 12:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dot1q/cb6e33c7dd2ce7a174ab8c768c8a3b48 to your computer and use it in GitHub Desktop.
Save dot1q/cb6e33c7dd2ce7a174ab8c768c8a3b48 to your computer and use it in GitHub Desktop.
Telnet into CMS, Connect to E7(or other device) stack and open the remote timer on an ONT
#!/usr/bin/expect
set ont [lindex $argv 0]
# Arg is the ONT Profile number
set timeout 20
spawn telnet 10.10.10.10 9199
#The script expects login
expect ">"
#The script sends the user variable
send "ACT-USER:NTWK-CMSHOSTNAME:USERNAME:::PASSWORD;"
expect "CMSHOSTNAME>"
send "set ont-port $ont/G1 remote-access-time 30\r"
expect "CMSHOSTNAME>"
send "show ont $ont detail\r"
expect "CMSHOSTNAME>"
interactive
exit 0
@dot1q
Copy link
Author

dot1q commented Feb 5, 2017

This assumes that the ONT has a RG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment