Trouble Sending Raw Image Data over UART to ESP32 with AT Commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-09 7:36 AM
Hi everyone,
I'm working on an embedded project involving an STM32G0B0 MCU and an ESP32-WROOM module (using AT firmware v3.4.0.0). My goal is to send a 100x100 RGB565 image (20,000 bytes) from the STM32 to another ESP32 device connected to another stm32 via TCP using AT commands.
Setup:
STM32G0B0VET6 → ESP32 (UART4 @ 115200 baud)
ESP32 connected to Wi-Fi and using TCP mode
Using AT+CIPSEND=<id>,<len>
But I'm not able to transfer the image, while searching the internet i couldn't find any refence of someone doing this,
so i just need to know if this is even possible and if so how to do it.
Thanks.
- Labels:
-
STM32G0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-09 8:13 AM
Certainly there are no issues with the STM32G0 sending UART data. The content is whatever you want it to be. Whether or not someone has done this particular application seems immaterial.
Documentation suggests AT+CIPSEND cannot send more than 8192 bytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-09 8:54 AM
>>But I'm not able to transfer the image, while searching the internet i couldn't find any refence of someone doing this, so i just need to know if this is even possible and if so how to do it.
Pretend it's not an image, and that it's just arbitrary binary data? Look for more general examples, perhaps GNSS NMEA data stream, or files.
Look at what AT+CIPSENDL permits in longer form, or perhaps come up with a protocol where you split the 20KB into smaller pieces that you reassemble at your Socket Listener
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 4:36 AM - edited ‎2025-05-12 4:38 AM
@Aldrin wrote:I'm working on an embedded project involving an STM32G0B0 MCU and an ESP32-WROOM module (using AT firmware v3.4.0.0). My goal is to send a 100x100 RGB565 image (20,000 bytes) from the STM32 to another ESP32 device connected to another stm32 via TCP using AT commands..
You have far too many unknowns there!
- Your sending STM32
- Your ESP32-WROOM module
- Your receiving ESP32-WROOM module
- Your receiving STM32
Any error in any or all them will cause the whole system to fail!
So start simple.
Take one step at a time.
Have you confirmed that you can send & receive UART data at all on your STM32s ?
Can you send & receive basic AT commands between your STM32s & the ESP32s ?
There must, surely, be examples of using this AT+CIPSEND command - start with them...
PS:
AT Commands usually don't accept raw, binary data - so are you sure you have this covered ?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 4:47 AM - edited ‎2025-05-12 4:52 AM
AT commands typically don't handle raw binary data well — have you accounted for this? I realize now that I hadn't fully considered that limitation.
Since the UART baud rate is limited, I was hoping to switch to SPI for better speed. I originally preferred UART because of the available AT firmware, but now that I'm moving to SPI, it looks like I'll need to develop custom firmware for the ESP32. Do you have any suggestions will i get desired speed over spi?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 5:13 AM - edited ‎2025-05-12 5:18 AM
@Aldrin wrote:I'll need to develop custom firmware for the ESP32. Do you have any suggestions
So you'll need to ask on an ESP32 forum for that - it's not an ST product!
https://www.espressif.com/en/support/services#self-service-resource
@Aldrin wrote:will i get desired speed over spi?
Depends what speed you desire!
PS:
@Aldrin wrote:AT commands typically don't handle raw binary data well — have you accounted for this?
I realize now that I hadn't fully considered that limitation.
Note that I said "typically" - the ESP32 might be atypical ...
You really need to study the ESP32 documentation, examples, etc to fully understand this before you can code it in an STM32 - or anything else, for that matter.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 5:24 AM
Ok.
Thanks for you help.
