JSnowden33 / Wii-Bluetooth-Replacement

GNU General Public License v3.0
29 stars 5 forks source link

Wii Bluetooth Replacement

ESP32 Wii Bluetooth Replacement

This project is a full replacement for the Nintendo Wii's Bluetooth module. Emulation of the Bluetooth module is performed on the PIC32 based on rnconrad's emulator, while controller connectivity on the ESP32 is based on btstack.

The device interfaces with various wireless controllers and emulates up to 4 virtual Wii Remotes to communicate with the Wii. Virtual Wii Remotes can be configured to have a Nunchuk, Classic Controller, or neither. Currently supported controllers are Wii Remote, Wii U Pro Controller, Joy-Con, and Switch Pro Controller. Joy-Con can also be used through wired functionality.

The PCB for this design can be purchased here.

Usage

The board needs to be powered by 3.3V. The only connection needed to the Wii are the D+ and D- USB lines, which should be wired where the Bluetooth module normally sits. The 5V input is only used for Joy-Con charging and not needed to use the Joy-Con. The "S" pin is for the sync button, which can be a normally open tact switch connected to GND.

Supported Features

Planned Features

Known Issues

This project is experimental and has plenty of bugs. Below is a list of some important issues that still need fixing.

Joy-Con Wiring

The Joy-Con wired connection follows the pin numbering provided here. On each Joy-Con, the pin names vs. pin numbers are as follows:

If a Joy-Con rail connector is wired to the board, pins 1, 2, 3, and 7 on the rail should be grounded. Pin 9 should be left unconnected. Connecting 5V to pin 4 for charging is optional. Note that having 5V active on the rail at all times may be unsafe if the connection isn't tight. When assembling the board, components U1, U2, C3, C4, and C6 are used only for Joy-Con connectivity and can be left off if wired Joy-Con will not be used.

Compiling and Programming

PIC32

Compiling the PIC32 software requires MPLAB X IDE with XC32 installed. Simply open the .X folder under Software/PIC32 as an MPLAB project and compile. The compiled image can be flashed using a PICKit3 connected to the MCLR, PGD, and PGC pins on the underside of the board. The board will need to be powered externally and the PICKit3 will need to be connected to 3.3V and GND references.

ESP32

Compiling the ESP32 software requires installing both esp-idf and btstack. On Windows 10, I use the Msys32 terminal for esp-idf. Btstack can be downloaded from here. The port/esp32/integrate_btstack.py script will install btstack to your system after esp-idf has been installed. The software can be flashed to the ESP32 using any USB-serial programmer that has the appropriate transistors on the DTS and RTS lines. Those transistors should be connected to the EN and BOOT pins on the underside of the board (RX and TX go to the communication pins of the serial port). Running "make flash" in the Msys32 terminal will compile and flash the software to your board. The first compilation will take a VERY long time.