Sourceforge
By the way, Platinum 0.1.0.0 is now available on Sourceforge. Enjoy.
By the way, Platinum 0.1.0.0 is now available on Sourceforge. Enjoy.
I must be on a roll or something but tonite I was able to implement my multicast work around and I can now see more than 1 upnp servers. Check the result out.
So how does this workaround work? Well it’s quite easy. The xbox cannot send multicast so you need to specify which IP address the xbox should send the M-SEARCH packets to. That’s what you put in the XboxMediaCenter.xml Sources.xml as upnp://host:port.
The default port is not 1900 but 1901. The reason is that if you send a unicast udp packet to a port that is being used by multiple applications, only one will receive it wether or not they are expecting a multicast packet or not. So if you have multiple upnp apps on your host all listening on port 1900 for multicast packets, and you send unicastly instead of multicastly only one will receive it. Of course, most people don’t know but Windows has a service called SSDP which listens to 1900 and of course it’s the first one to receive the unicast packets that the xbox sends. So no other apps (UPnP Media Servers) running on Windows and not using this Service will not receive anything. Interestingly this Service is being used by all UPnP applications Microsoft comes out with, including Windows Media Connect. Go figure!
So now the proxy. By default, it has to listen on a different port than 1900 as explained above. So I chose 1901 but it’s configurable in the command line in case that port is ever going to be used by someone else. The proxy requires an exclusive access to the port (by binding it) to make sure it’s the only one listening on it to guarantee delivery. Of course remember to change the setting in the XboxMediaCenter.xml Sources.xml if you do change it.
When the proxy receives a SSDP unicast M-SEARCH from the xbox on port 1901 (or the one you specified), it creates a multicast socket and forwards the request to the regular UPnP address (239.255.255.250), and then waits for responses. Devices should respond to the proxy which then forwards back the responses to the xbox.
The proxy also listens for multicast announcement packets on port 1900. That way it can detect when a new UPnP device joins (or leaves) the network. When receiving a unicast request from the xbox, the proxy keeps around the ip address of the xbox and when multicast packets sent by UPnP devices are received by the proxy, it forwards them as well to the xbox (ip). It also works when devices go away but unfortunately, I have no way to asynchronously notify xbmc to update the UI (yet).
I just need to get the timeout working with blocking sockets which G. said he would add to Neptune soon.
I talked to spiff tonite again, I am going to publish all that tomorrow. Cheers!
A while back, I ported Rhapsody to the Xbox when I was working at Listen.com. It’s been a while but after seeing the latest XBMC 2.0 with 360 skin, I really wanted to do something with it again. Since I had just finished Platinum, I decided to port it. The main problem that people encountered when trying to port UPnP to the Xbox is that the Xbox doesn’t support Multicast (sending and receiving) and since Multicast is required for bootstrapping (SSDP), I had to find another way (which I’ll describe later).
Anyway, after a full night of coding and a little bit today, I was able to get it going with the help of spiff on Efnet #xbmc. See the video here and here.
Ok nothing new here but man I do hate it. Last week, I have started to notice that our power would go down for a split second and come back up. Clearly after 3 times, I should have known that it wasn’t right. I know we have some serious power load issues but I didn’t think much of it. The last time it happened, of course, my brand new home computer wouldn’t boot anymore. Infamous blue screen of death like they call it. After hours trying different things, I brought it to work. With the help of our IT guy, I was able to boot WinXP from a CD (BartPE rulez!) and get access to my HD. It took a whole day to get it to work because of course I have 2 SATA HDs mounted in RAID 0 meaning that you need to provide the drivers at boot time since WinXP is so dumb it doesn’t have the drivers built-in (even SP2!). Of course when you boot from a CD, the only choice is the floppy drive for that. Now who in the world still uses a floppy drive these days! It took me a few hours to get a hold of a floppy disk. Of course, BartPE didn’t have the driver for my LAN controller (Marvell) so John the IT guy, had to recreate a BartPE with my configuration (Nvidia RAID driver + Marvell driver built-in).
After an entire day backuping my data onto a temporary network drive (even with Gigabit transfert speed it took a while), I could then reformat/reinstall WinXP. I still don’t know at this point why the hell WinXP started to freak out in the first place.
A day later to copy back the data onto the disk.
A few hours spent understanding why suddenly the machine wouldn’t power down. Turns out you need to install the ASUS APCI drivers + the latest nForce4 drivers + the latest nVidia GeForce drivers. And magic it worked. Go figure.
Back home with brand new machine, last step install the logitech drivers for my wireless keyboard/mouse bluetooth combo.
Now that’s the ultimate piece of shit I have ever had to deal with. I think I hate Logitech even more than Microsoft.
First install: use drivers that came on the CD with the hardware, choose to opt to keep the WinXP bluetooth drivers and not install the logitech ones. BIG Mistake. Reboot, of course mouse and keepboard are not recognized. HOW DO I ENTER MY WINDOWS PASSWORD TO LOG IN! Yes you need an extra good old PS2 keyboard + mouse (USB works) to do that. Great thinking logitech.
Second try: Desinstall, download latest logitech drivers, reinstall. This time, use the Logitech drivers. Same thing. BT devices not recognized (needed to reboot twice already at this point). Fuck.
Third try: Desinstall, switch back to original drivers (CD), reinstall with Logitech BT drivers. Same thing. Fuck.
4rh try: Desinstall. DUH, it doesn’t desinstall the BT drivers! Meaning I am still using the BT drivers from the latest software I downloaded (which should be better you don’t think?). Reinstall old software with BT drivers. BINGO, it works.
Morality: If you buy logitech, just use the drivers that came with it, don’t update with new ones. At least hope the ones you got on the CD have been tested with your hardware. Good luck if you lose the CD. Maybe it’s intentionally done that way so you constantly have to buy their new products. Nevertheless, this is the last logitech product I buy. (I have to say the logitech camera I have has worked fine so far though).
One thing for sure, next week I am buying a Hardware backup system AND a UPS!
I might even switch to Mac OS X.
In preparation to release Platinum, I upgraded WordPress to 2.02 and made permalinks work. So now, all Platinum related entries will be found here. Now I just need to remove that lame header “Archive for the Platinum Category”.
I finally decided to release Platinum, my UPnP SDK. It will be hosted by Sourceforge for now. It will have a dual license: GPL + Commercial. I have spent the last few days trying to clean it up a bit (mainly removing the Windows Media Connect and Xbox 360 hacks). In doing so, I realized that I really needed to rewrite it