Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to determine in close to real-time (up to 5s lag would be OK) when my XBOX 360 is switched on or off over the network. The XBOX gets a static IP address which I know.

However the XBOX seems to be very much like a black hole in that it does not respond to pings and seems to have no ports open all the time (TCP 1029 is open when in XBOX Home, but not when actually playing a game).

What other ways could there be to find out whether the XBOX is online?

share|improve this question
Can't it be rooted? – Gilles May 30 '12 at 23:32
up vote 5 down vote accepted

Try to use something like arping which will send an arp request to the specified ip address and wait for an answer. As ARP is required for Ethernet you should be able to check if the Xbox is online.

As your title and the question differ a little bit, you say you want to get a notification if your Xbox is switched on/off there may be another solution. The Xbox may send some ARP requests on startup to determine if the IP Address is available. If you are now using something like scapy or tcpdump you should be able to filter/react on these packets. But determine when the Xbox is switched off will probably take regularly checking if the Xbox is still online.

If you want a solution which does not require root permissions you can basically try to simulate arping:

  1. Ensure the mac address is not listed in ip neigh show or arp -an
  2. Try to connect to the Xbox, e.g. by connecting to an arbitrary port or via ping. It doesn't matter what you try as long as you try to directly communicate with the Xbox.
  3. Check if the mac address is listed in ip neigh show or arp -an. If it is listed it means some device is responding to the specified IP address.
share|improve this answer
Thanks, using sudo arping -c1 -f -w1 <ip address> works great. The only downside is that now I need root permissions in my script. If no other answer turns up that doesn't need root permissions I'll accept this one. – Mika Fischer May 30 '12 at 20:05
Small remark: They're called Ethernet packets not packages. @MikaFischer: You can configure sudo to accept the arping command from a single user without prompting for a password, but that would be off topic for this question. – jippie May 30 '12 at 20:33
@jippie thanks :/ feel free to edit/fix the post, i changed it to packets – Ulrich Dangel May 30 '12 at 20:53
@jippie: Thanks, I already did it that way. But it's still a bit inelegant... – Mika Fischer May 30 '12 at 20:54
@MikaFischer you can try to check it with nmap -sn or if you have an older version of nmap try nmap -sP – Ulrich Dangel May 30 '12 at 20:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.