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

BLE lost messages

Hi, as part of my project i have 2 nordic 52dks one as a pheripheral (sending) and on as a client (recieving). where i am sening a buffer of 8, in the order

buffer[0] = 10

buffer[1}= X gyro lsb

buffer[2] = X gyro msb

buffer[3] = y gyro lsb

buffer[4] = y gyro msb

buffer[5] = z gyro lsb

buffer[6] = z gyro msb

buffer[7] = 36   //terminator $

however sometimes i seem to lose a byte over ble such that the next byte received will be less and hence the order is correupted thus making processing rather and unpredictable for a large sample size like 1000000 samples.

how may i ensure that my ble settings are correct such that i ensure to limit this issue.

my code was based of the examples ble_app_uart and ble_app_uart_c for the peripheral and client respectivly.

thank u in advance 

  • NikTheNordicUser said:
    im using a serial terminal inorder to see the error

    Does this mean that you are seeing the error message? Please tell me what it says.

    NikTheNordicUser said:
    as I mentioned previously when i add the app error check the central dev kit is not connecting to the pheripheral 
    Karl Ylvisaker said:
    This is likely due to a non-NRF_SUCCESS error being passed to an APP_ERROR_CHECK.

    Yes, and as I mention this is likely because you are hitting a non-NRF_SUCCESS return code before initiating the connection.

    Best regards,
    Karl

  • Does this mean that you are seeing the error message? Please tell me what it says.

    Hi , karl , no i dont get or see anything.

    Yes, and as I mention this is likely because you are hitting a non-NRF_SUCCESS return code before initiating the connection.

    how do i fix that so that i can show you if i get an error message

  • NikTheNordicUser said:
    im using a serial terminal inorder to see the error
    NikTheNordicUser said:
    no i dont get or see anything.
    Karl Ylvisaker said:
    Which logger backend are you using, and how have you configured it?
    Are you working out of an example from the SDK? If such, the example should have the logger setup already, so that you see output in your logger when starting any unmodified SDK example.
    These logs usually read something like ".... example started".

    If you are working out of the ble_app_uart example, the example uses the RTT logger backend by default. You will then only see the messages either in the SES debug terminal or using an RTT terminal such as Segger's RTT Viewer application. 

    If you have not changed the logger's backend, the default backend used in the ble_app_uart example is the RTT backend. You will need an RTT terminal to see these logs.
    Please either open the debug terminal in Segger Embedded Studio, or download the Segger RTT Terminal like suggested in my previous comment.

    The example does not use the UART logger backend, because the UART is already in use by the application. Please do this, and let me know if you see any logs at all.

    Best regards,
    Karl

  • hi , i finally understood apologies for taking so long... ok so my problem at the moment is that the mcu is resetting after some time and this is the code i have and the debug terminal (it gets stuck on a NRF_BREAKPOINT_COND)

    hope that the images are clear.

    the scope of that code is to simply send hex 1-240 for 10 times by bluetooth and recieve on a central dk (using the ble_nus_central example with modification).

    however after sometime running the reciveing nrf52Dk (client) seems to reset and im unsure why

  • that code and terminal is of the pheripheral i will send of the client aswell

Related