blueMoodBHD wrote: ↑Thu Nov 22, 2018 10:01 am
Hi all,
There is one thing that needs attention here. We can't call esp_spp_write() multiple times in succession. We should wait for ESP_SPP_WRITE_EVT, then call esp_spp_write() again.
So, when do you call esp_spp_write()?If you call it multiple times in succession, please change it and test again.
Thanks.
I am currently calling esp_spp_write() in another task (not the task calling my SPP callbacks). However, I have a spp_congested flag managed by the SPP callback task and the flag is respected before calling esp_spp_write(). Is this fine?
BTW, just to add another observation: with IDF3.1 SPP sending only works well with RedMi 4x and it was extremely slow with other Android devices (such as MiPad, Huawei phone).
Today I tried IDF v3.2 using the same SPP app, I can reach much higher sending speed with the MiPad that fails before. It seems that IDF v3.2 contains some SPP inter-operability improvements??? Can someone from ESPRESSIF confirm this?
Meanwhile,I will try IDF v3.2 with other failed Android devices later...