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

Device name too short?

When trying out the ble_app_hrs_freertos example in nRF5 SDK 11.0.0-2.alpha_bc3f6a0, I seem to only get 14-character long device name announcements.

This happens when using components/softdevice/s132/hex/s132_nrf52_2.0.0-7.alpha_softdevice.hex.

I haven't had a chance yet to try it with s132_nrf52_1.0.0-3.alpha_softdevice.hex, which I had experience using from the nRF52 SDK 0.9.2.

Parents
  • Hi,

    the only change to the code is changing the #define DEVICE_NAME to:

    #define DEVICE_NAME                          "0123456789abcdefg"                        /**< Name of device. Will be included in the advertising data. */
    

    This is what I see in my Nexus device, I haven't tried setting a longer name than this:

    image description

  • Oh then it's really either limitation in the SoftDevice (because device name get provisioned by sd_ble_gap_device_name_set() function call and it doesn't crash) or Android. If I understand behavior of SD correctly (and also suggested by Anders's comment above) it seems unlikely that Soft Device would shorten the string. However we cannot rule it out unless either Nordic guys look into their source code/tests or you take a sniffer and look into packet which is actually exchanged between your Peripheral and phone.

Reply
  • Oh then it's really either limitation in the SoftDevice (because device name get provisioned by sd_ble_gap_device_name_set() function call and it doesn't crash) or Android. If I understand behavior of SD correctly (and also suggested by Anders's comment above) it seems unlikely that Soft Device would shorten the string. However we cannot rule it out unless either Nordic guys look into their source code/tests or you take a sniffer and look into packet which is actually exchanged between your Peripheral and phone.

Children
No Data
Related