Stack knows the address of the device which it is connected to, but name is typicaly not known. If you application is a client and performed scanned, the name of the peer device might show up in the advertisement_report. Meanwhile it is optional for an advertiser to include device name. The only reliable way to get peer's name is to read name characteristic from device's database. You should be able to register read response callback and then do bleprofile_sendReadByType for UUID_CHARACTERISTIC_DEVICE_NAME (0x2a00).