Page 1 of 1

random device address queries.

Posted: Wed Jul 20, 2022 11:57 am
by 666hjk
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.

Re: random device address queries.

Posted: Wed Aug 03, 2022 2:26 am
by ESP_wangfang
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 4967 times

Re: random device address queries.

Posted: Mon Aug 08, 2022 11:07 am
by 666hjk
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.