def play_music_and_connect_wifi(self):
        """Perform a2dp music streaming and scan and connect to wifi
        network

        Returns:
            True if successful, False otherwise.
        """
        if not music_play_and_check_via_app(self.pri_ad,
                                            self.audio_receiver.mac_address):
            self.log.error("Failed to stream music file")
            return False
        if not connect_wlan_profile(self.pri_ad, self.network):
            return False
        return True
 def ble_with_multiprofile_connection(self):
     """Wrapper function to check ble connection along with a2dp streaming
     and hfp call connection with iperf.
     """
     if not connect_ble(self.pri_ad, self.sec_ad):
         self.log.error("Failed to connect BLE device")
         return False
     if not music_play_and_check_via_app(self.pri_ad,
                                         self.audio_receiver.mac_address):
         self.log.error("Failed to stream music file")
         return False
     tasks = [(self.run_iperf_and_get_result, ()),
              (initiate_disconnect_from_hf,
               (self.audio_receiver, self.pri_ad, self.sec_ad,
                self.iperf["duration"]))]
     if not multithread_func(self.log, tasks):
         return False
     return self.teardown_result()
    def start_media_streaming_initiate_hfp_call_with_iperf(self):
        """Start media streaming and initiate call from hf to check
        SCO connection along with iperf.

        Returns:
            True if successful, False otherwise.
        """
        self.run_iperf_and_get_result()
        if not music_play_and_check_via_app(self.pri_ad,
                                            self.audio_receiver.mac_address):
            self.log.error("Failed to stream music file")
            return False
        if not initiate_disconnect_from_hf(self.audio_receiver, self.pri_ad,
                                           self.sec_ad,
                                           self.iperf["duration"]):
            self.log.error("Failed to initiate/hang up call")
            return False
        return self.teardown_result()