This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Corrupted BLE packets in nRF Connect on Nokia 5.4, although no issues in nRF Sniffer

Hello People!

I need to transfer large amounts of information between our custom hardware based on the nRF52832 chip (S132+SDK17), and our custom mobile app running on a target device which is a Nokia 5.4 with bluetooth 4.2 in this case. Everything works fine, except, occasionally I see corrupted packets on the Nokia.

To isolate the problem, this is the test setup that I've came up with: 

  1. The device is sending 1000 packets, 228bytes each, containing 1byte increment + 227bytes of the same data each time. Sending happens in a while loop, without delay.
    (Of course 1 transmit call gets repeated until the return value of ble_nus_data_send is not NRF_ERROR_RESOURCES)
  2. The phone is simply logging the incoming data with nRF Connect + nRF Logger.
  3. I have the nRF Sniffer set up with a nRF52832DK + Wireshark to analyze the transmission. 
  4. The Devkit is between our hardware and the phone, everything is close to each other.

After spending a lot of time analyzing the data, these are the conclusions that I've arrived to, along with my questions:

  1. There are occasions where Wireshark doesn't show any form of issue with the packet, but the packet still gets corrupted in the logs. Can this be a phone (hardware) related problem? Does it have to do anything with the antenna design, or the quality of the antenna?
     

  2. I notice quite a few packets with CRC issues that don't get retransmitted. What determines if a CRC error'd packet gets re-transmitted or not?
  3. The most annoying thing is: It seems that these issues (or at least most of them) happen on the Nokia. Far less errors occur on other phones with BT5.0 (Oneplus, Samsung), but even with other phones with BT 4.2 (Xiaomi) too. I know this is a little bit out of the scope of this forum, but can you suggest any other method for testing the phone's hardware or software stack?

  4. I've repeated this test many times, and the errors seem to be random, meaning that different packets get corrupted in different tests. Can this mean that the problem can caused by radio interference? Although this doesn't give an answer about why other phones work fine.

  5. I've also tried to add a delay between the ble_nus_data_send calls (20ms), but it doesn't seem to have significant effects. Can this mean that the problem is not a timing issue?

I know we could just add a handshake mechanism between the embedded device and the phone, either with our own implementation, or by using WRITES WITH RESPONSES, but that'd make the transmission much longer, and leave us without a better understanding of why this is happening.

Any help or answer to my highlighted question is much appreciated!

Have a good day, 
Adam

Related