XBMC + UPnP update – No SSDPProxy needed!

Posted on July 3, 2006

I haven’t done that in a long time but I pulled an allnighter today. From 9pm to 9am, working around the clock to fix the last bugs that spiff found. He couldn’t get to see Windows Media Connect. I remembered WMC didn’t seem to respond to M-SEARCH requests. Poking around the internet, I found out that actually it doesn’t respond to M-SEARCH requests issued from the same machine where WMC runs. So the whole Ssdp Proxy solution would work only if it was running on a different machine than WMC. So I was a little worried… But THEN I noticed something very strange. WMC would respond to M-SEARCH requests issued from the same machine when using Intel UPnP Sniffer in unicast mode. Somehow, the UPnPHost service had a bug that could help me!
After a few hours of debugging, I figured out that I was not setting the Host header on my SSDP packets and that UPnPHost was requiring it. After I added it (and it needed to be 239.255.255.250:1900 regardless of the destination), it worked fine. But the most amazing thing about it is that SsdpProxy is NOT required anymore! The xbox can send directly on port 1900 in unicast and wmc will respond to it (as long as it’s the only one listening on that port on the machine of course).

This is very exciting stuff. You don’t even need to set the port in the sources.xml anymore. Actually you don’t even need to add anything. XBMC has got a cool feature that lets you add new Network Locations from within xbmc, including upnp now thanks to spiff. He must have thought I was an idiot cause I couldn’t figure out what he was talking about (root bookmark, add network location, huh?).

Big thanks to spiff also for letting me become an official dev on the xbmc team. I got to meet pike, Donno, DeanPerry (aka C-Quel), jmarshall & Sollie so far. Very nice people. I’ll try to help as much as I can and not f*ck up the repo.

Long live XBMC.

Oh and it looks like the xbmc forums have been updated already about the subject ;-).

20 Responses to “XBMC + UPnP update – No SSDPProxy needed!”

  1. Tat3r
    Jul 04, 2006

    Any chance of releasing the source code for your SSDP proxy application/service?, preferably in C language if possible. I would love to be able to port it to Linux, UNIX or BSD so I can use it with other UPnP servers than Windows ones. Be very cool if could run it on a other little server or device that is running all the time, I for example have FreeNAS (which is based on FreeBSD) running on a VIA MiniITX computer that I have a couple of large harddrives in for audio and video streaming that is on 24/7. A few friends of mine who also use XBMC run Linux based firewalls/routers at home which is running 24/7 anyway so those be great to have a SSDP proxy deamon installed on. Todat also many retail routers from LinkSys and D-Link run some kind of Linux or other operating system for which you can compile your own small apps and run on as well.

    PS! I also think XBMCfanboy’s idea about adding auto-discovery to your SSDP proxy application would be a great, making SSDP proxy do the work.
    https://plutinosoft.com/blog/category/blahblah/117#comments


  2. Sylvain
    Jul 04, 2006

    Today, I was able to what XBMCfanboy suggested using the Broadcast address. Auto-discovery now works perfectly with UPnP. No need for the SsdpProxy. If you’re still interested, the code is in libUPnP.rar in xbmc/docs folder. There is a linux build for it but I haven’t tested it much.


  3. Tat3r
    Jul 04, 2006

    Cool, thanks!

    I like to run on a Linksys WRT54G (which is linux-compatible)

    Linksys WRT54G can run ex. OpenWRT, HyperWRT or EWRT:
    http://openwrt.org/
    http://www.hyperwrt.org/
    http://www.portless.net/menu/ewrt/

    PS! Current pricing for a WRT54G is about $50, that’s cheap!


  4. Tat3r
    Jul 04, 2006

    Does that now mean that one can run several UPnP-servers on a local network without SsdpProxy and XBMC will detect all of them automaticly?, even non-Windows UPnP-servers (like Linux based ones for example). And what if you have several UPnP-servers apps (like for example MusicMatch and WMC) running on one Windows PC?, does it now handle that too?


  5. xbmc4me
    Jul 04, 2006

    Can you please add a UPnP server to XBMC too (or does it take to many resources/memory, I understand that the XBMC developers are struggling with the growing size of the default.xbe so maybe can put it in a DLL so it doesn’t take any up any memory when not in use?)? With a built-in UPnP server in XBMC one would be able to stream audio and video between multiple Xboxes (for those of us that have more than one).


  6. Administrator
    Jul 04, 2006

    Tat3r, yes to all of your questions.


  7. Administrator
    Jul 04, 2006

    xbmc4me,

    That’s totally possible. I am looking into that right now. Now, in order to make UPnP work, I found a workaround the multicast pb. I don’t know yet if that workaround will work also when hosting a UPnP device inside XBMC.


  8. xbmc4me
    Jul 04, 2006

    Cool! …if you add a UPnP server to XBMC and auto-detection doesn’t work between different Xboxes using that multicast workaround or some other UPnP workaround then maybe you can use a non-UPnP workaround (like for example borrow that broadcast code from the XBMSP protocol like XBMCfanboy suggested?)? …that way at least auto-detection would work between Xboxes, even if the wasn’t made with standard UPnP, (though it be very cool if you got a fully real and true UPnP server working from inside XBMC as then you could not only stream to other Xboxes but also other UPnP clients, like example the Xbox360)


  9. XBMCfanboy
    Jul 04, 2006

    Did you guys read the news today about MediaPortal’s upcomming TvEngine (version 3.0)?, it will be integrated into their public CVS in a couple of months and feature seperate frontend/backend, that means someone could code a built-in frontend for XBMC and fully control TV-recording and stream both live-TV and recording to XBMC. I think UPnP would be the perfect protocol for this; implement a UPnP-server service/plugin for MediaPortal and a add UPnP Remote UI support filter to both XBMC and MediaPortal, (“UPnP Remote User Interface” is the UPnP’s standard for controlling UPnP-servers over network, like; record, schedule, play, stop, etc., there is also something called “UPnP RenderingControl DCP” which is used to control the MediaRenderer settings; volume, brightness, RGB, sharpness but I think that one is only used on the client side?)

    MediaPortal TvEngine version 3.0 news:
    http://www.team-mediaportal.com

    Some docs about UPnP RUI (Remote User Interface)
    http://www.upnp.org/standardizeddcps/remoteui.asp


  10. Sylvain
    Jul 04, 2006

    xbmc4me,

    The xbox is able to send a message on the Broadcast address, it’s not clear it can receive on that address. I will experiment a bit to find out. If this is the case, then it would be possible to make it work.


  11. Sylvain
    Jul 04, 2006

    XBMCfanboy,

    I am pretty familiar with RUI protocol. It was proposed by Intel at the UPnP group but never took off. It is very heavy plus it relies heavily on a PC doing all the UI rendering. However the AV Renderer is a possibility. The RenderingControl you are talking about is for a Rendering Device. I have implemented that already in Platinum (device & ctrlpoint). I think it makes more sense to implement a Renderer Device inside xbmc in order to be able to remote control its playback rather than implement a Renderer Ctrlpoint to control other Rendering Devices but we’ll see.


  12. […] In a follow up to my comment, I experimented a bit tonite and indeed I was able to get the xbox to receive broadcast packets. This means that it would be possible for xboxes to find each other’s UPnP Media servers by broadcasting their search requests (and notify) on the broadcast address. This is very exciting. It would be possible to stream from one xbox to another. How sweet would that be? Of course, that means I need to buy a second xbox. Any donations are welcome […]


  13. XBMCfanboy
    Jul 04, 2006

    UPnP RUI is client and server based right?; so the server based part would go into MediaPortal (or a plugin for MediaPortal), and only the client part would go into XBMC. Is that client part very heavy (CPU or memory resource intensive)?, I though I understod that it only sent commands in XML form over the network (and XBMC also has a built-in XML engine) so most of the resources should only be used by the GUI(?). A UPnP RUI server is not needed inside XBMC as it can’t record TV localy anyhow, so yes the UPnP RUI server will be inside MediaPortal and it would do all the heavy work like keeping track of all those sheduled recordings, etc.

    Anyway, if a UPnP RUI client could be integrated into XBMC then it should probebly as part of the upcomming TV-Guide somehow to enable the sheduling and recording bits, then all that is left is the ability to stream the live-TV feed (as the MediaPortal backend will handle any time-shifting or other backend tasks). MediaPortal would however have to have some king of EPG to XMLTV converter built-in so it would send the TV-listings to XBMC in XMLTV’s XML-format:
    http://www.xboxmediaplayer.de/cgi-bin/forums/ikonboard.pl?act=ST;f=5;t=13639


  14. LiveB8
    Jul 05, 2006

    Does all this mean that XBMC work with Rhapsody now? or?
    Will it also with Windows Media Center Edition from Microsoft?
    If XBMC got UPNP server could one then stream to Xbox360?

    Which TCP/UDP ports do I need to open in software firewall?


  15. Bonkers
    Jul 08, 2006

    Can XBMC play files from Nero MediaHome Server now?
    http://www.nero.com/nero6/us/Nero_MediaHome_Features.html

    “Transcodes your media files on−the−fly into the format your UPnP device understands” seems like a really cool feature then!


  16. Sylvain
    Jul 09, 2006

    WMC transcodes to L16 (PCM data) if your device doesn’t understand the default format.


  17. BrainStormer
    Jul 13, 2006

    I Though RemoteUI was just the User Interface. The server provides the UI and receives the key presses from the remote. Then the server also acts as a ControlPoint to control the other UPnP Renderers and Servers based on the keys pressed. Also aren’t most of the remote commands sent by XRT?


  18. BrainStormer
    Jul 13, 2006

    Oh also the best UPnP Server is TVersity. It not only transcodes but also allows RSS/Atom and Media RSS feeds to be served as well as FLV support.


  19. BLKMGK
    Jul 14, 2006

    I tried TVersity last night with my Linktheater – ick. Honestly so far the best UPnP server I’ve seen so far is the one that ships with the Linkstations. All in all though most of the UPnP stuff seems weak, and seem to be mostly just WEB browser\servers with clients that can render some video – pages come up mostly text. Even with beta firmware the Linktheater is weak IMO. Hopefully this UPnP client will work out even better than the Linktheater for rendering, I look forward to being able to test it with my Linkstation! Honestly transcoding isn’t that attractive to me – I’d prefer a client that can read the format. Even the Nero stuff didn’t look too great on my Linktheater Yes I realize alot of this might be my Linktheater so I’m looking forward to trying out XBMC UPnP enabled :)


  20. Nicolas
    Jul 10, 2007

    Cool…



Categories

Archives