Nintendo Switch Bluetooth Controller Protocol
This page details all things Nintendo Switch controller protocol (Bluetooth only) related.
This article is still a work in progress! It was last updated June 24, 2022 and may have information that is missing or incomplete.
On top of this, specific details are given on how this looks implemented using the Bluedroid Bluetooth stack in the ESP-IDF development environment.
This work would not be possible without the following sources put together by community modding members.
Once a report comes in from the Nintendo Switch, it must be interpreted. The report type determines what type of data the Nintendo Switch will expect back from the controller. As far as I can tell, these reports are only sent through HID interrupt reports.
To obtain the report type, see the example below.
In this code example, we are acting on the callback event of a esp_hidd_cb_param_t type. The report type is specified by byte 0.
Rumble data AND a Subcommand
The event data contains data to animate the linear actuators for HD rumble. This event data also contains a sub-command. Read on to learn more.
NFC and IR MCU firmware update packet
Only event data to animate the linear actuators for HD rumble.
Request NFC/IR MCU data
Read data from the IR sensor or NFC memory buffer from the controller.
Sub-commands will interface with the various hardware built in to the controller to perform many functions. The Nintendo Switch controllers have SPI flash built in to hold firmware patches, controller colors, calibration data, and more.
In this code example, we are acting on the callback event of a esp_hidd_cb_param_t type. The sub-command is byte 10 of the incoming data.
Get ONLY Controller State
Bluetooth manual pairing
Request device info
Request input report mode
Trigger buttons time elapsed
Get page list state
Set HCI state
Reset pairing info
Set low power shipping state
SPI Flash read
SPI Flash write
SPI Sector erase
Reset NFC/IR MCU
Set NFC/IR MCU config
Set NFC/IR state
Set player number (lights)
Get player number (lights)
Set "Home" button LED
Enable 6-axis IMU
Set 6-axis sensitivity
Write IMU registers
Read IMU registers