This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52832 ble transfer data continuously

How can I trasfer 20bytes data per 10ms? Currently, I set gap_conn_params.min_conn_interval 7.5ms, and use BLE_EVT_TX_COMPLETE to send data. However, Android APP nrf Connect recieve data per 40ms, why? Please help, Thank you!

  • Android won't let you go to such low connection intervals, simple as that. There actually are Android devices which will never go below their default interval of 48.7 5ms... some devices can (e.g. by mistake;) use 7.5ms interval but mostly not.

    Edit #1:

    My suggestion is not to use BLE at all, unless you control both sides of the link on BT sack level (e.g. two nRF5x devices against each other). If you insist on mobile phone then you should be able to achieve 20B per 10ms by different tricks:

    • Send multiple MTUs per interval (most mobile BT stacks should be able to do at least 4 packets = suddenly you can transport 80B!)
    • Use ATT_MTU extension procedure because the most of the phones support at least 150B, typically up to 260/512B. That will suddenly solve your problem because you can send at least one MTU per 30~50ms interval.
    • On top of ATT_MTU size extension use LL PDU extension procedure, this will again help the bandwidth.

    In general you will end up with list of devices which support your solution and the rest you cannot guarantee. It might be 50% from dozens of thousands of Android dumbphones, it might be 80%, hard to say.

  • Ok~thank you! Actually, I want to realtime transfer sensor data(100Hz) to a central device. Would you please give some suggestions? IOS device ble?

  • Which central device are you talking about here ? If it's a phone, i don't see any other option than BLE. But the data update rate won't be 100Hz as you usually don't get very low connection interval from the phone.

    If you can use nRF5 on both side, then you can use any 2.4 proprietary protocol such as ESB.

Related