DA14581 stops sending advertisements

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
TiKoEsope
Offline
Last seen:1 year 9 months ago
加入:2019-02-25 11:51
DA14581 stops sending advertisements

Hello,

I have a problem with getting the chip to send advertisements as I need them.
What I need to do is adding two incomplete list of service IDs into a single advertisement, as my customer demands it.
#define USER_ADVERTISE_DATA "\x03"\
ADV_TYPE_INCOMPLETE_LIST_16BIT_SERVICE_IDS\
"\x70\x31" \
"\x03"\
ADV_TYPE_INCOMPLETE_LIST_16BIT_SERVICE_IDS\
"\x70\x30"

Setting this leads to the debugger stopping directly without any advertisement sent, it ends in nmi_handler.c. If I remove one of the incomplete lists, the advertisements are sent.
Works:
#define USER_ADVERTISE_DATA "\x03"\
ADV_TYPE_INCOMPLETE_LIST_16BIT_SERVICE_IDS\
"\x70\x31"
Works also:
#define USER_ADVERTISE_DATA "\x03"\
ADV_TYPE_INCOMPLETE_LIST_16BIT_SERVICE_IDS\
"\x70\x30"
Works also:
#define USER_ADVERTISE_DATA "\x03"\
ADV_TYPE_INCOMPLETE_LIST_16BIT_SERVICE_IDS\
"\x70\x31" \
"\x03"\
ADV_TYPE_COMPLETE_LIST_16BIT_SERVICE_IDS\
"\x70\x30"

I also tried this with DA14585 on SDK 6.0.10.511... has the same result.

I hope someone can give me a hint, why the chip refuses to send the advertisement with both incomplete IDs. This can be replicated by using the barebone example of the sdk and setting this as the advertisement data in user_config.h.

Best regards,
Tim

Device:
PM_Dialog
Offline
Last seen:3 days 8 hours ago
Staff
加入:2018-02-08 11:03
Hi TiKoEsope,

Hi TiKoEsope,

You are not allowed to have twice the same tag, in your case the ADV_TYPE_INCOMPLETE_LIST_16BIT_SERVICE_IDS, in the user advertising data. The stack will return you an error and you will get an NMI. If you would like to have two different incomplete service, you should define the ser advertising data as following:

#定义USER_ADVERTISE_DATA \ ADV_TY“\ x05”PE_INCOMPLETE_LIST_16BIT_SERVICE_IDS\

"\x70\x31\x70\x30"

Length: 0x05 (5 bytes in the adv data: 0x02 0x70 0x31 0x70 0x30)

Tag: ADV_TYPE_INCOMPLETE_LIST_16BIT_SERVICE_IDS (= 0x02)

1st incomplete service: 0x70 0x31

2st incomplete service: 0x70 0x30

Thanks, PM_Dialog