OMCI_OLT_MODE=0
GPON_ONU_MODEL=HG8145V5
OMCI_FAKE_OK=1
PON_VENDOR_ID=HWTC
GPON_SN=HWTCXXXXXX
ELAN_MAC_ADDR=xxxxxxx
OMCI_SW_VER1=V5R019C00S107
OMCI_SW_VER2=V5R019C00S107
HW_HWVER=15AD.A
GPON_ONU_MODEL=HG8145V5
VLAN_CFG_TYPE=1
VLAN_MANU_MODE=0
VLAN_MANU_TAG_VID=100
#!/usr/bin/env python3
#ODI DFP-34X-2C2 MAC_KEY key generator by rajkosto
import sys
import string
import hashlib
args = sys.argv
if len(args) != 2:
sys.exit("Usage: odi_keygen.py YOURMACADDR")
macAddr = args[1].strip().replace(':','')
if len(macAddr) != 12:
sys.exit("Mac address must be 12 hex digits (6 bytes)")
if not all(c in string.hexdigits for c in macAddr):
sys.exit("Mac address can only contain 0-9, A-F characters (hex digits)")
cmacPrefix = 'hsgq1.9a'
hashText = cmacPrefix+macAddr.upper()
encodedText = hashText.encode('ascii')
md5Hash = hashlib.md5(encodedText).digest().hex()
print('ELAN_MAC_ADDR='+macAddr.lower())
print('MAC_KEY='+md5Hash.lower())
# omcicli mib get 84
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
VlanTagFilterData
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
=================================
EntityID: 0x01
FilterTbl[0]: PRI 0,CFI 0, VID 100
FwdOp: 0x04
NumOfEntries: 1
=================================
=================================
EntityID: 0x02
FilterTbl[0]: PRI 0,CFI 0, VID 660
FwdOp: 0x04
NumOfEntries: 1
=================================
=================================
EntityID: 0x03
FilterTbl[0]: PRI 0,CFI 0, VID 100
FwdOp: 0x04
NumOfEntries: 1
=================================