c# - Can UPnP handle 1000+ devices with multiple services running on each device?

07
2014-07
  • Curtis

    Good morning,

    We were going to use UPnP for our network discovery. In order to be able to use this protocol, we need to be able to handle discovery of 1,000 devices on a network. As a maximum, the number may be up to 3,000 devices. Was UPnP designed to handle this many devices?

    There is no server on our system. The user would connect a computer and that computer would go out and discover all the devices when attached to the network. The computer would not always be attached to the network.

    If UPnP cannot handle that kind of traffic, how would I go about discovering network devices? One good thing, is that we are writing the code on all the devices, as well as the control point that would discover the devices. So we can pretty much do anything we like, but would like to use UPnP as it is an established protocol. Since it uses UDP in the standard libraries, we would probably have a problem with dropped messages when so many devices are all responding over a very short period of time.

    Is there another standard protocol we could use other than UPnP?

    I would appreciate any advice that a UPnP expert has to offer, or somebody who has worked out this discovery issue without UPnP.

    Some prototype testing we have done has indicated that the UPnP library we are using starts maxing out the CPU of the machine it is running on when we attempt to emulate 50+ UPnPDevices.

    We were thinking there was something wrong with the open source UPnP library we were using, or perhaps the way we were using the library. Then, I read a posting that said UPnP would have problems with discovery of 2,000+ devices.

    So, my questions are:

    1. Does UPnP allow for thousands of devices to be discovered without missing any of them? a. If so, how do we guarantee that all UDP messages arrive? b. If not, what standard protocol, or practice could we use to allow the software to detect the 1000+ devices on the network, in a reasonable amount of time, without causing too much network traffic.
    2. What is a good library to use that uses Managed C# and implements UPnP ?

    Thanks in advance for your help

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    streaming - Application to Stream any Audio to UPnP Device (XBox 360)
  • Adam Haile

    Is there any sort of application that will just take whatever audio happens to be playing on a PC and stream it to a UPnP Client? For example, you could just run the app, and then play music from anything....WMP, iTunes, VLC, whatever...it would likely just use the Stereo Mix "device, and then on an XBox 360 you could connect to that stream and it would just play it back.

    I know this should technically be possible... and I was thinking of trying to create something to do this, but I don't want to recreate something that already exists.


  • Related Answers
  • Will Eddins

    Given your specific example of an Xbox 360, No, this is not possible.

    While there may be software to stream audio output, the Xbox 360 is missing the software to accept this. It will allow you to stream audio and video files from a PC through either Windows Media Player 11/12 or Windows Media Center, but both of these access the files directly and do not access the audio stream of the PC. The built-in audio player on the Xbox will also only access local files on the hard drive or CD, so this would not work either.

    Are there other devices you have in mind as well, or was the Xbox 360 your only thought?

  • victmo

    It is possible! Try Jamcast, it has an option to stream your soundcard's output. It creates a virtual track on your Xbox 360 under Music/PC-NAME/Saved Playlists/Virtual Soundcard.

    It's not free and windows only, but it works great.

  • NameZero912

    http://www.streamwhatyouhear.com

    It's even free, and it should do exactly what you want.

  • Sathya

    Windows Media Player 11 is capable of this. Article by Microsoft

  • Seasoned Advice (cooking)

    This is a quick break down of how I do it.

    Install icecast server

    • Icecast creates a server that your remote media player can "tune" into, like a streaming internet radio station, but for your local network.

    Install Edcast

    • Edcast listens to your computer software mixer output (what goes to the sound card) and sends it to your icecast server, so it will stream anything on the local machine.

    Point your media player of choice on your local network to the icecast url, such as 192.168.1.2:8000/stream.ogg (to find your ip address in windows, fire up a command prompt and hit the old "ipconfig")

    I don't have a PS3 or XB360, to my understanding both can play internet radio. But I use an old laptop on high quality external soundcard and foobar2000 with the upnp client (purely to point the client to icecast link), which works really nice, because any audio played on my desktop machine get streamed.. there's a small delay, but for music its fine.

    Quick google search pulled up a good detailed tutorial http://www.poromenos.org/tutorials/icecast

    Peace

    Jim