How to name a (Central) device and get that (Central) BLE device name on a peripheral side after connecting to it?

Hi,


I have one central and one peripheral devices running. Currently I run a scanning filter on Central side and connected to the peripheral with desired name. 

But now on peripheral side I want to read the name or any unique identity except MAC address of (Central device) in peripheral example when it gets connected to it. 

I know that central cannot advertise names or other things like a peripheral but is there a way to define a name or any other identifier on central side and read it on the peripheral side after establishing a connection. 

Thank you

Parents
  • Hi,

    It is possible to achieve this, yes. The central can implement a GATT server with the Device Information Service (DIS), and the peripheral could include a GATT client with a DIS client. There is no DIS client implementation in the nRF Connect SDK though, so you would have to make that yourself (typically by looking at a GATT client implementation for another service to see how it is done).

Reply
  • Hi,

    It is possible to achieve this, yes. The central can implement a GATT server with the Device Information Service (DIS), and the peripheral could include a GATT client with a DIS client. There is no DIS client implementation in the nRF Connect SDK though, so you would have to make that yourself (typically by looking at a GATT client implementation for another service to see how it is done).

Children
Related