最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

bluetooth lowenergy - Repeated calling WriteValue on BLERemoteCharacteristic with BLE hangs ESP32C3 - Stack Overflow

programmeradmin2浏览0评论

I'm using the Espressif Arduino BLE library on an ESP32C3. The ESP32 acts as a central device and connects to a peripheral Raspberry PI running Linux. I am attempting to send a relatively large amount of data through a characteristic with what is essentially this code:

for(size_t i = 0; i < num_chunks; i++) {
    uint8_t* data = get_chunk_from_flash(i);
    // ESP32C3 eventually hangs without delay
    delay(10);
    remoteCharacteristic->WriteValue(data, 512, false);
};

In each iteration I read 512 bytes from flash and write to the remote characteristic. I do manage to get some chunks sent over before the device hangs

I'm wondering if there's a callback (internal or public) that I could use to eliminate the delay and time the next call to WriteValue

I realize that BLE isn't really designed for large data transfer, but it is the only bluetooth protocol available and is less power-intensive than WiFi

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论