Bluedroid hangs up for >45 ms during channel switch

不打扰是莪最后的温柔 提交于 2019-12-01 12:20:19

This is probably hardware specific behavior. Perhaps the hardware buffer is limited to 4 packets, and driver delivers/fetches packets only during interrupt on CI elapse.

MD column is "More Data" it tells if transmitter has more data to send. In this case, Slave sets MD=0 on 4th transmitted packet on every CI and so master goes away. Master checks back in next CI with empty packet.

In my application, somehow this gap is 46 ms due to issue in negotiating ConnInterval, so master defaults to 48.75 ms CI. And so it sleeps for ~46ms

My data loss is happening due to issue mentioned by @Gaurav, but on Slave, i.e. Slave LL is dropping packets fed to it while it already has 4 packets. [This is a guess] I'll confirm and update.


Update

Looks like CONNECT_IND contained transmitWindowSize of 2.5ms in the captured log, transmission of 4 packets will take 2.3+ms, and 5th packet wont fit in 2.5 ms. transmitWindowSize might be the real reason why no more than 4 packets are transmitted per CI, still doesn't explain MD=0 in 4th packet though.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!