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

How to get 248 byte device name into the nRF51822 chip?

Hello, We are doing a study about the features of nRF51822 and the nRF51 Development Kit and are wondering about the maximum visible "friendly name" (DEVICE_NAME?) which the chip can advertise.

Based on some earlier discussions found here and other forums we understood that there is some limitation of 31bytes -especially if iBeacon or Eddystone stds are followed. On the other hand we know that Bluetooth specs supports 248 byte name length.

We have been able to use that long names in (Android based) mobile phones/Bluetooths - set the name - advertise and read with other mobile phone - no problems. Now we would like to get the same functionality done with the Beacons.

Our question is:

  1. Is it possible to use max 248 long names in nRF51822 which the chip advertises automatically - are visible to other devices continuously and which can be detected by standard mobile phones without pairing or any other special action?
  1. Which sample code would be the best to make the most simple test - no temperature, acceleration etc needed?

  2. What changes would be needed to be done to the sample code?

  3. If sample codes do not allow this long names what would be the approach to get the full 248 name length?

Thank you for your response.

Best regards,

Risto

Parents
  • Risto,

    Just to clarify, are you referring to the name actually contained in advertising packet? It so, I believe you can only send full names that are ~29 bytes or the initial ~29 bytes of longer names. The specs for the GAP device name don't appear to have a length limit (other than the max characteristic size on BLE, which I think is 512 bytes), but it requires a connection to retrieve. Nordic's SDK appears to limit the string passed to sd_ble_gap_device_name_set() to 31 bytes. (infocenter.nordicsemi.com/index.jsp and the definition of BLE_GAP_DEVNAME_MAX_LEN).

    For those interested, here are some possible workarounds that may work in some use-cases: Advertising a custom UUID can be used to identify products from a particular vendor. Custom advertising messages might be used to transfer a longer un-official name. And if a connection is required to retrieve the name anyway, the Device Information Service data (possible with custom data) may be a better choice for model/device data.

  • Just a minor clarification on Jan's comment: Attributes and Characteristics, like Device Name, can be longer than 31 bytes. In recent SDKs this can be done via Nordic's Long Write mechanism. Search the forum for Long Write for details.

Reply Children
No Data
Related