# $language = "VBScript" | |
# $interface = "1.0" | |
Sub Sleep(timewait) | |
If crt.screen.waitforstring("pause", timewait) = true then msgbox "surprise" | |
End Sub | |
Sub SendShellCommand(shell_command) | |
crt.Screen.Send shell_command & VbCr | |
End Sub | |
sub main | |
SendShellCommand("root") | |
crt.Sleep 100 | |
SendShellCommand("root") | |
crt.Sleep 100 | |
SendShellCommand("cd /opt/bcm68620/") | |
crt.screen.WaitForString "#" | |
crt.Sleep 100 | |
SendShellCommand("./svk_init.sh") | |
crt.screen.WaitForString ">" | |
crt.Sleep 1000 | |
crt.Screen.Send VbCr | |
'mandatory | |
SendShellCommand("/api/set object=device system_mode=gpon__16_x") | |
crt.Sleep 50 | |
'Optional - configure the NNI speed in order to work with a 1g traffic generator | |
SendShellCommand("/api/set object=device nni_speed.first_half=gbps_1 nni_speed.second_half=gbps_1 ") | |
crt.Sleep 50 | |
'Optional - configure the PCIe dma queues sizes or configure the system not to fail on bad AVS check. | |
SendShellCommand("/api/set object=device debug.host_dma_rx_queue_size=128 debug.host_dma_tx_queue_size=128 debug.avs_control=yes") | |
crt.Sleep 50 | |
'Optional - configure the keep alive parameters | |
SendShellCommand("/api/set object=device keepalive_interval=5 keepalive_tolerance=3") | |
crt.Screen.Send VbCr | |
crt.screen.WaitForString ">" | |
crt.Sleep 50 | |
crt.Screen.Send VbCr | |
SendShellCommand("/user/register_indication_handler") | |
crt.Screen.Send VbCr | |
crt.Screen.Send VbCr | |
crt.screen.WaitForString ">" | |
crt.Screen.Send VbCr | |
crt.Sleep 50 | |
SendShellCommand("/user/register_proxy_rx_handler ") | |
crt.Screen.Send VbCr | |
crt.Sleep 50 | |
crt.Screen.Send VbCr | |
SendShellCommand("/api/oper object=device sub=connect ") | |
crt.Screen.Send VbCr | |
crt.screen.WaitForString ">" | |
crt.Screen.Send VbCr | |
crt.Sleep 50 | |
End Sub |