philippe44 / AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices
Other
3.46k stars 217 forks source link

Error in which the transmission ends suddenly (I'm using Sonos Play:1, Windows Laptop and iPhone) #321

Closed santi-ja closed 3 years ago

santi-ja commented 3 years ago

Hey philippe44, first of all, I wanted to thank you for the brilliant project that is helping so many users of various devices and speakers. Your project is helping me a lot to enjoy my speaker, which before I thought of selling it due to the lack of the airplay functionality. I have the sonos play:1 and a windows laptop. I don't understand almost anything of programming language and I know very little about it. The AirConnect is being used from my laptop (Samsung Book X55), I'm playing YouTube and SoundCloud songs on my iPhone 6s and all my devices are connected to the same wifi network. I'm always getting an error when I use AirConnect and I don't know how to fix it. When I open the application and run it, everything is fine, but I notice that my laptop loses the connection to my wifi network after a minute or so and then my sonos speaker interrupts the music that was playing. I have no idea what settings I have to make and neither do I know where the problem is. I would appreciate very much if you could help me with that, your application is fantastic and has an incommensurable value of use and importance. I thank you so much in advance for all your effort and commitment to make available an application that became essential for me to enjoy my favorite songs. I uploaded some screenshots so you can see what is happening when I run AirConnect. The first four pictures refer to the error that is occurring. And the fifth and last picture is to show you the files I downloaded (in case there is a file missing to download or so). Best wishes and stay healthy, santi-ja

1 2 3 4 5

philippe44 commented 3 years ago

What do you mean by "my laptop disconnects"?

santi-ja commented 3 years ago

So, I just edited my post. I wanted to say that my laptop loses the internet connection to my wifi network.

pwt commented 3 years ago

Try using larger send/receive buffers using the -l option, e.g.: airupnp-win.exe -l 3000:3000.

If that corrects the problem, you can then experiment with reducing the buffer sizes to the minimum required that still provide stable performance. As a datapoint, I use -l 750:750 with Sonos on my networks, and it works perfectly.

santi-ja commented 3 years ago

You mean just type the "airupnp-win.exe -l 3000:3000" in the command line of the application? I don't get logs or anything like that when writing this. Another problem is occurring now and I don't know why. Do you know how to fix this? Many thanks for your help and support!

1

pwt commented 3 years ago

You mean just type the "airupnp-win.exe -l 3000:3000" in the command line of the application?

Yes. Start a command terminal (cmd.exe), cd into the directory containing the airupnp-win.exe file, and run the command airupnp-win.exe -l 3000:3000.

I don't get logs or anything like that when writing this.

Logs will appear in the terminal window below where you run the command.

Another problem is occurring now and I don't know why. Do you know how to fix this?

It looks like you have some network strangeness. What kind of network is this? Is it busy, are the connections poor/slow, is is possible that there's packet filtering of some kind happening?

santi-ja commented 3 years ago

I'm going to try to do what you told me later. I don't know how to technically describe my wifi network (I only have one wifi modem in my house and the devices are connected to it), do you know how I research this on my computer so that I can give you the information you need? I'll get back to you soon :) Thanks a lot again!

El 17 ene. 2021, a la(s) 11:10, pwt notifications@github.com escribió:

 You mean just type the "airupnp-win.exe -l 3000:3000" in the command line of the application?

Yes. Start a command terminal (cmd.exe), cd into the directory containing the airupnp-win.exe file, and run the command airupnp-win.exe -l 3000:3000.

I don't get logs or anything like that when writing this.

Logs will appear in the terminal window below where you run the command.

Another problem is occurring now and I don't know why. Do you know how to fix this?

It looks like you have some network strangeness. What kind of network is this? Is it busy, are the connections poor/slow, is is possible that there's packet filtering of some kind happening?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

santi-ja commented 3 years ago

Hey pwt, sorry for my late response. I was reconfiguring my sonos speaker and it took me a while to do the whole process again. I had to connect my speaker to my router via the ethernet cable in the configuration and at the end of the process I decided to test the AirConnect. I followed all your instructions and started the AirConnect. The connection didn't take long and I connected my iPhone to my speaker. I have been listening for about 10 minutes and have not had any problems disconnecting. But the ethernet cable is still connected to the speaker. I'm afraid to remove the ethernet cable and the application won't work as well as it is working now. Let's see if it will continue to work as well as it is, I hope so. Update (Second-Third Attempts): What I told you above was my first attempt after the reconfiguration. What I noticed is that it takes me a little while to find my sonos play:1 with my iPhone when I activate the AirPlay and that if I interrupt what I am listening to, even for a short time, I get an error and the AirConnect no longer works. The errors can be seen in the photos I added to that post. Update (Fourth-etc Attempts): I can't even activate AirConnect and can't use AirPlay from my iPhone. See the third picture. Thank you so much for your help and consideration. Best wishes and stay healthy, santi-ja

1 2 3

pwt commented 3 years ago

But the ethernet cable is still connected to the speaker. I'm afraid to remove the ethernet cable and the application won't work as well as it is working now.

Might as well try it without the cable, otherwise you won't know whether it's the cable or the buffering change (or both) that makes the difference.

What I noticed is that it takes me a little while to find my sonos play:1 with my iPhone when I activate the AirPlay

This is normal, and the issue is at the iOS end. My observation is that iOS 14.3 improved matters.

if I interrupt what I am listening to, even for a short time, I get an error

This is also normal iOS behaviour. iOS devices have a tendency to drop AirPlay connections quite quickly when dormant. (You should be able to pause briefly and resume playback, or switch to another audio app, but make sure you use the audio app itself to do this, not the iOS control centre or the Sonos app.)

I can't even activate AirConnect and can't use AirPlay from my iPhone. See the third picture.

AirConnect is not finding your Sonos speaker(s). This will be due either to network issues (does the Sonos app work running on the same Windows machine?), or to a firewall issue on the Windows machine (try disabling the firewall temporarily).

santi-ja commented 3 years ago

Now the AirConnect is working well, when I pause a song the system resets quickly (I just updated my iOS to 14.3). However, my sonos play:1 stops playing music out of nowhere, due to a connection failure to my wifi network. But that only happens when I'm using AirConnect, because when I use the native Sonos application that doesn't happen and the music playback is stable (I disabled my laptop's firewall)

What changes can I make from my laptop or my wifi router to improve the stability of the AirConnect operation, so that there is no connection and disconnection all the time?

Best wishes, santi-ja

pwt commented 3 years ago

Now the AirConnect is working well, when I pause a song the system resets quickly (I just updated my iOS to 14.3). However, my sonos play:1 stops playing music out of nowhere, due to a connection failure to my wifi network. But that only happens when I'm using AirConnect, because when I use the native Sonos application that doesn't happen and the music playback is stable (I disabled my laptop's firewall)

When you play from the Sonos app, assuming you're using a streaming source, the path of the music data is:

Internet -> router -> Sonos speaker. The Sonos app on your phone is not in the data path, it's just a remote control.

When you play using AirConnect, assuming you're streaming something from the Internet, the music data path is:

Internet -> router -> iPhone -> router -> Windows PC -> router -> Sonos speaker, i.e., this is much more dependent on the overall stability of your network. Even if you're streaming content stored on the iPhone, the path is:

iPhone -> router -> Windows PC -> router -> Sonos speaker

What changes can I make from my laptop or my wifi router to improve the stability of the AirConnect operation, so that there is no connection and disconnection all the time?

Just follow normal advice for improving WiFi network signal strength and performance, and/or connect your Windows machine using an Ethernet cable.

santi-ja commented 3 years ago

I just realized that the use of AirConnect is doing something to get my internet offline, I don't know why. Do you have any idea why this is happening? I was out of internet all afternoon and had to configure my wifi router twice. I don't know which settings I need to make on my router. Thanks for all your support until now. Best wishes, santi-ja

philippe44 commented 3 years ago

No idea - AirConnect does not mess up at all with your network or internet connection (not using UPnP or so to configure it). Something else is happening to your network.

santi-ja commented 3 years ago

Can it be the sonos system that is producing these instabilities? What do you think? Cheers

El 18 ene. 2021, a la(s) 21:48, philippe44 notifications@github.com escribió:

 No idea - AirConnect does not mess up at all with your network or internet connection (not using UPnP or so to configure it). Something else is happening to your network.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

philippe44 commented 3 years ago

I don't think so, that would be the first time I'd hear about that

santi-ja commented 3 years ago

Ahh okok. I'm gonna change my router's wireless channel to 11 (it was around 4) and the channel width to 20 MHz (it was 40 MHz). Do you think this can help? These are the sonos' recommendations to reduce wireless interference. Cheers

El 19 ene. 2021, a la(s) 00:10, philippe44 notifications@github.com escribió:

 I don't think so, that would be the first time I'd hear about that

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

pwt commented 3 years ago

Can it be the sonos system that is producing these instabilities? What do you think?

There are some limited, rare instances where Sonos speakers can create severe network issues. The issues usually relate to STP storms due to loops in the Sonos network path, or a negative interaction with the 'Airtime Fairness' feature that some routers have.

Although it's off-topic for AirConnect, let me know what Sonos speakers you have, how they're all connected to the network, and what model of router you have. I'll let you know if I see anything that might indicate a problem.

I agree with @philippe44 that AirConnect doesn't do anything that might destabilise a network.

santi-ja commented 3 years ago

Hey pwt, So, I was making the settings I mentioned earlier. I changed my router's wireless channel to 11 (less crowded) and the channel width to 20 MHz. And then I tried to get the AirConnect application working again. But the same mistake happened and now I don't know what else to do. So when I'm in my other house, I'm going to try to do the whole process again and see if it's a problem with the wifi network in the house where I'm now or if it's the speaker's. My Sonos speaker is the Play:1 and it connects wirelessly to my wifi network. My wifi router is the TP LINK TL-WR840N (Wireless Router N 300Mbps). Then tell me if you find something :) Once again I thank you very much for all your help so far. You have been very kind to me. Best wishes and stay healthy, santi-ja

pwt commented 3 years ago

My Sonos speaker is the Play:1 and it connects wirelessly to my wifi network. My wifi router is the TP LINK TL-WR840N (Wireless Router N 300Mbps). Then tell me if you find something :)

I don't see any reason why this setup would present any problems in general for Sonos. Perhaps it's just that the WiFi signal is struggling due to range/congestion.

philippe44 commented 3 years ago

Closed for inactivity