MAC Address ramdonly changing while advertising

Hello, I'm using the nrf52840 dev kit with softdevice s140 and nrf52 SDK to advertise a beacon.

I've noticed that the device has a "regular" MAC address  which is the one that shows up in the nrf Connect app when I scan the beacon, however, as I'm logging the beacons and respective MAC address I've noticed that the same device has had 8 different MAC addresses (even if just momentarily) over the course of a full day, this is a problem for me because I'm going to log the beacons based on their MAC address and I'm going to have multiple in the future so this address should be static and unique to each device.

Am I missing some configuration to make the mac address to be static?

Thanks in advance.

Gabriel

Parents
  • Hi Gabriel, 

    It sounds a little bit strange. 
    As far as I know, unless configured by the application, the advertiser will change its advertising address. 

    How did you find that those 8 different MAC address are from the device under test ? 

    Did you have any filter so that you only scan the device under test ? Please be aware that there are many BLE in the environment that can mess up with the test. 

    If you try to test with one of our example to see if you have the same result ? 

  • I'm filtering by the beacon payload yes, I'm using the extended advertising format and it always starts with 0xF6FF59, I don't have any other devices that start with this pattern, and correct me if I'm wrong but this pattern seems to be exclusive to the pca10059 board?

    At first it was just one alternative address (43:43:a1:12:1f:ac) which as I've found online seems to be a "default" mac address that can be caught if the regular isn't established yet, but now I'm catching more of them, this probably wouldn't be a problem if I lower the scanner rate, as I've never seen any of the caught MAC addresses on the nrf Connect app, just wondering if there's any setting in the code that might be causing this change. 

    I'll try to test with an example in the meantime.

    Thanks for your support.

Reply
  • I'm filtering by the beacon payload yes, I'm using the extended advertising format and it always starts with 0xF6FF59, I don't have any other devices that start with this pattern, and correct me if I'm wrong but this pattern seems to be exclusive to the pca10059 board?

    At first it was just one alternative address (43:43:a1:12:1f:ac) which as I've found online seems to be a "default" mac address that can be caught if the regular isn't established yet, but now I'm catching more of them, this probably wouldn't be a problem if I lower the scanner rate, as I've never seen any of the caught MAC addresses on the nrf Connect app, just wondering if there's any setting in the code that might be causing this change. 

    I'll try to test with an example in the meantime.

    Thanks for your support.

Children
  • Hi Garbriel, 


    The device can only change the address if you do that in the application or you set it up to use resolvable address which change regularly.

    You mentioned about a pattern 0xF6FF59, what is that ? Is it a manufacturer specific data you added into the advertising packet ? 
    Please show how exactly you set up the advertiser and how you do filter on the scanner. 
    I'm not aware of any mode that allow the device to briefly switch to another advertising address and then switch back (unless you do that in your code)

  • Hi Gabriel,

    I am also experiencing cases when my device (peripheral) address every now and then changes while the device is running and advertising.

    MAC address changed during runtime from C7:2A:7D:C9:44:39 to 17:8B:E9:C7:E4:A1
    MAC address reverted back from 17:8B:E9:C7:E4:A1 to C7:2A:7D:C9:44:39  after a reset/restart.

    When this happens my other BLE PC application (central) cannot connect to it. However, if I reset/restart my peripheral device the original address is restored and my central can connect again. According to the Bluetooth documentation a static address does not change until a power cycle.

    Below are the boot-up logs showing the 'static' address I usually see.

    [00:01:16.123,107] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:01:16.123,107] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:01:16.123,138] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.6 Build 99
    [00:01:16.123,931] <inf> bt_hci_core: Identity: C7:2A:7D:C9:44:39 (random)
    [00:01:16.123,931] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1
    [00:01:16.123,931] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff

    Did you manage to resolve this problem?

    I would appreciate it if you could share your findings with me. Thank you.

    Kind regards

    Mohamed

  • Hi Mohamed,

    Unfortunately I haven't found a solution yet, I've decided to put this issue on hold for a while as it wasn't a priority at the time, I'll try to follow up on it and you can follow this thread if it comes to a solution.

  • Hi Hung, 

    Sorry for taking so long to answer but I had to put this issue on hold as it wasn't a priority at the time.

    I'll try to follow up on your questions:

    You mentioned about a pattern 0xF6FF59, what is that ?

    This is the raw data at the start of the beacon I get in my NRF Connect app. Rephrasing my previous comment I believe this to be specific manufacturer data of the nrf52840 chip, not the pca10059 board, I did not add this manually. The beacon always starts like that, don't know if it's from some of the configs or hard coded. 

    Please show how exactly you set up the advertiser and how you do filter on the scanner. 

    I could share my script, but it's essentially a basic scanner that's getting the beacon and checking the beginning for the 0xF6FF59 code, if it has that then it gets the MAC address and the rest of the beacon payload. I don't have any other nrf device connect that can justify the MAC address change, furthermore the payload is the same when the MAC address changes. 

    Thanks for the support.

  • Good Morning Gabriel,

    Thank you for your reply. I will keep an eye on this case ID just in case a solution is provided.

    The other comment I would like to add is this,

    According to the logs from bt_hci_core,

    [00:01:16.123,931] <inf> bt_hci_core: Identity: C7:2A:7D:C9:44:39 (random)

    The MAC address is supposed to be random, yet every time I reset my device after I notice a change in its MAC address, it reverts back to the old address. This does not look like a random address. So, what is meant by 'random' in this context?

    Kind regards
    Mohamed
Related