# When playing music from Android phone on Raspberry Pi playback stops after a few songs

**URL:** <https://community.yatse.tv/t/when-playing-music-from-android-phone-on-raspberry-pi-playback-stops-after-a-few-songs/1585>\
**Category:** Solved\
**Tags:** cast, kodi\
**Created:** [March 9, 2019, 7:39pm UTC](https://community.yatse.tv/t/when-playing-music-from-android-phone-on-raspberry-pi-playback-stops-after-a-few-songs/1585 "2019-03-09T19:39:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jelle.Bosmans](https://community.yatse.tv/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@Jelle.Bosmans](https://community.yatse.tv/u/Jelle.Bosmans)\
**Post date:** [March 9, 2019, 7:39pm UTC](https://community.yatse.tv/t/when-playing-music-from-android-phone-on-raspberry-pi-playback-stops-after-a-few-songs/1585/1 "2019-03-09T19:39:38Z")

</div>

**Issue description** :  
I’m using Yatse to play music files on my Android phone (Motorola Moto G3, Android 6.0.1) to Kodi running on a Raspberry Pi 3 Model B+. The playback works fine but often stops after a 2-5 songs. It stop playing after a song finishes, songs are never interrupted. The playback queue in Yatse is emptied and playback can only be resumed by selecting a new song to play.  
I’ve made the following attempts to solve the problem, without success:

- Followed configuration steps on [How to configure Kodi for Remote Control access](https://yatse.tv/wiki/configure-kodi-remote-control-access)
- Connect Raspberry Pi via WiFi with fixed IP address
- Connect Raspberry Pi with cabled LAN connection

**Logs** :  
Kodi  
[kodi.log](https://community.yatse.tv/uploads/default/original/1X/85f97c889b344a2c4bde1116b905fbf9e3c7080e.log) (7.0 MB)  
Yatse  
[debug-20190305\_213420.zip](https://community.yatse.tv/uploads/default/original/1X/8b9901e40d4ad1226d2de728000f2fb2b5fa6650.zip) (42.8 KB)

Thanks!

---

<div class="post-metadata">

**Author:** ![Tolriq](https://community.yatse.tv/user_avatar/community.yatse.tv/tolriq/32/12_2.png) [@Tolriq](https://community.yatse.tv/u/Tolriq)\
**Post date:** [March 9, 2019, 8:18pm UTC](https://community.yatse.tv/t/when-playing-music-from-android-phone-on-raspberry-pi-playback-stops-after-a-few-songs/1585/2 "2019-03-09T20:18:15Z")

</div>

Your device does not respect the wakelocks and disconnect from Wifi after a while ☹

2019-03-05 21:28:04.054 Verbose/EventManager: ConnectivityManager$CallbackHandler.handleMessage@2359: NetworkCallback onLost

There’s OS settings to not disconnect Wifi when screen is off. And you can try to disable Battery Optimisation for the app if it’s badly implemented by your device:

> **[General](https://dontkillmyapp.com/general)**
>
> Hey Android vendors, don’t kill my app!

---

<div class="post-metadata">

**Author:** ![Jelle.Bosmans](https://community.yatse.tv/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@Jelle.Bosmans](https://community.yatse.tv/u/Jelle.Bosmans)\
**Post date:** [March 9, 2019, 8:48pm UTC](https://community.yatse.tv/t/when-playing-music-from-android-phone-on-raspberry-pi-playback-stops-after-a-few-songs/1585/3 "2019-03-09T20:48:07Z")

</div>

Bad device, BAD!

I will try your suggestions & test. Thanks for the quick reply!

---

<div class="post-metadata">

**Author:** ![Jelle.Bosmans](https://community.yatse.tv/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@Jelle.Bosmans](https://community.yatse.tv/u/Jelle.Bosmans)\
**Post date:** [March 22, 2019, 7:08pm UTC](https://community.yatse.tv/t/when-playing-music-from-android-phone-on-raspberry-pi-playback-stops-after-a-few-songs/1585/4 "2019-03-22T19:08:03Z")

</div>

I have checked the OS settings and disable Battery Optimization for Yatse. The problem has become less frequent but still it keeps happening. I have attached a new set of Yatse logs, in the hope that you can help me solve this once and for all 🙂  
[debug-20190322\_192155.zip](https://community.yatse.tv/uploads/default/original/1X/30f24d19f299cba1b3441f0d6ae65b3662366590.zip) (74.1 KB)

---

<div class="post-metadata">

**Author:** ![Tolriq](https://community.yatse.tv/user_avatar/community.yatse.tv/tolriq/32/12_2.png) [@Tolriq](https://community.yatse.tv/u/Tolriq)\
**Post date:** [March 22, 2019, 7:47pm UTC](https://community.yatse.tv/t/when-playing-music-from-android-phone-on-raspberry-pi-playback-stops-after-a-few-songs/1585/5 "2019-03-22T19:47:15Z")

</div>

This is still the same issue your device disconnect from Wifi after a while. Are you sure you have verified the Android option to not disconnect wifi when screen off?

2019-03-22 18:15:55.128 Verbose/EventManager: ConnectivityManager$CallbackHandler.handleMessage@2359: NetworkCallback onLost

Device loose connection at 18:15

2019-03-22 18:15:56.208 Verbose/EventManager: ConnectivityManager$CallbackHandler.handleMessage@2345: NetworkCallback onAvailable  
2019-03-22 18:15:56.248 Verbose/NetworkManager: b.a@4: Status: true / MOBILE

Switch to network mobile after 1 second.

2019-03-22 18:15:57.480 Verbose/YatseNetworkReceiver: LoadedApk$ReceiverDispatcher$Args.run@881: Network status connection change  
2019-03-22 18:15:57.486 Verbose/NetworkManager: b.a@4: Status: true / WIFI

Wifi is back on after 1 more seconds.

Later:  
2019-03-22 19:14:37.153 Verbose/EventManager: ConnectivityManager$CallbackHandler.handleMessage@2359: NetworkCallback onLost  
2019-03-22 19:14:39.661 Verbose/YatseNetworkReceiver: LoadedApk$ReceiverDispatcher$Args.run@881: Network status connection change

Again 2 seconds without Wifi.

Just to be sure you have the advanced settings high speed wifi streaming activated ?
