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

device name

hi

I use  nrf52 sdk17.  i want to change device name .

1. if device name is less 19, more 18 ,it is ok. for example 

#define DEVICE_NAME                         "123456789123456789" .  it is OK

2 if device name is 19 or more , it is fail

  "12345678912345678912" .  it is only 18. 

I want device name is more 18 . how to do, please!

Parents Reply Children
  • Hello again,

    bear_xiong said:
    if  advdata reduce, device name more 18 is ok. but i am not sure if reduce advdata , adv is ok?

    Sorry, I am still having trouble understanding exactly what you are asking me here.
    Are you telling me that if you reduce your advdata, you are able to have a device name longer than 18 bytes? If so, I concur that this would be the case, since you then have more space left in your advertising packet to use for the device name.
    I do not understand the last part, but as long as you include the flags field (if you are advertising as connectable) then the rest of the contents of your advertising packet is up to you, to see if you are ok with it.

    bear_xiong said:
    if use extended advertising ,have some example ,please ?

    Unfortunately, we do not have any examples using extended advertising available right now.

    Best regards,
    Karl

  • thank, I know。

    second,your mean is

    if  include   init.advdata.flags                   = adv_flags;

    other contents of advertising packet, include is ok, or do not inlude is ok too?

     

  • bear_xiong said:

    if  include   init.advdata.flags                   = adv_flags;

    other contents of advertising packet, include is ok, or do not inlude is ok too?

    The flags field is required if you are advertising as connectable. If you are advertising as non-connectable you can choose to leave out the flags field, since the flags field is only used to see how you can connect to the device.
    Are you advertising as connectable? If so, you will need to have the flags field in the advertisement.

    Best regards,
    Karl

Related