Tibit OLT and ONU Adapter Updates

Change-Id: I75820681dc55f6ba6988beae449b21612df20ae7
diff --git a/voltha/adapters/tibit_olt/tibit_olt.py b/voltha/adapters/tibit_olt/tibit_olt.py
index 57fc1f2..1947333 100644
--- a/voltha/adapters/tibit_olt/tibit_olt.py
+++ b/voltha/adapters/tibit_olt/tibit_olt.py
@@ -1103,14 +1103,20 @@
               Dot1Q(vlan=proxy_address.channel_id, prio=TIBIT_MGMT_PRIORITY) / \
               msg
         else:
-            # Use the standard to send OMCI over OAM
-            encapsulated_omci = EOAM_OmciMsg(body=msg)
+
+            # Can receive OMCI frames encoded as strings or as byte-arrays
+            try:
+                msgBytes = bytearray.fromhex(msg)
+                encapsulated_omci = EOAM_OmciMsg(body=msgBytes)
+            except ValueError:
+                encapsulated_omci = EOAM_OmciMsg(body=msg)
 
             frame = Ether(dst=device.mac_address) / \
               Dot1Q(vlan=TIBIT_MGMT_VLAN, prio=TIBIT_MGMT_PRIORITY) / \
               Dot1Q(vlan=proxy_address.channel_id, prio=TIBIT_MGMT_PRIORITY) / \
               EOAMPayload() / EOAM_VendSpecificMsg(oui=IEEE_OUI) / \
-              encapsulated_omci
+              encapsulated_omci /\
+              EndOfPDU()
 
         self.io_port.send(str(frame))
 
diff --git a/voltha/adapters/tibit_onu/tibit_onu.py b/voltha/adapters/tibit_onu/tibit_onu.py
index ee37bd4..228c0b1 100644
--- a/voltha/adapters/tibit_onu/tibit_onu.py
+++ b/voltha/adapters/tibit_onu/tibit_onu.py
@@ -570,10 +570,20 @@
 
 
         if self.mode.upper()[0] == "G":  # GPON
+
+            hw_vers = int(device.hardware_version[2:], 16)
+
+            if hw_vers >= 0x170517:
+                mcastLidx = 0x14bc
+            else:
+                mcastLidx = 0x10bc
+
+            log.info("Using Multicast LIDX {:04X}".format(mcastLidx))
+
             # construct multicast LLID set
             msg = (
                 EOAMPayload() / EOAM_VendSpecificMsg(oui=CableLabs_OUI) /
-                EOAM_DpoeMsg(dpoe_opcode=Dpoe_Opcodes["Multicast Register"],body=MulticastRegisterSet(MulticastLink=0x10bc, UnicastLink=0)
+                EOAM_DpoeMsg(dpoe_opcode=Dpoe_Opcodes["Multicast Register"],body=MulticastRegisterSet(MulticastLink=mcastLidx, UnicastLink=0)
                 ))
 
             # send message