How to compare the received data over able to the specific value...

Dear team,

1. I am using the Ble_app_uart example from the SDK.

2. I had received the data successfully from the nrf_connect app.

3. Once the data was received over a ble after that I want to compare that data with string & want to perform an action accordingly.

4. if there is any example in sdk then please let me know with the above criteria.

5. please help me above senario.

  • Hello ShubMane,

    The forum is not staffed during the weekend.

    ShubMane said:
    Thanks for the help.

    No problem, I am happy to help!

    ShubMane said:

    every single time I am sending the new data from NRF connect app.

    So Could u please tell me

    And I want to wait till the new data not had arrived.

    and once that data had arrived I want to out of that loop.

    I am not certain that I understand what you mean by this. You could like to wait until the new data is received? The BLE_NUS_EVT_RX_DATA event will be generated following the successful reception of a notification or write from the peer.
    You do not have to actively wait for this transfer, since the event interrupts your program.

    If you wish to wait with the connection until a certain requirement is fulfilled you may instead implement a function that sets a boolean variable that you could use as a conditional for starting advertising or scanning on either side of the link.
    I.e do not start advertising or scanning until your requirement is met.

    Keep in mind that I do not know anything about the product you are developing, but in general the security architecture you outline below might not be the most secure, since one could just brute force it by resetting the device repeatedly.
    This might not be an issue for the product you are making, but I thought I should mention it just in case.

    Best regards,
    Karl

Related