Gunston

All

Apologies but this is a repeat post from 31-Jan buried inside another thread that appears to have died.

I can't push code to my Xbox 360 from GSE.  This issue has been reported by other people and their problems boil down to either having entered the 25-digit code incorrectly or, in one case, that their router didn't properly support UPnP.

I've regenerated, accepted and reconfigured the key *many* times, making sure I don't have any 0's, 1's, 5's or 8's in the generated key to avoid confusion.  I understand this is a one-time key so I'm not reusing an old key.  I am most definitely getting the key right and choosing accept, not cancel.

I have downloaded and installed Windows Media Connect (I'm running Windows XP SP2 and a Livebox wireless router) and that worked fine and streaming from PC to Xbox 360 works fine so I guess that nails the subnet issue.

The error I see is as follows:

The connection timed out before reaching host Gunston. Make sure that Gunston is connected on your local subnet and waiting for a connection.

I've tried everything I can think of, including:

* installing C# Express Service Pack 1

* turning everything off and back on again (router, laptop, Xbox 360)

* disabling Windows Firewall

* disabling the router firewall

* generating a firewall log to see what's going on when I try to connect

* blocking XnaTrans.exe in the firewall so I could see at least this was trying to do something (it was)

I've also read the letskilldave blog on this topic and the MSDN help pages.  I understand there's an error in the MSDN write-up that suggests you can ping your Xbox 360 - you can't.

One of the MSDN help pages mentions opening up some UDP and TCP ports on the firewall.  I tried this but the configuration options in Windows Firewall don't quite match what is required.  Specifically, the article mentions opening up ports for inbound/outbound communication.  This option isn't available in Windows Firewall when adding ports.

Did anyone else have to manually open up ports to get GSE to talk to their Xbox 360

Does XnaTrans.exe produce a log file of its own for diagnostic purposes

Any more suggestions appreciated... I've burned a lot of time on this.

Thanks.




Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

waruwaru

I would try the following
- disable firewall on PC, reboot
- configure your PC and Xbox to static IP address
- get a switch/hub and put your PC and Xbox to it
- now try the deploy again

If that works, try restore your IP configurations (if you were using dynamic ip before)
If that works, try going through your router wired
If that works, try going through your router wireless
If that works, trying to restore other settings (firewall..etc) one by one until it fails.

If you can't deploy without firewall, over a single hub/switch with static IP, then have to check for something more basic, like:
- make sure your cables work
- try to deploy without a hub/switch, using a cross-over cable (in theory it should work)
- run "netstat -ab" from DOS to make sure nothing is hogging the needed ports
- check task manager to make sure you don't have any other anti-spyware/anti-virus software running

Other than entering the incorrect codes, or not having your xbox at the Waiting for Connection screen, I havn't seen the timeout error before.




Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Peter D.

One thing I noticed was that people were not putting their 360 onto the XNA "attempting to connecti to conputer" screen before attempting to deploy their game from the XNA Game studio

It seems that people are first attempting to compile the 360 project (this automatically starts the deploy phase) and then going to their 360 and starting the XNA launcher.

In simpler terms, provided you have entered the creators club key correctly into the xna game studio on your pc.

step 1. Start XNA launcher on your 360 and set it to the "connecting to computer" screen.
step 2. Compile your 360 project on your PC.

This will enable your PC to find the xbox when it tries to deploy the compiled and processed files to it.

You will get a connection error if you do these steps in the wrong order.







Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Gunston

Guys

Many thanks for the suggestions.

Peter: My Xbox 360 is waiting in the "Connect to Computer" screen when I attempt to deploy.

Waruwaru: thanks for the netstat tip. I'm going to try applying static network IDs to see if this helps. Unfortunately, getting a wired connection between my PC and Xbox 360 whilst having the requisite Internet access for Xbox Live is a bit of a logistical nightmare so this would be a last resort. I do have antivirus software running (beyond my control as this is a corporate machine) and VPN software. I've disabled the latter to no avail.

The weirdness for me is that I can stream from Windows Media Connect (which I installed to test the basic connectivity).

I'll post another update when I have one. Anyone from Microsoft XNA support reading this

Thanks again.






Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

d4nk

Not sure if this will help, but the problem I was having was I never had the option to Build > Deploy Solution, I kept trying to simply Build Solution and was frustrated that it didn't automatically deploy to my console. Turned out my project was a Windows Game, as soon as I switched to an Xbox Game that option appeared and deployed successfully. I'm retarded, but I figure I'll mention just in case...




Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Peter D.

I have had to fix deploy issues for a few friends now and without fail it has been one of three things

1. incorrect creators club code entered into xna game studio.
2. not starting the 360 xna launcher first before attepting to deploy their game.
3. Selecting the windows version of a project and then wondering why building it does not deploy anything to the 360.

I also noted that not one of my friends said thanks once the problem was pointed out to them. Embarrased at the error I guess.





Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Gunston

d4nk, Peter D

Appreciate your responding to this.

Re your points Peter D:

1 This is most definitely not the case. I've regenerated, reapplied, reconfigured this key countless times now.

2 My Xbox 360 is in the "Connect to Computer" screen, having connected to Xbox Live with the computer and Xbox 360 graphics 'pinging' each other.

3 It's definitely an Xbox 360 project - I've tried both the Spacewar and 'cornflower blue' samples (not that I expect this to make any difference) - the only build configuration in those projects is Xbox 360. Plus, if I block XnaTrans.exe in the firewall, I get a notification so I know that the laptop is at least trying to connect.

I've been in IT long enough to be unembarrassable when it comes to overlooking simple instructions (we've all done it, I'm sure). And you know what, I'd love if it turned out to be something like you're suggesting d4nk!

Cheers.






Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Stephen Styrchak - MSFT

If you are using a wireless network adaptor, it is possible that the connection cannot be established this way. The connection protocol is somewhat sensitive to the connection quality (something we hope to address in the next update). For best results, you really must use a wired connection. It is not a hard requirement, but in some cases (perhaps this one) it may be necessary. It basically depends on the signal quality of the wireless connection.

The reason the documentation describes settings that aren't available on Windows Firewall is because it describes the settings required for any firewall, many of which have more specific settings than Windows Firewall. If you are using Windows Firewall, the exception for xnatrans.exe is usually added during installation. Contrary to other recommendations, I would suggest you do not ever turn off your firewall entirely in order to diagnose a particular application's connectivity issues. You did the right thing earlier when you re-enabled the firewall to block xnatrans.exe and saw that it was being blocked.

So what do you need if you're using Windows Firewall You need to add an exception for xnatrans.exe. If you want to keep your computer more secure, you can change the scope to allow "My network (subnet) only", but it is not necessary.

To me, it sounds like the software is set up and working properly for you. Except, of course, that it is not connecting -- I mean working in that the various parts are being invoked at the right times.

Unfortunately, xnatrans.exe does not generate a log file for diagnostic purposes. That, and general utilities for diagnosing connectivity problems, is something we are looking to address in a future release.

In the meantime, I will explain what normally happens to establish a connection.

  1. You generate a key on the Xbox 360 that is associated with your gamer profile (an XNA Creator's Club member).
  2. You enter the key in VC# Express.
  3. You put XNA Game Launcher into Connect mode, where it waits for a connection request that contains the current profile's connection key.
  4. You initiate a connection from your computer (eg, Deploy, Launch, or Start Debugging).

Okay, so that's the end of what you do. Now here's what goes on in the software.

  1. When the connection is initiated, xnatrans.exe sends a UDP broadcast on the local subnet that effectively contains the connection key.
  2. If an Xbox 360 console is waiting for that broadcast (in the XNA Game Launcher's Connect mode), then it will respond with its own UDP broadcast only if the connection key matches. This broadcast identifies the location of the console and some other parameters required to connect to it.
  3. If xnatrans.exe receives a reply from its original broadcast, then it uses the information in the reply to establish a TCP connection to the console.
  4. After connecting, the TCP connection is authenticated.

During this exchange, the connection key is discarded so that it cannot be used again.

The step which is most likely to be affected by a poor wireless connection is step 4 above. The authentication needs to happen within a certain (small) amount of time, and if there is lag in the connection, then the console will reject the connection and try listening for another connection.

In your case, it sounds as though all the right things are happening up to the UDP broadcast from XnaTrans.exe. If that broadcast is getting to the Xbox 360, then it will respond only if the connection key matches. If the reply is received, then xnatrans.exe will initiate a TCP connection to the console that replied.

If the TCP connection is established, then the authentication must succeed. If the authentication fails after the connection is established (which may happen if there is a delay in the network traffic), then it is possible at this point that the connection key settings will be discarded on the computer, but not on the console (an unfortunate timing bug). If that happens, then all subsequent attempts to connect will timeout because the connection key will never match.

If this failure to authenticate happened after the very first connection, then all you'd need to do is try connecting again. But in the state described above, you have to reset the connection key. How can you tell if you are in this state After getting a timeout error, check the following registry key:

[HKEY_CURRENT_USER\Software\Microsoft\XNA\Devices\{some_guid}]

If the IsNegotiated value is 1, then you failed to authenticate quickly enough. If this is the case and you are using a wireless adapter on either your Xbox 360 or your computer, then I strongly recommend resetting the connection key and trying again using a wired connection.

Based on some of your earlier posts about monitoring the network activity, it sounds like you may be getting into this state. Please let me know if you can confirm this.

Hope this helped.

--Stephen





Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

waruwaru

Getting a wired set up will really help figuring out the issue. You can probably find a cheapy switch for under $20 these days. I had trouble routing broadcast packets on my wireless bridge before.

If you have another computer on the same subnet, you can check the UDP broadcasts using a sniffer (like Ethereal).






Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Gunston

Stephen

Thanks for the detailed info. The ability to produce a log file from xnatrans.exe would be great. Is this work in progress or should I raise an enhancement request.

FYI, the IsNegotiated flag is always 0. I reset the key another couple of times, quit GSE etc and still have the same result. I don't really suspect wireless lag as I can stream video OK - surely this would stress the connection beyond what a couple UDP packets back and forth might do.

Waruwaru has told me enough times to try a wired connection that this is what I'm going to do next.

Thanks.






Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Stephen Styrchak - MSFT

Always feel free to enter any suggestion through Connect. Even if we already have the suggestion planned, it gives us some additional data points as to what is important to our users (helps us prioritize).

That said, this is something we do already have on our to-do list. I'm not sure the priority of this feature on the list, so I don't know if this will be in the next release or not (or ever). I am currently designing several enhancements to allow users to easily diagnose connectivity issues like incorrectly-entered connection keys. The solution I have in mind would also make very clear whatever problem is occurring here.

Since you were using a network monitor earlier, perhaps you could verify whether the Xbox 360 is responding at all to the UDP broadcast by sending any UDP packets of its own. If it is not, then it usually indicates that either the firewall or router is blocking the traffic.

The problem that I described earlier is not necessarily related to stressing the system. Lag can occur for many reasons. A lot of the actual timing depends on drivers which can differ dramatically across different hardware. What we do is specify, "wait this long for a connection," and, "wait this long for a packet." It is possible that the media connect implementation waits longer than we do. We are also looking at providing a way to make these times user-configurable.

Note that it is really only the initial connection/authentication that is so time-sensitive. Once a connection has been established, it is quite resistant to network latency and lag.

--Stephen





Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Stephen Styrchak - MSFT

It just occurred to me that there is one more simple cause that hasn't been mentioned before. I doubt this is going to help, but you just never know.

When you enter a new connection key in the Tools Options, you need to select Ok to close the Options dialog. If you make changes to the available Xbox 360 consoles or any of the connection settings, none of the changes are committed until you select Ok to close the Options dialog. If you select Cancel, then the changes will be discarded.

To make sure your connection attempt is using new information, delete the old entry and create a new one with a different name when you reset the connection key. If you accidentally discarded the changes, the error message will show you the old name.

Well, it's a long shot but couldn't hurt to point it out.

--Stephen





Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Gunston

Stephen

Thanks for the suggestion. I'm doing the right thing in the dialog and can see the new Xbox 360 name and key reflected in the registry.

I'm guessing it's a problem specific to my set up in some way, not something I'm doing wrong in following the instructions (although, again, I can handle the embarrassment factor if it is). Interesting that no other people have jumped on this thread saying "Yeah, me too!". I'm going to switch to a 'spare' router to eliminate that before trying to get all my kit together in one room to test the wired scenario - I noticed one other user had a router that didn't properly support UPnP and maybe my router isn't forwarding the UDP broadcasts between my laptop and Xbox 360 for some reason. The only other wireless client I have is a Windows Mobile 5 Smartphone - guess I could get a UDP sniffer running on that.

I guess you're not going to release the source code of xnatrans.exe (I have an MSDN Universal license so can build whatever you have...) to me but I'd be a very willing guinea pig for an instrumented version. I've built hundreds of unattended services running on Windows clients and servers, UNIX servers and HSMs over the years and know the value of more fine-grained error/exception reporting.

Cheers.






Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Peter D.

@Gunston

Something that occured to me after I decided to (just for the hell of trying to see if I could re-create your problem) change my connection protocols from the xbox. Anyway here is what I found.

If I connected using the standard WEP I get issues deploying my XNA projects but can stream video, connect to live etc. etc. just fine. If I connect with WPA I get no issues with the deploy. I was careful to check that I had done the same deploy steps on both of these protocols. The fully thing is that wired connection (which doesn't use these protocols at all) works all the time.

When the deploy failed under WEP, the pc simply claimed it couldn't deploy because my xbox didn't exist. This in no way seemed to affect streaming media! This may well simply be an XNA wireless deploy issue. For some reason the encryption and wireless protocol you use seems to matter to the PC side of things.

Not sure if this will help as it may simply be my router not complying fully with WEP or something like that. It has the 802.11a,b,g auto select thing going for it.






Re: XNA Game Studio Express Can't deploy to Xbox 360 from GSE

Gunston

OK, I now have a packet sniffer running on my Windows Mobile 5 Smartphone connected to my wireless LAN. I have disabled WEP security. I can see my laptop send UDP broadcast packets (200 to be precise). My Xbox 360 remains impassively connected to Xbox Live in the Connect to Computer screen.

The packet sniffer can detect packets sent from my Xbox 360 as well so I can see traffic coming from that direction (if there was any when I'm trying to connect and there isn't).

Aaaargh!