I have a device nRF5340 with multiple advertisers who have different services.
I differentiated the address with bt_id_create(), but I would also like to differentiate the name.
It's possible to do it?
I have a device nRF5340 with multiple advertisers who have different services.
I differentiated the address with bt_id_create(), but I would also like to differentiate the name.
It's possible to do it?
Hello,
Yes, you can specify different device names for each set. To do that, ensure you do not have the BT_LE_ADV_OPT_USE_NAME flag set in your advertising parameters. Then, use BT_DATA_BYTES(BT_DATA_NAME_COMPLETE, "<device name>") to add the name to your bt_data structs.
Best regards,
Vidar
Edit: The device name length must also be specified: BT_DATA_BYTES(BT_DATA_NAME_COMPLETE, "<device name>", <length>)
Hello,
Yes, you can specify different device names for each set. To do that, ensure you do not have the BT_LE_ADV_OPT_USE_NAME flag set in your advertising parameters. Then, use BT_DATA_BYTES(BT_DATA_NAME_COMPLETE, "<device name>") to add the name to your bt_data structs.
Best regards,
Vidar
Edit: The device name length must also be specified: BT_DATA_BYTES(BT_DATA_NAME_COMPLETE, "<device name>", <length>)
Ok, many thanks.
I tried this and it partly works.
There's still something strange I need to check out. As soon as it's clear to me I'll get back to you.
Thank you
All right.
Now it works fine.
While creating an advertiser, there was an excessive payload length that broke the name.
Many thanks.
I'm glad to hear that it worked. Thanks for the update.