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

Writing to Peripheral from Central

Hi, 

I am using nRF52840 Preview DK, with SDK V15.3.0 and Softdevice API V6.1.1

First, I modified the 'ble blinky peripheral example' to have more characteristics tying it to appropriate event handler and I have verified that it works using nRF Connect App.

Secondly, I modified the 'ble blinky central example', in that instead of the UUID of LED characteristic , I inserted the UUID of my own characteristic, my characteristic has the same attributes and structure as the  LED characteristic. 

On the central the characteristic is successfully found and given a connection handle, when I write to it by pressing the button, the event is properly executed and writing message gets printed.

but, there seems to be no action on the peripheral side, it receives nothing, when I again change the UUID to LED characteristic everything works fine and it's event handler gets called on the peipheral, but, with my chacteristic UUID no action takes place on the peripheral side.

can someone please explain ?

Parents
  • First I would recommend that you get a new DK, the preview kit has an engineering revision chip, and SDK 15 is not tested against that.

    Do you have a sniffer trace that shows what is happening? Also are you getting a call to ble_lbs_on_ble_evt when you perform the write?

  • Now, I have made several characteristics, some gets called and some doesn't, and there is no obvious reason as to why that is the case. I have inserted a breakpoint at ble_lbs_on_ble_evt to check if it is being is called and what I observed is that it works for some characteristics and for some it doesn't. I tried changing the order in which I define characteristics and reordered their characteristic UUID then the ones that were not working before began working, I am really confused. 

    I still haven't tested with a sniffer trace, but the logs on the central side shows successful sending of the data.  

Reply
  • Now, I have made several characteristics, some gets called and some doesn't, and there is no obvious reason as to why that is the case. I have inserted a breakpoint at ble_lbs_on_ble_evt to check if it is being is called and what I observed is that it works for some characteristics and for some it doesn't. I tried changing the order in which I define characteristics and reordered their characteristic UUID then the ones that were not working before began working, I am really confused. 

    I still haven't tested with a sniffer trace, but the logs on the central side shows successful sending of the data.  

Children
No Data
Related