added getWiFiBroadcastAddress method and some fixes and debug logging