As I can't provide code atm, I'll explain the problem as best as I can.
Setup:
I have two esp32 dev boards as ble clients.
I have 1 esp32 dev boards acting as a ble server.
Working principle:
The two clients should write on the servers's two different characteristics. I use free rtos for all my tasks and use a notification for each characteristic(in the onwrite() function) which inturn calls a function which places the messages in a queue for the UART to later handle.
Issue at hand:
The problem is that if I choose to transmit large amount of data over the characteristics(400 packets of 238( by a set MTU) bytes by each esp32 client), the onwrite gets called with half the data in the buffer.
If only one device is using the server, everything is fine and the onwrite behaves as promised,if both devices write, the onwrite gets called even when there is not the whole message in the readdata() or getvalue() buffer.
Summary:
Both clients say thay transmit the correct message length over ble.
The server receives the wrong length only when simultaneous writes happen by two ble clients.
Is there a problem if both esp32 clients write at the same time?
Is there a way to overcome this?
Thanks in advance!!!!
Esp32 ble onwrite function behaves strangely
-
Phevaoubas
- Posts: 1
- Joined: Fri Aug 25, 2023 5:57 pm
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- ESP32-S31
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- ESP32-S31 中文讨论版
- 喵伴 中文讨论版
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: PerplexityBot and 1 guest
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.
Information
Espressif ESP32 ... Available now!