ben4shot
.
- Joined
- Feb 6, 2024
- Messages
- 6
- Likes
- 1
Hi there
I been doing this the lasts weeks.
It allows to stream and pairing to the gamepad from the PC (just linux by now and tested just on my notebook) whithout a Wii U console, also used a RPi 4b 2gb with and without the wifi usb adapter, using his own network card but it didnt work well. With the adapter works fine but consumes an important amount of CPU.
DRC
Wifi Drivers
Compositor that tested on RPI just tested on the rpi, i wanted something extremely light because of the cpu.
First at all, this project was COMPLETELY Vibe Coded (kinda hate to do it but i have no time or technical knowledge).
Just checked that's working what i wanted, but i think there are functions that havent tested or better ways to do it
I know a limited part of how it works and im gonna try to expose some important part of that here, but better check at the repo and look at the code.
Still havent test if the conf file works.
Its based on pc2drc by thefloppydriver.
You need a patched driver for your Wi-Fi card that:
Everything is controlled with `drc_ctl` (terminal) or `drc_gui` (GTK app), from the drc repo:
channel 36 you need `wireless-regdb`
Testing the GamePad
There's a tester for every GamePad function (buttons, sticks, touch, gyro/accelerometer, mic, speakers, camera, rumble, NFC, battery...):
sudo python3 tools/gamepad_test.py # window on the PC
sudo python3 tools/gamepad_test.py --en-mando # same window on the
GamePad screen (while streaming in separate mode)
Wake listener (drc-wake)
`drc_wake.py` puts the adapter in monitor mode and waits for the GamePad's power-on: the "wake" burst it sends to its console, or its probe requests.
When it sees them, it starts the `drc` session.
On the Pi it runs as a systemd service (`drc-wake`, plus `drc-ausencia`, which stops `drc` when the GamePad has been gone for 30 s), so turning the GamePad on is enough.
On the PC, detection works but starting the session automatically is not wired yet.
I been doing this the lasts weeks.
It allows to stream and pairing to the gamepad from the PC (just linux by now and tested just on my notebook) whithout a Wii U console, also used a RPi 4b 2gb with and without the wifi usb adapter, using his own network card but it didnt work well. With the adapter works fine but consumes an important amount of CPU.
DRC
Wifi Drivers
Compositor that tested on RPI just tested on the rpi, i wanted something extremely light because of the cpu.
| USB ADAPTER | Inner | |
| PC | Works fine | Not tested |
| RPi 4b | Fine too | Artifacts, some falls and tearing |
First at all, this project was COMPLETELY Vibe Coded (kinda hate to do it but i have no time or technical knowledge).
Just checked that's working what i wanted, but i think there are functions that havent tested or better ways to do it
I know a limited part of how it works and im gonna try to expose some important part of that here, but better check at the repo and look at the code.
Still havent test if the conf file works.
Its based on pc2drc by thefloppydriver.
You need a patched driver for your Wi-Fi card that:
- Exposes the chip's TSF (`/sys/class/net/<iface>/tsf`); without it the GamePad connects but shows no picture;
- On the Pi's internal chip (brcmfmac), also accepts Nintendo's OUI (a4:c0:e1) in the WPA/RSN element.
- All the buttons
- Rumble
- Camera
- IR lights
- NFC: Need nintendo's format and just reads and send text
- Audio
- Microphone
- Gyroscope
- Acelerometer
- Tactile with preasure
Everything is controlled with `drc_ctl` (terminal) or `drc_gui` (GTK app), from the drc repo:
- python3 drchost/drc_gui.py # graphical app:
- python3 drchost/drc_ctl.py # interactive menu
- python3 drchost/drc_ctl.py check pair # what's missing on your system, and how to fix it
- python3 drchost/drc_ctl.py pair --symbols 0,0,0,0 # then press SYNC on the GamePad and enter ♠♠♠♠
- python3 drchost/drc_ctl.py start --mode separate # stream (separate / extended / mirror)
channel 36 you need `wireless-regdb`
Testing the GamePad
There's a tester for every GamePad function (buttons, sticks, touch, gyro/accelerometer, mic, speakers, camera, rumble, NFC, battery...):
sudo python3 tools/gamepad_test.py # window on the PC
sudo python3 tools/gamepad_test.py --en-mando # same window on the
GamePad screen (while streaming in separate mode)
Wake listener (drc-wake)
`drc_wake.py` puts the adapter in monitor mode and waits for the GamePad's power-on: the "wake" burst it sends to its console, or its probe requests.
When it sees them, it starts the `drc` session.
On the Pi it runs as a systemd service (`drc-wake`, plus `drc-ausencia`, which stops `drc` when the GamePad has been gone for 30 s), so turning the GamePad on is enough.
On the PC, detection works but starting the session automatically is not wired yet.