# $language = "VBScript" | |
# $interface = "1.0" | |
Sub SendApplicationCommand(shell_command) | |
crt.Screen.Send shell_command & VbCr & VbCr | |
crt.sleep 1000 | |
End Sub | |
Sub main | |
pon_ni = inputbox("PON NI: [0-15]" ) | |
onu = inputbox("ONU ID: [0-127]" ) | |
SendApplicationCommand "/~ off " | |
crt.sleep 10 | |
serial = string(8 - Len(onu), "0") & onu | |
SendApplicationCommand "/api/set object=gpon_onu pon_ni=" & pon_ni & " onu_id=" & onu & " serial_number.vendor_id=00000000 ds_ber_reporting_interval=1000000 serial_number.vendor_specific=" & serial & " omci_port_id=" & onu | |
crt.sleep 10 | |
SendApplicationCommand "/~ on " | |
End Sub |