random device address queries.

User avatar
666hjk
Posts: 47
Joined: Wed Jan 12, 2022 3:09 am
Location: 小红点

random device address queries.

Postby 666hjk » Wed Jul 20, 2022 11:57 am

Hi to All,

Regarding BLE5.0 multi advertising >> https://github.com/espressif/esp-idf/bl ... adv_demo.c

line 50 - 53

uint8_t addr_1m[6] = {0xc0, 0xde, 0x52, 0x00, 0x00, 0x01};
uint8_t addr_2m[6] = {0xc0, 0xde, 0x52, 0x00, 0x00, 0x02};
uint8_t addr_legacy[6] = {0xc0, 0xde, 0x52, 0x00, 0x00, 0x03};
uint8_t addr_coded[6] = {0xc0, 0xde, 0x52, 0x00, 0x00, 0x04};

1) 1 device with 1 mac address, how to have different mac address like the above?
does it mean that we use the mac address for our device but just increment the last number base on the device address we need?

2) shouldn't this random device address auto generate? why is it written in code , shouldn't it be auto generated by the function.

pls advise where can i read more about it ? gone thru documentation, still not clear. Thanks.
学习中找战友。

ESP_wangfang
Posts: 12
Joined: Fri Dec 25, 2020 11:06 am

Re: random device address queries.

Postby ESP_wangfang » Wed Aug 03, 2022 2:26 am

This 5.0 multi-adv feature allows you to set a random address for each extend ADV, see the attached screenshot below:
image.png
image.png (283.11 KiB) Viewed 5412 times

User avatar
666hjk
Posts: 47
Joined: Wed Jan 12, 2022 3:09 am
Location: 小红点

Re: random device address queries.

Postby 666hjk » Mon Aug 08, 2022 11:07 am

ESP_wangfang,

uint8_t addr_1m[6] = {0xc0, 0xde, 0x52, 0x00, 0x00, 0x01};
uint8_t addr_2m[6] = {0xc0, 0xde, 0x52, 0x00, 0x00, 0x02};
uint8_t addr_legacy[6] = {0xc0, 0xde, 0x52, 0x00, 0x00, 0x03};
uint8_t addr_coded[6] = {0xc0, 0xde, 0x52, 0x00, 0x00, 0x04};

1) so am i right to say that these mac address above is given by myself to the host so that it can be transferred to the controller?
2) if that is the case, is there a protocol on why all starts with 0xc0, 0xde, 0x52, 0x00, 0x00, then only the last hex figure change.
just point me to where to find these info. i can read myself.

Thanks.
学习中找战友。

Who is online

Users browsing this forum: No registered users and 25 guests