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

About nRF52832 service issues

Hi,
Nrf Connect was used as a central.When I send a data (Uart Service) from the app to the characteristic value of a Service (UUID:0x0002), the callback function of another Service (0x0010) receives this data at the same time.And this is a Demo about the error.
best regards,
Tan

SDK16.zip

  • Hi,

    You have zipped the whole SDK. In the future, please zip only the project folder. That way it is easier to find the correct project files, and we save a lot of time for uploading/downloading and unzipping. Putting the folder into an existing install of nRF5 SDK is trivial.

    Which project is demoing the issue, and where in that project is the relevant source code?

    Please note that the callback functions for all services gets called, and therefore the callback function must always check to see if the event is for the correct GATT handle. See the SDK implementation of any service, where you will see that the handles for cccd, characteristics, etc. are stored in a data structure for the service instance, and in all related callback functions the handle from the GATT event is compared to the handle stored in this data structure, and action is only performed if the handle matches.

    Regards,
    Terje

Related