Help with accessing a UPnP (DLNA) server


Userlevel 5
Badge +9

I know this has been asked before, but not for quite a while, so I’m hoping things may have improved, or there may be some more relevant recent experience.

When I was having trouble getting shared folders working (my environment is Linux, which involves configuring SAMBA which is not exactly simple) it was suggested that setting up a UPnP media server instead should be easier.

It turns out that setting up the UPnP server was easy under Linux, but getting the Sonos controller to see it is not!

I chose to use Rygel as the server (rather than MiniDLNA, which has not been maintained for years), and it was almost trivial to set up. If I use VLC Media Player or Windows Media Player I can see the files on the server and play them remotely without a problem, but the Sonos controller does not display the server when I look at the Browse screen, or anywhere else for that matter.

Can anyone suggest things to try that they think I may have missed? Unfortunately I don’t think Sonos document exactly what they support in terms of DLNA, so I’m working in the dark a bit here...


This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

21 replies

An obvious question perhaps (but just in case), have you enabled the UPnP service in the Sonos App "Settings/System/Media Servers”?

Userlevel 5
Badge +9

Thanks - yes, I have. Made no difference at all, sadly.

What type of file system is the disk or partition using for the music library - I’m just wondering if the disk format might be the issue? I’m not sure if Sonos can see certain file systems… but it’s just a thought, rather than something I’m actually aware of? I’m thinking it might need to be Fat16 or 32 rather than say Ext4 perhaps?

I know shared libraries have some limitations in this area… see this link:

https://support.sonos.com/s/article/4876

I’m just not sure if something similar may also apply to a UPnP service?

Userlevel 5
Badge +9

I think that UPnP should completely hide the filesystem type from the client. The server is indeed running with an Ext4 filesystem, but Windows Media Player sees the files absolutely fine and Windows has no concept of what Ext4 is (or more accurately, Microsoft chooses to make sure that Windows cannot read any fully native Linux filesystems).

My understanding is that one of the features of UPnP is to make such underlying differences invisible to the client.

I did just quickly setup a UPnP server on an iPad Pro using a free App called UPnP Xtreme, just to check the Sonos App is working with UPnP servers and that has setup fine (see screenshot) albeit I don’t have any music stored on the device to test it fully, but it certainly shows up on the ‘Browse Tab’.

I can only think it might be something with the server software, but why it works with other Apps and not Sonos, I’m not sure, unless there’s some kind of compatibility/sharing issue, perhaps?

The Sonos App is picking up/seeing such servers from what I’m seeing here.

Badge +20

I was on the other thread and likewise I turned on a UPnP  server which run on an old WD NAS, work ok with Sonos and it also found my Panasonic TV. So like Ken guessing it’s Rygel, is there a dedicated forum where you can ask for help?

Userlevel 5
Badge +9

Thanks - the only option within Rygel that might have a bearing is the “force-downgrade-for” option, which forces downgrade to MediaServer:1 and/or ContentDirectory:1 but I’ve no idea if the Sonos Controller requires it!

The problem with trying to set that option is that you need to include a semicolon-separated list of device user-agents that need to use that option - but how do I find out what a Sonos user-agent name looks like to put it in the list, if I can never get the user-agent to recognise that the DLNA server exists?

Nothing ventured…

Maybe try this - in a web browser goto "http://[Any Sonos Device IP Address]:1400/support/review” 

Your devices get listed by room name followed by something that looks like this… "RINCON_542A1BD0029202400” in brackets 

Maybe try those as the "user-agents".

Perhaps just try one device to begin with.
HTH

 

Userlevel 5
Badge +9

Thanks - Windows Media Player lists the Sonos devices (as servers, not clients) by IP address so I tried adding the IP addresses of all of the Sonos boxes in the “force-downgrade-for” option but… no dice!

I’ll try what you suggest - I can see the “RINCON_...” string that you refer to as a UUID in Widows as well, so that might work. I’ll give it a try….

Edit: No - didn’t work! Ok, time to get rid of Rygel and see if MiniDLNA will work instead.

Userlevel 5
Badge +9

[Slight delay while I got my Symfonisk speakers up and running]

Ok, I’ve uninstalled Rygel and installed MiniDLNA, and MiniDLNA is working - I can fire up a Windows machine, run Windows Media Player and it will find the server and play music Ok. Or I can use VLC Media Player on a Linux-based PC and it will play music from the server Ok.

But… the Sonos controller refuses to see it. This is just an abject failure. It’s not a problem with filesystems or permissions or firewalls because everything else on my network can see it and play from it.

So… if anyone else can suggest other things to try I would be grateful.

I know it can be done (or at least it has been done in the past) because it was a post in this forum that suggested that I use MiniDLNA!

Antifon,

Anything on the controller mobile device that might be stopping you seeing the UPnP service, perhaps security software of some kind? Or, is the controller connecting to the speakers via an access point that is perhaps operating on a different WiFi channel to the one in use for the speakers (assuming they are on WiFi and not running on SonosNet?).

Also if the speakers are running on the local router WiFi signal, then perhaps try them on SonosNet instead by wiring just one Sonos device to the LAN, to see if that makes a difference.

If no luck after that, then perhap consider resetting the Sonos Controller App from “Settings/App Preferences” and connecting back to the existing system to see if that resolves the issue.

If you have access to a Windows machine does it’s Window Media Server service show up on your controller App?

Userlevel 5
Badge +9

There is nothing unusual about the controller - it’s just a Lenovo Android tablet that has the simplest possible history - I took it out of the box, updated the software and installed the Sonos S2 app - that’s all I’ve ever done with it.

All of the Sonos devices (three Ports, two Symfonisks, one Move) are on SonosNet with a dedicated connection from a Boost to my router, except the Move (which can’t be on Sonosnet). The Move is on its own dedicated Access Point directly connected to my broadband router.

I’ve tried turning on Media Streaming on the Windows PC and that does immediately show up under the “Browse” section on the Sonos controller. Given that, it probably won’t help to reset the controller app.

So, it seems that there is something about the way that both Rygel and MiniDLNA are advertising themselves on the network that the controller doesn’t like. But how do I find out what??? Or do I just give up?

With your Move on WiFi and your other speakers on SonosNet I would have expected things to work and particularly as you mention the Lenovo tablet is virtually straight out the box... so I’m really at a loss as to why both UPnP servers you have tried are not showing up in the Sonos App and the fact they are working with other UPnP clients like VLC Media Player, makes it even more baffling?

I did a quick search and came across this thread below, but I find it somewhat confusing, as it mentions going through a shared library setup, rather than accessing a UPnP service?.. but thought you may want to see it anyway and perhaps message the user, by all accounts the user is using an SMB v1 share, rather than a ‘media server’ setup.

https://en.community.sonos.com/controllers-software-228995/playbar-linux-minidlna-in-2020-6838000

My thoughts are to go onto speak/web-chat with Sonos Support via this LINK, to see if they can perhaps provide any further suggestions for you to try. 

Hope you find the answers you are looking for.

Userlevel 5
Badge +9

Ken - thanks for your thoughts. I had seen that thread, but it does indeed seem a bit confused!

I did try adding a shared library as you suggest, using the location (as reported by VLC Media Player on one of my Linux machines):

upnp://http://192.168.1.5:8200/ctl/ContentDir&ObjectID=0

- and all of the variations that I could think of, but the shared library setup dialogue really does seem to only want to see an SMB share. If I chop off the http:// and/or the upnp:// it will try but just says that there is no shared folder at /ctl on that computer.

I’ll try the support link that you provided a bit later, but first I’m going to look through every one of the options in the MiniDLNA config file, in case there is anything obscure set to =false when =true, or vice versa, might help!

It certainly seems to be broken, doesn't it? I tried 3 different UPnP/DLNA servers and none show up in the Sonos app. They all showed up on my TV, my receiver and my Windows PC running Windows Media Player, however! I guess this feature is broken?? I tried the support chat bot and only got various responses of “I don’t know about that”. Disappointing…

 

Userlevel 7
Badge +23

I have been producing Sonos apps for about a decade, with hundreds of thousands of customers. In all that time, one person asked for it to support UPnP/DLNA servers. I investigated the work required, but it was too much to be worth it, especially for one customer in my case.

Hi controlav, I’ve been going through the forums (and loads of other places in the Internet) trying to find a simple way to just play status messages / alerts (mp3 files) on my Sonos 1 from a C# WPF app I’m writing.
From your last message above UPnP is not the way to go, I was going try and use LibVLC that has UPnP support.
Could you point me in the right direction please and/or have any hints?
Also what’s the Sonos app you’ve written please?

Thanks in advance.
Martin

Userlevel 7
Badge +23

Hi controlav, I’ve been going through the forums (and loads of other places in the Internet) trying to find a simple way to just play status messages / alerts (mp3 files) on my Sonos 1 from a C# WPF app I’m writing.
From your last message above UPnP is not the way to go, I was going try and use LibVLC that has UPnP support.
Could you point me in the right direction please and/or have any hints?
Also what’s the Sonos app you’ve written please?

Thanks in advance.
Martin


The “simplest” way to play your own audio is via the audioClip cloud call but it only works on a subset of devices. See https://developer.sonos.com/reference/control-api/audioclip/ It does resume the previous content though, which is impossible to do the other way.

The other way is to use UPnP to stream from a local url. You’ll need an http server to supply the stream (LibVLC might have one, dunno), then call AVTransport.SetAVTransportURI on your device of choice.

My apps are listed in my Profile (I get into trouble if I namedrop them directly).

Thank you for the update. I found ur app and purchased and installed. :-)
I don’t suppose you hav any plans 2 release the guts of ur app as a library?

So if somethin is playin and I (hopefully) manage 2 send audio 2 play it via UPnP there’s no way 2 pause the current audio and resume it afterwards?

Queen at Knebworth! So jealous. Saw them at Isle of White festival with Adam Lambert, not the same but still an incredible show. :-)

Userlevel 7
Badge +23

When I created the iOS app I structured the code and the project with a view to open sourcing the whole thing. Its .Net Core code so runs on Windows/iOS/Android, unlike my Windows app codebase which has a long history and some knarly code I wouldn’t want anyone else to see. Plus its not remotely portable.

I might still open source the newer repo one day. Dunno.

Saving and restoring the playstate via UPnP is an impossible task, which is why the audioClip method is preferred.

Queen was my first ever concert, quite the one to start with. Took about four hours to get out of the damn car park.

Ok.
Understood.
Yeah, I was trying to avoid havin 2 use any ‘cloud’ services cause if want to alert ‘Smoke detected in kitchen’ and the internet is off…

Mmm, I thought u could get all sorts of ‘state’ info by just calling the SOAP requests and would then b abl 2 pause, play alert and continue.

Wow, what an introduction to live music. Crikey, 4 hours. Worth it though I imagine. :-)