NRF 52832/833 NRF CONNECT SDK FACING ISSUE TO GET DATA FROM PERIPHRAL DEVICE AFTER SUCCESSFUL CONNECTION ESTABLISHMENT.

Hello Sir,

I am currently working with the nRF52832 (for testing purpose, later will use nRF52833 for final product) as a central device using the nRF Connect SDK. In my implementation, the central device scans for peripherals and establishes a connection upon detecting a specific custom UUID in the advertising packet.

  After the connection is established, the central performs service discovery. Once the discovery is complete, send a write request to the connected peripheral to initiate data transmission. The write command executes successfully, and I have also implemented a callback function to handle incoming data from the peripheral.

 However, although the callback function is triggered as expected, the data received is null. I have reviewed the relevant documentation regarding write requests, subscription, and callback handling, but I may be missing a key step in the process. Could you please advise on what might be causing this issue or suggest any additional steps required to ensure proper data retrieval from the peripheral?

Best Regards,

Suvarna Temgire,

Embedded Developer.

EMBEL Technologies Pvt Ltd.

Parents
  • Hi Suvarna,

    What exactly do you mean by "the data received is null"? Do you receive length zero, or an array of a certain size where the data is all zero, or something else? Can you share a sniffer trace so we see if the data is actually sent on air? That will which side the issue is on. If the issue is on the GATT client (the one performign the read), the next is to look into your code handlign that.

    Br,

    Einar

  •      We have identified that the data received is null, meaning the received data length is zero. To help illustrate the difference, I have attached BLE sniffer logs from two different SDKs for your reference:

    1. BLE Sniffer Log using nRF5 SDK 15.0.0Data is being received successfully.

      LOG 27 FEB 25 - CONNECTION ESTABLISHED , GOT DATA.pcapng

    2. BLE Sniffer Log using nRF Connect SDKData is being received as null (length zero).

           central nrf52832 using nrf connect sdk log 17 may 25.pcapng

               

             This discrepancy suggests a potential issue with the configuration or handling of BLE data in the nRF Connect SDK.

             

           Please review the attached logs and let me know if any additional information is required.

  • Hi,

    Looking at the file "LOG 27 FEB 25 - CONNECTION ESTABLISHED , GOT DATA.pcapng" I see that the central writes to the CCCD (#33), and the peripheral starts sending notifications. This is also the case in "central nrf52832 using nrf connect sdk log 17 may 25.pcapng" (#57, with the reply in #60). But there are no notifications.

    I may be missing something, but based on this it seems like the issue is that the peripheral is not transmitting notifications for some reason. Are you testing with the same peripheral device? Do you have logging on the peripheral, or ability to debug it so you can see what this looks like from that end? Why is it not transmitting any notifications even though that has been enabled in the CCCD?

  •         I wanted to clarify that I currently don't have the provision to debug the peripheral device. However, I can confirm that I’ve used the same peripheral with both the nRF5 SDK and the nRF Connect SDK.

           Please let me know if there's anything specific you'd like me to check or try from my end.

  • Hi,

    I see. The sniffer trace indicate that notifications are enabled, but are not transmitted from the peripheral. Wihtout debugging or understanding how the peripheral works, I am not able to say why that is. There is unfortunately not much else I can say at this point.

Reply Children
No Data
Related