2 Replies Latest reply on Apr 11, 2017 8:13 AM by e.pratt_1639216

    Truncated Device Name

    user_478787221

      The default device name is "BLE_Serial"  which counts out to 10 characters.   When I modify the string to something greater than 10 characters, like "this is a test", the string gets truncated to 10 characters so I only see "this is a" on my cell phone.    The cyBle_discoveryData.advDataLen does not seem to change its value no matter how long I make the name.  Where do I over-ride the customizer length value?

        • 1. Re: Truncated Device Name
          hima

          Hello,

             

          The total length of a complete Advertising packet cannot exceed 31 bytes.Can you try disabling other data in advertisement packet other than the device name.

             

          Thanks,

             

          Hima

          • 2. Re: Truncated Device Name
            e.pratt_1639216

            Under the BLE component, Gap Settings, Peripheral Role->Advertisement Packet: Local Name should be checked to enable the local name being advertised, and you can tell it to use the "Complete" name or "Shortened" with specified name length in the "Shortened" option.

               

            If you are manually updating the name/info using software running on the chip, then you will need to adjust the length data value byte (first byte of each "service" being advertised) to match the amount of data following it for the service; in this case, it is the name, and thus should be the length of the name + 1 for the "Local Name" byte following the length byte.