Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendGamepadStateAsync takes 2 minutes to send? #114

Open
nathenxbrewer opened this issue Aug 29, 2024 · 1 comment
Open

SendGamepadStateAsync takes 2 minutes to send? #114

nathenxbrewer opened this issue Aug 29, 2024 · 1 comment

Comments

@nathenxbrewer
Copy link

I'm trying to send buttons to my Xbox but it's taking about 2 minutes for the Xbox to respond. During this time, the ConnectAsync method throws a TimeoutException. I've tried 3 different Xbox One's in my house with the same result. Am I doing something wrong?

static async Task SendGamepadStateAsync(SmartGlassClient sgCLient, GamepadState pState)
    {
        pState.Timestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
        await sgCLient.InputChannel.SendGamepadStateAsync(pState);
        pState.Buttons = GamepadButtons.Clear;
        pState.Timestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
        await sgCLient.InputChannel.SendGamepadStateAsync(pState);
    }`
@nathenxbrewer
Copy link
Author

A bit more info:

#115

I see now that the console app is doing something similar. Apparently my ConnectAsync Task is not actually being awaited like I thought. So what seems to be happening is that it's taking ~2 mins for the ConnectAsync to finish, then the console will send the Gamepad state.

I'd still like to find out why it takes 2 mins for a connection to be made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant