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 

  • so you are not doing what the throughput documentation has told you to do,

    so for the below config i set the con interval of both pheripheral and client to 50ms 

    Client

     :

    Pheripheral

    i dont think theres amything else to change right  please? 

    i cant seem to manage to do it... im unsure why 

    im opening the cmd in the above seen path

  • Hello again,

    NikTheNordicUser said:
    so for the below config i set the con interval of both pheripheral and client to 50ms 

    Great! Now your devices will communicate with a 50 ms connection interval.

    NikTheNordicUser said:
    i dont think theres amything else to change right  please? 

    Have you changed the MTU size and PHY (you need to use 2 Mbps PHY for maximum throughput)? Have you set the connection event length to the same value as the connection interval, as previously mentioned? 
    If you have, please show that as well for completeness. If you have not, please do so.

    NikTheNordicUser said:
    i cant seem to manage to do it... im unsure why 

    It seems it does not find pip3 as a command. Which python version do you have installed on your computer? In the command prompt, type python -V to see the python version. You will need to have python 3.6 or later installed, to complete the installation.
    This is clearly mentioned as one of the first things in the installation guide:

    Before you start setting up the nRF Sniffer, make sure that you have the following prerequisites installed on your computer:

    • Wireshark v2.4.6 or later (v3.0.7 or later recommended on Windows). Wireshark is a free software tool that captures wireless traffic and reproduces it in a readable format.
    • Python v3.6 or later.

    Please make sure that you meet these prerequisites before continuing with the installation.

    Best regards,
    Karl

  • MTU size

    from both pheripheral and client they are set as 247

    as for the PHy is can only be set in the client right?

    meet these prerequisites before continuing with the installation

    yes i had them downloded but using the phyton-V command didnt work so i unstalled both wireshark and phyton and reinstalled them and it seem to work

    i followed the next steps and got till here:

    then i went to press F5 to see the snffer but its not in the interfaces as can be seen below

    also do i need to have another board for the sniffer ? or can i use the pheripheral or the client?

  • update: I managed to successfully install the sniffer and program another nrf52dk with the hex file and im seeing packets being transfered. i still have 2 questions however..

    1. How can i know for sure which is my device as im seeing packets from multiple devices

    2. Howcome the lengths of packets varry between 21-37 if i should be sending 242 bytes from the pheripheral ( confirmed by the uart of the client) 

    is there something im missing please?

  • i hope that its visable but as should be seen the speed is set at 1MBPS and i set it in both codes as 2 howcome i still get 1 MBPS. also howcome i dont always recive the same amount of data (should i not always recieve 242 bytes at once)

    thank you :)

Related