Hardware
Devices
PiEEG_XR
Firmware & Service

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

ItemDetails
ST-Link V2 programmerWith its jumper wires. Both ship in the PiEEG XR package.
STM32CubeProgrammerFree tool from STMicroelectronics: st.com/stm32cubeprog (opens in a new tab)
Firmware fileLatest .hex from Firmware / hex (opens in a new tab)

ST-Link V2 programmer

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-LinkPiEEG XR boardSignal
GNDGNDGround
RSTRSTReset (NRST)
SWDIOSWDIOData
SWCLKSWCLKClock

SWD header on the PiEEG XR board

ST-Link connected to the PiEEG XR board

Flash the firmware

  1. In STM32CubeProgrammer, choose ST-LINK and click Connect.
  2. Open the new .hex file.
  3. Click Download to write it to the board.
  4. 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:

  1. In STM32CubeProgrammer, open the Firmware Upgrade Services (FUS) panel.
  2. Select stm32wb5x_BLE_Stack_full_fw.bin (opens in a new tab).
  3. Set the start address to 0x080CE000 and click Firmware Upgrade.
  4. Then flash the application .hex again, 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.