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

  • So you've modified this line in ./examples/ble_app_hrs_freertos/main.c file:

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

    Right? Have you seen full "Nordic_FreeRTOS_HRM" name in the same Android menu when compiled as it goes with SDK? It doesn't look like length problem (because original string is longer then yours) but rather either parsing bug in nRF5 SDK (e.g. in srtlen() function) or in Android. Should be easy to see what is actually broadcasted over the air (with any BLE sniffer).

    Cheers

Reply
  • So you've modified this line in ./examples/ble_app_hrs_freertos/main.c file:

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

    Right? Have you seen full "Nordic_FreeRTOS_HRM" name in the same Android menu when compiled as it goes with SDK? It doesn't look like length problem (because original string is longer then yours) but rather either parsing bug in nRF5 SDK (e.g. in srtlen() function) or in Android. Should be easy to see what is actually broadcasted over the air (with any BLE sniffer).

    Cheers

Children
No Data
Related