This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Use fixed ble mac address on advertisement

I'm trying to send data readings an advertising packets from the nrf21540-dk board, and use the phone as an observer to record the data.

So far I've been able to send counters, and other data over BLE as advertisements. The issue I'm having is that the mac address which shows up in nRF connect on the phone keeps changing with each change in the packet sent. How can I fix the address so it does not change?

Environment

  • nRF Connect SDK 1.9.0
  • Jlink
  • K/Ubuntu 20.04
  • Python 3.8.10
  • West v0.12.0
  • Android 11

Project

  • broadcaster sample from Zephyr
  • multiple_adv_sets from Nordic with connectable stuff removed

Hardware

  • nRF 21540-dk
  • Desktop computer X86-64
  • Motorola Edge (2020)
Parents
  • Hi

    Typically you can use the DEVICEADDR[0..1] in FICR for this. It's not possible to change this address, but it is randomly generated in production with the sole intent to be used as a random static address in BLE.

    In the Zephyr GAP you can use the bt_addr_le_create_static to create a random static address as well if you'd like, or just set the address used by the Bluetooth controller to use the one from FICR.

    Best regards,

    SImon

  • I was trying to get the device to advertise without changing it's address each time I did a stop and start. What I found is that I overlooked the first parameter for bt_le_adv_start, which after changing it to BT_LE_ADV_NCONN_IDENTITY, the address no longer changes and it works.

Reply
  • I was trying to get the device to advertise without changing it's address each time I did a stop and start. What I found is that I overlooked the first parameter for bt_le_adv_start, which after changing it to BT_LE_ADV_NCONN_IDENTITY, the address no longer changes and it works.

Children
No Data
Related