Skip to main content
Associate
November 8, 2025
Question

BluePill: bidirectional UART communication between STM32F103C and ESP8266

  • November 8, 2025
  • 4 replies
  • 390 views

I’m working on a project that requires bidirectional communication between daisy-chained STM32F103C bluepill boards and an ESP8266. I’m using a master-slave architecture and UART for initial testing and prototyping. The chain has 3–6 STM32 boards.

 

Right now I’m having trouble getting reliable two-way data transfer between the ESP8266 (master) and the STM32 boards (slaves). Can anyone help me get this working? 

4 replies

TDK
Super User
November 8, 2025

Here are multiple examples for UART on the STM32F1 series.

https://github.com/STMicroelectronics/STM32CubeF1/tree/master/Projects/STM32F103RB-Nucleo/Examples/UART

Get one of these working, then use it as a code base for your own project.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Andrew Neil
Super User
November 10, 2025

Note that BluePill is not an ST Product, and likely will not have a genuine STM32 fitted.

 


@its-nott-me wrote:

 bidirectional communication between daisy-chained STM32F103C bluepill boards and an ESP8266. ? 


What, exactly, does that mean?

A diagram would probably explain best...

 


@its-nott-me wrote:

Right now I’m having trouble getting reliable two-way data transfer between the ESP8266 (master) and the STM32 boards (slaves).


So what, exactly, have you tried?

And what, exactly, is/are the problem(s) you're having?

 

As always, the secret is to not try to do everything all at once - see this.

As @TDK says, there are plenty of examples of doing UART serial comms on STM32; no doubt there are also plenty of examples of doing UART serial comms on ESP32 ESP8266...

Test each part on its own before bringing them together.

Tips specifically on Debugging Serial Comms.

 

PS:

Corrected ESP32 to ESP8266 - although the principles remain the same for communications between any two devices.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
Super User
November 15, 2025

Your first post says you are using UART, now you say you are using SPI. Might want to present a consistent story. They are handled quite differently. There are examples for both.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate
November 15, 2025

I tried UART, didn't work as expected.. so now I am testing SPI.. I am fine with either of those

Andrew Neil
Super User
November 15, 2025
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.