Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to get complete device name from another peripheral once it's connected?

Hi,

I'm developing a central application and I would like to be able to get the full device names of the peripherals I connect to. I know how to get the device name from the advertising data, but there are sometimes when the peripherals do not advertise the complete name, and sometimes they don't advertise it at all.

How could I get the full name once I'm connected to the peripheral?

Parents
  • Hi Andy,

    Sorry for the misunderstanding. The reason device names are getting cut down is likely due to data packets being too big, and therefore the device name is getting cut out. I suggest you either advertise smaller packets, or enable the data packet length extension (DLE) to provide bigger data packets per advertising event. 

    You can enable DLE by modifying NRF_SDH_GAP_DATA_LENGTH in sdk_config.h, or you can call the function nrf_ble_gatt_data_length_set.

    Best regards,

    Simon

Reply
  • Hi Andy,

    Sorry for the misunderstanding. The reason device names are getting cut down is likely due to data packets being too big, and therefore the device name is getting cut out. I suggest you either advertise smaller packets, or enable the data packet length extension (DLE) to provide bigger data packets per advertising event. 

    You can enable DLE by modifying NRF_SDH_GAP_DATA_LENGTH in sdk_config.h, or you can call the function nrf_ble_gatt_data_length_set.

    Best regards,

    Simon

Children
Related