Determine if an XBOX 360 is active on a Windows Network

Started by
5 comments, last by treidin19 14 years, 8 months ago
I'm writing an application for a friend which closes his Bit Torrent application when he's playing his XBOX The only problem is, this application works with every other device EXCEPT his XBOX. Currently the application is able to ping a device by IP and if that device responds, it knows it's necessary to shutdown bit torrent. The problem here is that the XBOX 360 WILL NOT reply to the ping requests, I've searched everywhere and everyone says the XBOX 360 does not reply to ping. What's my alternative? I've been looking for a while at different protocols, DHCP, DNS, ARP, then things come up such as stale IP addresses which are just stored in cache but not actually connected. Could someone shed some light for me? Free V Hugs for you.
Advertisement
One thing the 360 will do is play music from a PC. Maybe that port could be used to determine if it exists. See http://support.microsoft.com/kb/911728 for a list of ports to try.
Have you tried simply connecting to it? My theory is that if it's off, the connection will timeout, and if it's on, it will refuse the connection.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Wow, thanks for the heads up guys,

The problem is that I myself don't own an XBOX 360, so I don't know these minor crucial details :P

But this does help a lot!

Thank you very much!
The 360 is a UPnP device. I don't know if it is constantly looking for UPnP devices, but it should send out requests on UDP port 1900 over multicast (not broadcast) via the multicast group 239.255.255.250.

The requests are plain text and look kinda like HTTP requests (technically speaking they are HTTPMU, or HTTP over Multicast UDP).
According to the UPnP spec they will look sorta like this:

M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
MX: seconds to delay response
ST: search target
USER-AGENT: OS/version UPnP/1.1 product/version

The 360 (if I remember correctly) should identify itself via the USER-AGENT as a XBox. I used to have packet captures, bute I seem to have misplaced them. If you grab a copy of Wireshark (multi platform) you should be able to see them coming from the xbox, and what triggers them. Telling the 360 to look for shared media should do it. I would also expect that when it attempts to connect to xbox live it should send out a request to set up port forwarding with the router.

Hope this is helpful, good luck!
^ I was going to suggest that.
Nero detects my 360 within a couple seconds of it turning on via UPnP.
It shows up as Xbox 360.

I hope you don't mind sharing with me the source code when you are done =). Its a very good idea and worth expanding to work with my PS3 as well
Planned originally for C++, decided to do this application in C#, if you don't mind the random source.

----------------

Edit 1: I've come up to an unexpected problem, I can't bind port 1900 because it's already in use by Windows SSDP?

----------------

Edit 2: Alright then, if "1900 UDP 239.255.255.250" is officially Microsoft's SSDP port, then I should look for functions to do with SSDP.

http://msdn.microsoft.com/en-us/library/bb870632%28VS.85%29.aspx

[Edited by - treidin19 on August 15, 2009 8:19:45 AM]

This topic is closed to new replies.

Advertisement