9 years, 3 months ago.

How can i do a kind of flow control or acknowledge ?

Hello,

I modified a central exemple to connect to this exemple modified (with serial output). When central send a lot of stuffs i have some frames lost. Is there any way to have a kind of flow control or acknowledge with BLE stack ?

Thank you.

Question relating to:

use UART Service to loopback anything received on the TX characteristic onto the RX. BLE, nRF UART

1 Answer

9 years, 3 months ago.

Perhaps some of the techniques mentioned here can help: http://docs.mbed.org/docs/ble-intros/en/latest/AdvSamples/HighData/ We're going to publish a block-transfer service as a reference; this can then form the basis for the LoopbackUART and other services which require large data transfers.

It looks nice, i will read it. Thank you.

posted by fabien comte 25 Aug 2015

block-transfer service will be very appreciated.

posted by fabien comte 25 Aug 2015

setPreferredConnectionParams looks like if it was ignored. It not returns error so i'm lost. Can I transfert you my test code and could you just take a look on it ?

posted by fabien comte 25 Aug 2015

Have you taken a look at http://docs.mbed.org/docs/ble-intros/en/latest/InDepth/ConnectionParameters/ ? It is ultimately up to the Central to accept connection parameters.

posted by Rohit Grover 25 Aug 2015

I have seen this and i understand but how to make central accepting (both sides are developed by me on nrf51) ?

posted by fabien comte 25 Aug 2015

On documents this is just the device side so what is the code for central side ? (i'm using S130)

posted by fabien comte 25 Aug 2015

The current documentation talks only of device-side configuration for connection parameters. Is your central also on mbed? If so, we'll add APIs to configure it.

posted by Rohit Grover 25 Aug 2015

Hello, My central is also mbed. Do you have a small exemple (even dirty) to accept new settings from device on central ?

posted by fabien comte 26 Aug 2015

Fabein,

You can use Gap::updateConnectionParams() on the Central to initiate the Link Layer connection parameter update procedure. It will result in the invocation of sd_ble_gap_conn_param_update() [refer to: https://github.com/ARMmbed/ble-nrf51822/blob/master/source/nordic-sdk/components/softdevice/s130/include/ble_gap.h#L1011]

Here's a sequence diagram of what that entails for the nRF stack. http://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.1.0/s130/html/a01059.html

Please update us with your results; I'm very curious to hear if it works for you.

posted by Rohit Grover 26 Aug 2015