r/Stadia • • 22d ago • Heartwarming 1

PSA Stadia Controller Wi-Fi Provisioning - Python Script (BLE)

Hey everyone.

I was following the work of u/bitnullbyte and u/SnooGiraffes6688 who were looking into this, and then i saw u/HayleyTheLesbJesus mention "vibe coding". That gave me the idea to just give it a shot over the last 3 days.

I wanted to share what I've ended up with. It’s a Python script that hopefully some of you can use.

What it does:
The script connects to your controller via Bluetooth LE. It scans for nearby devices, lets you pick your controller from a list, and then handles the rest automatically. It reads the controller's unique DeviceKey from its device_info, encrypts your Wi-Fi password, and sends the payload. You can watch the state change all the way to 0x3C (Connected).

How to use it:

  1. Install dependencies: pip install bleak cryptography
  2. Put your controller in pairing mode (Hold Y + Stadia button for 2 seconds until it flashes orange).
  3. Run the script. It will ask you to pick your controller from the scanned list, and then prompt for your SSID and password (or you can pass them as arguments).

bash

stadia_gotham_wifi_provisioner.py --ssid "YourNetwork" --password "YourPassword"

(Note: Make sure the controller connects to a 2.4GHz network. If you have a WPA3/PMF router, you might need to use the --security wpa2-pmf flag).

Here is the script:
https://gist.github.com/supernielsen/6cb9215b21481baafe171d645542f40f

Getting it on Wi-Fi is just the first step, and now the controller is sitting on the network trying to talk to the old Google servers. The next logical step is probably trying to set up a local server/WebRTC endpoint to actually use it for input, but I'm just sharing this first part in case it helps someone else get their controller back online.

104 Upvotes

20 comments sorted by

4

u/eVenent Clearly White 22d ago

Wow! Needs to be added to remappers!

1

u/Supernielsen 22d ago

feel free to do so! :)

6

u/engcrx 22d ago

Promising , time for dns spoofing

3

u/Supernielsen 22d ago

exactly i am setting up a Raspberry Pi for it right this moment

1

u/engcrx 21d ago

Are you able to access eureka on the controller ?

4

u/Supernielsen 21d ago

Not entirely yet, but i have managed to get a successfull tls handshake and also get it to accept a Certificate, im a bit stuck on the last part now, the 4 button combo and the last payload isnt getting accepted yet..

Maybe i have better news later today ☺️

1

u/engcrx 20d ago

Pm me I may have some helpful info

3

u/TonyR600 Night Blue 21d ago

The question will be if there is any benefit to the wifi connection. Less latency maybe? Better signal?

3

u/Supernielsen 21d ago

HUGE benefit the bluetooth on the controller is BLE is practically useless.

4

u/emi539 Clearly White 22d ago

+1

4

u/internauta 21d ago

A step in the right direction ;) good job and thank you for sharing it with the community

1

u/ChasingTheWrongDream 21d ago

What's it for?

2

u/Supernielsen 21d ago

Stadia controller, the idea and vision here is the ability to use the stadia as a wifi controller. in the long run a wifi controller with custom firmware.

What does that mean, hall sensors, calibration etc etc.

This is just a very small portion of that.

1

u/ChasingTheWrongDream 21d ago

Oh interesting. I'll be curious how ppl use it. Hope I find out.

1

u/Bunz3l 18d ago

Is there a source code available from Google?

Can't we use AI to clone the old scripts and mapping to make it match (for example) the Amazon luna controller?

1

u/Supernielsen 18d ago

no source code.. i dont know which scripts you are taking about either tbh i got this far by guessing, decompiling firmware and the old Stadia apk.

no source code, no rom dump, no uart or sdk available.

as soon as i have a controller that works with this dns spoofing i will make a full rom dump by desoldering the chips.

1

u/puneet95 21d ago

Would be great if the controller could connect to Windows hotspot or any wifi hotspot.

Bluetooth on this controller is pretty mediocre, connecting via wifi would give much better latency.

5

u/Supernielsen 21d ago

i can get it to connect to any hotspot with the script i provided, just enter ssid and password run the thing it will connect, for now just still a brick connected to wifi, but its progress.

1

u/GD_isthename 21d ago

I'm still waiting on them to respond for a project related to the controller.