diff --git a/voltha/adapters/broadcom_onu/broadcom_onu.py b/voltha/adapters/broadcom_onu/broadcom_onu.py
index 2d74946..512718f 100644
--- a/voltha/adapters/broadcom_onu/broadcom_onu.py
+++ b/voltha/adapters/broadcom_onu/broadcom_onu.py
@@ -193,7 +193,7 @@
             id='uni-{}'.format(port_no),
             ofp_port=ofp_port(
                 port_no=port_no,
-                hw_addr=mac_str_to_tuple('00:00:00:00:00:%02x' % port_no),
+                hw_addr=mac_str_to_tuple('00:00:00:00:%02x:%02x' % ((port_no >> 8) & 0xff, port_no & 0xff)),
                 name='uni-{}'.format(port_no),
                 config=0,
                 state=OFPPS_LIVE,
@@ -207,7 +207,7 @@
             device_port_no=uni_port.port_no
         ))
 
-        reactor.callLater(5, self.message_exchange)
+        reactor.callLater(10, self.message_exchange)
 
         device = self.adapter_agent.get_device(device.id)
         device.oper_status = OperStatus.ACTIVE
diff --git a/voltha/extensions/eoam/EOAM.py b/voltha/extensions/eoam/EOAM.py
index 9b2c023..cd63eb5 100644
--- a/voltha/extensions/eoam/EOAM.py
+++ b/voltha/extensions/eoam/EOAM.py
@@ -62,7 +62,7 @@
             print("sleep     = %d" % self.sleep)
             print("=== END Settings ============")
 
-    def send_frame(self, frame_body):
+    def send_frame(self, frame_body, slow_protocol=True):
         PACKET = Ether()
         PACKET.dst = self.dst
         PACKET.src = self.getHwAddr(self.interface)
@@ -76,7 +76,7 @@
                 PACKET/=Dot1Q(type=0x8100,vlan=int(self.stag))
                 PACKET/=Dot1Q(type=self.etype,vlan=int(self.ctag))
             else:
-                PACKET/=Dot1Q(type=self.etype,vlan=int(self.stag))
+                PACKET/=Dot1Q(prio=7,type=self.etype,vlan=int(self.stag))
         else:
             if self.ctag:
                 PACKET.type = 0x8100
@@ -84,9 +84,14 @@
             else:
                 PACKET.type = self.etype
 #            PACKET/=Dot1Q(type=self.etype, vlan=int(self.ctag))
-        PACKET/=SlowProtocolsSubtype()/FlagsBytes()/OAMPDU()
-        PACKET/=frame_body
-        PACKET/=EndOfPDU()
+        if slow_protocol:
+            PACKET /= SlowProtocolsSubtype()/FlagsBytes()/OAMPDU()
+            PACKET /= frame_body
+            PACKET /= EndOfPDU()
+        else:
+            PACKET.lastlayer().type = 0x9001
+            PACKET /= frame_body
+            
         if (self.verbose == True):
             PACKET.show()
             print '###[ Frame Length %d (before padding) ]###' % len(PACKET)
@@ -137,6 +142,15 @@
     digits = [int(d) for d in ip.split('.')]
     return '01:00:5e:%02x:%02x:%02x' % (digits[1] & 0x7f, digits[2] & 0xff, digits[3] & 0xff)
 
+
+class TBJSON(Packet):
+    """ TBJSON 'packet' layer. """
+    name = "TBJSON"
+    fields_desc = [StrField("data", default="")]
+
+bind_layers(Ether, TBJSON, type=0x9001)
+
+
 if __name__ == "__main__":
     parser = argparse.ArgumentParser()
     parser.add_argument('-d', '--dst', dest='dst', action='store', default=EOAM_MULTICAST_ADDRESS,
@@ -178,6 +192,8 @@
                         help='Run commands under test')
     parser.add_argument('-tm', '--test_multicast', dest='test_multicast', action='store_true', default=False,
                         help='Run commands under test')
+    parser.add_argument('-tp', '--test_ping', dest='test_ping', action='store_true', default=False,
+                        help='Issue a test ping to get JSON data on device version')
 
     args = parser.parse_args()
 
@@ -205,7 +221,8 @@
         and not args.test_dhcp
         and not args.test_upstream
         and not args.test_downstream
-        and not args.test_multicast):
+        and not args.test_multicast
+        and not args.test_ping):
         print 'WARNING: *** No frames sent, please specify \'test\' or \'critical\', etc.  See --help'
 
 
@@ -441,3 +458,10 @@
                          PortIngressRuleResultDelete(fieldcode=Clause['C-VLAN Tag'])/
                          PortIngressRuleTerminator()/
                          DeletePortIngressRule())
+
+
+    if (args.test_ping == True):
+        json_operation_str = '{\"operation\":\"version\"}'
+        for i in range(10000):
+            eoam.send_frame(TBJSON(data='json %s' % json_operation_str), False)
+
