def _discover_mac(self):
        """ Discovers MAC address of device.

        Discovery is done by sending a UDP broadcast.
        All configured devices reply. The response contains
        the MAC address in both needed formats.

        Discovery of multiple switches must be done synchronously.

        :returns: Tuple of MAC address and reversed MAC address.
        """
        mac = None
        mac_reversed = None
        cmd = MAGIC + DISCOVERY
        resp = self._udp_transact(cmd, self._discovery_resp,
                                  broadcast=True,
                                  timeout=DISCOVERY_TIMEOUT)
        if resp:
            (mac, mac_reversed) = resp
        if mac is None:
            raise S20Exception("Couldn't discover {}".format(self.host))
        return (mac, mac_reversed)