Firmware & Service
Update the firmware
If the device doesn't connect over Bluetooth, the fix is usually to update the microcontroller firmware by uploading a new hex file.
What you need
| Item | Details |
|---|---|
| ST-Link V2 programmer | With its jumper wires. Both ship in the PiEEG XR package. |
| STM32CubeProgrammer | Free tool from STMicroelectronics: st.com/stm32cubeprog (opens in a new tab) |
| Firmware file | Latest .hex from Firmware / hex (opens in a new tab) |

Connect the ST-Link
Plug the ST-Link into the computer. It should appear in Device Manager. If it doesn't, update the ST-Link driver and plug it in again.
Install STM32CubeProgrammer
Download and install it from st.com (opens in a new tab).
Wire the board (SWD)
Open the BCI box and connect the ST-Link to the 4-pin header on the board:
| ST-Link | PiEEG XR board | Signal |
|---|---|---|
| GND | GND | Ground |
| RST | RST | Reset (NRST) |
| SWDIO | SWDIO | Data |
| SWCLK | SWCLK | Clock |


Flash the firmware
- In STM32CubeProgrammer, choose ST-LINK and click Connect.
- Open the new
.hexfile. - Click Download to write it to the board.
- Disconnect the ST-Link and reset the device (unplug the power for a few seconds).
Flash with the mask off your face.
Update the Bluetooth stack (advanced)
The STM32WB runs its Bluetooth radio stack on a separate core. Normally you never need to touch it. If support asks you to update it:
- In STM32CubeProgrammer, open the Firmware Upgrade Services (FUS) panel.
- Select
stm32wb5x_BLE_Stack_full_fw.bin(opens in a new tab). - Set the start address to
0x080CE000and click Firmware Upgrade. - Then flash the application
.hexagain, as above.
A wrong address or file in the FUS panel can leave the radio unusable. Only do this step if PiEEG support asks you to.
Mask doesn't sit right
If the silicone part has shifted or fallen out, push it back so it sits evenly all the way round. Or use your headset's original mask with the PiEEG XR silicone insert, adjusted until it sits firmly with no gaps or bending.
A stable, well-positioned mask is the single biggest factor in clean signal quality.
Noise
Check that the electrodes press firmly and evenly on the skin, then follow Recording During Activity and the general Noise elimination guide.