:::: MENU ::::

BLE over UART throughput

Adafruit사의 Feather m0 bluefruit 보드의 UART to BLE Throughput 측정. PC측에는 nRF Connect 앱인 BLE 앱을 사용함.

이 앱에서 연결을 하고 데이터를 수신한다. 보내는 측의 로그를 확인하면 대략 4.71KB/S 정도 나오는데, 핸드폰 앱에서 확인해보니 4KB/S 정도 나옴.

성능도 중요하지만 무선이므로 데이터 손실이 없을 수 없으며, 찾아보니 그 이유중 하나는 다음과 같다. (출처 – https://interrupt.memfault.com/blog/ble-throughput-primer)

Counterintuitively, even though the Link Layer of BLE is reliable, packet loss is still something to be concerned about for BLE. This is because many many stacks drop data within the software stack. For example, BLE messages get queued up in the stack and when the heap holding the packets runs out of memory, some stacks will silently drop data. This means if you are sending large amounts of data over BLE you will usually want to add some sort of reliability layer that can detect & retransmit messages when data is dropped. The way this is implemented can have sizeable impacts on throughput. For example, if you have designed your own protocol on top of L2CAP or GATT and every message sent requires an acknowledgement before another message is sent, you’ll typically wind up adding a connection interval worth of latency getting the data sent out, effectively halving the max throughput which can be achieved.

즉 BLE Link Layer는 reliable하지만 BLE stack에서 힙의 메모리가 부족할 때 일부 스택은 자동으로 데이터를 삭제된다. 따라서 상위레벨의 프로토콜에서 재전송 기법을 사용해야 함.

Mitigation of Data Packet Loss in Bluetooth Low Energy-Based Wearable Healthcare Ecosystem 이 문서의 내용 참고