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

nus_c and nus example, How to achieve networking?

I have achieved Bluetooth connection between 1*ble_central<------>6*ble_peripheral.

But, ble_peripheral sometimes upload data at the same time, then sometimes lose data. Most of the time is the ble_peripheral uploading data, a few times there are instructions from ble_central.

Do I need to add the networking protocol, such as TDMA, but it's a little too difficult.

Is there a simpler solution?

Best regards!

John

  • Our products collect temperature and humidity at industrial sites, and have a wide distribution, which requires real-time performance, so we believe that MESH is not suitable for our application.

    We use nRF52832 on ble_central and ble_peripheral, SDK16.0.0, SD7.0.1

  • Hello John,

    then sometimes lose data.

    Could you elaborate what you mean by this? Data is never lost in the BLE link, since the data will be transmitted again if it is not acknowledged by the other device in the connection.

    Do I need to add the networking protocol

    No, you do not have to implement any networking protocol - changing your connection parameters will likely resolve this issue.
    What is you current connection parameters: connection interval min, max, slave latency and timeout?
    Could you also tell me how often each peripheral unit has new measurements that needs transferring, and approximately how much time / effort the central will have to spend processing the data from each transfer?

    Looking forward to solving this issue together,

    Best regards,
    Karl

  • Hi Karl,

    Sorry for my late reply to you. For project change requirements, I need to use the whitelist function. I need to add the whitelist to verify and modify the connection parameters. Now there is another question, how to add the second one after the first whitelist is added successfully?

  • Hello again, John

    Sorry for my terribly late reply - I have been out of office for some time.

    Do you still require support for this issue, or have you moved on from it in the meantime since we last spoke?

    To answer your previous question, you can have multiple devices added to your whitelist.

    Best regards,
    Karl

  • Hello Karl,

    But, ble_peripheral sometimes upload data at the same time, then sometimes lose data. Most of the time is the ble_peripheral uploading data, a few times there are instructions from ble_central.


    I solved the problem by modifying this parameter

    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(30, UNIT_1_25_MS)

    The whitelist function is no longer available. My question can be closed. Thank you!

Related