blob: d9df87dac1cdf846137f36ec8e7c3ef1d50c16ed [file] [log] [blame]
Shad Ansari2f7f9be2017-06-07 13:34:53 -07001# $language = "VBScript"
2# $interface = "1.0"
3
4Sub SendApplicationCommand(shell_command)
5 crt.Screen.Send shell_command & VbCr & VbCr
6 crt.sleep 1000
7End Sub
8
9Sub main
10
11 pon_ni = inputbox("PON NI: XGPON:[0-7] XGS:[0-1]" )
12
13
14if pon_ni < 4 then
15 SendApplicationCommand "/board/i2c/dev_change dev=sw2"
16 crt.sleep 100
17 SendApplicationCommand "/board/i2c/dev_write width=8 addr=0 val=0x" & hex(2 ^ (3 - pon_ni)) &" "
18 crt.sleep 10
19else
20SendApplicationCommand "/board/i2c/dev_change dev=sw3"
21 crt.sleep 100
22
23
24 SendApplicationCommand "/board/i2c/dev_write width=8 addr=0 val=0x" & hex(2 ^ pon_ni) &" "
25 crt.sleep 10
26
27
28end if
29 SendApplicationCommand "/board/i2c/dev_change sfp1 "
30 crt.sleep 10
31 SendApplicationCommand "/board/i2c/dev_read width=8 addr=0x68"
32 crt.sleep 10
33 SendApplicationCommand "/board/i2c/dev_read width=8 addr=0x69"
34 crt.sleep 10
35
36
37End Sub