This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[NRF52] Change MAC address after / before advertising

Hi

there are some question regarding this in the forum but I didn't find any clear approach on changing the MAC address.

I'm on SD132 with SDK17 and want to change the toggle MAC address back and forth after each advertisement slot.
Currently it seems to me I have to use an external timer for this task, as it looks like the advertisement hast to be stopped to change the MAC address.

On activating advertisement again, the device will immediately start advertising. If I want to keep up the advertisement interval of  let's assume 50ms, a timer is needed to keep up the interval.

Am I missing something or am I on the wrong track?
Is there any better approach to achieve this?

Parents
  • Hello,

    I'm on SD132 with SDK17 and want to change the toggle MAC address back and forth after each advertisement slot.
    Currently it seems to me I have to use an external timer for this task, as it looks like the advertisement hast to be stopped to change the MAC address.

    This is correct - in order to change the MAC address you will need to stop and restart advertising. This means that you will have to use some non-SoftDevice trigger to restart the advertisings, such as a application timer instance.
    You could also use Radio Notifications to trigger the advertising stop.

    If you were just changing the advertising data payload then you could have update it without restarting advertising, but since it is the MAC address you will need to stop and restart.

    Best regards,
    Karl

Reply
  • Hello,

    I'm on SD132 with SDK17 and want to change the toggle MAC address back and forth after each advertisement slot.
    Currently it seems to me I have to use an external timer for this task, as it looks like the advertisement hast to be stopped to change the MAC address.

    This is correct - in order to change the MAC address you will need to stop and restart advertising. This means that you will have to use some non-SoftDevice trigger to restart the advertisings, such as a application timer instance.
    You could also use Radio Notifications to trigger the advertising stop.

    If you were just changing the advertising data payload then you could have update it without restarting advertising, but since it is the MAC address you will need to stop and restart.

    Best regards,
    Karl

Children
No Data
Related