iopsys-feed/ponmngr/files/broadcom/lib/xpon/broadcom.sh
2022-08-18 15:21:38 +05:30

30 lines
618 B
Bash

#!/bin/sh
. /lib/functions.sh
set_serial_number() {
vendor_id=$1
vssn=$2
vendor_id="$(echo $vendor_id | hexdump -e '4/1 "%02X" "\n"')"
vendor_id=${vendor_id:0:8}
bs /b/c gpon onu_sn={vendor_id=$vendor_id,vendor_specific=$vssn}
}
init_xpon() {
procd_open_instance pon_msgd
procd_set_param command bcm_msgd -c gpon
procd_close_instance
procd_open_instance pon_daemon
procd_set_param command omcid start -n
procd_set_param respawn
procd_close_instance
}
deinit_xpon() {
# stopping omcid does not bring down the pon link, which should happen
# if ANI is disabled or stopped (go to O1)
gponctl stop
}