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

Issue with custom service after adding DFU service

I'm using nRF52 + SDK11.0.0 + s132. I have a custom service (with a read characteristic and a separate notify characteristic). After adding the DFU service and uploading the application via a DFU (using nRF Connect), I noticed that the read characteristic sometimes does not give back the proper data to my custom Android app (not enough bytes are returned - expect 7 but get 2 since I only write 2). If I re-connect with the nRF Connect app and do a read all, then go back to my custom app, it seems to be okay from thereafter. What could cause this? Separately, how do I send raw bytes via nRF Connect (i.e., I want to send 0x00-00, but the app sends 0x30-30, which is the ASCII code)?

Parents
  • Hi Tosa,

    Have you included Service Changed characteristic in your application ? Have you sent Service changed indication after you do DFU update ? (if your attribute table is changed after DFU).

    How do you declare your characteristic ? With fixed length or variable length ?

    I suspect that it was the cached attribute table caused the issue. On nRFConnect we do a refresh of the table every time we disconnect from the device. So that service discovery will be performed every time you connect.

    To write raw byte in nRFConnect, please select HEX when you write.

  • Which characteristic did you use ? If you use UART service (NUS) then nRFConnect won't allow to write hexa. But if you change the UUID to an proprietary one, it should give you option. If you changed and it still doesn't work, please take a screenshot and update it to the question.

Reply Children
No Data
Related