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

feedback: BLE_GAP_DEVNAME_MAX_LEN is too short

The core specification v4.0 vol 3 part C section 3.2.2.3 "Bluetooth Device Name -- Representation" states that the device name can be up to 248 bytes. I've confirmed that sd_ble_gap_device_name_set rejects long device names, consistent with BLE_GAP_DEVNAME_MAX_LEN being 31 in the S110 v 7.1.0 soft device.

We may be able to make do with 31 chars but there are cases (especially for non-European languages using UTF-8 encoding) where that may be a significant limitation. Does Bluetooth allow an implementation to reject the full length? (Yes I know longer ones won't fit in advertising/reponse packets but you can retrieve UUID 2a00 directly to get the full name.)

Parents Reply Children
  • While the line I cited does say "can be up to 248 bytes", Vol 1 Part E section 1.6 states that "can" is informative, not normative, and may be read as "is able to". Volume 2 Part C section 4.3.5 repeats the 248 byte maximum but does not use normative language nor suggest a minimum that must be supported.

    I expect the answer can be found somewhere in the 2771 pages of Core V4.2, and hoped somebody would know where, just to satisfy curiosity. It's not that important, though.

Related