This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

How to include mac address in advertisement packet name?

Hello, I am using sdk 12.2.2 and pca10040. I want to include the mac address in adv packet name. I am not aware of the api used to get mac address. I used sd_ble_gap_address_get(&m_devAddress); but it didn't work. Can I get help related to this challenge? Thanks, Shailav

Parents
  • Despite fact that MAC is indeed in every BLE PDU including all forms of ADV packets (so why would you include it in payload data?) you can indeed put whatever you want into certain AD objects like Manufacturer Specific data. If you are using Nordic Soft Device then function sd_ble_gap_address_get is the right one to get actual 6-byte value. If you have any problem while calling it please be very specific about how you define/init parameters of the function, what error/status code is returned by the function, what is in returned structure/pointer vs. what you see as current MAC address on the air (e.g. through any observer/scanner app like Nordic nRF Connect on the phone).

Reply
  • Despite fact that MAC is indeed in every BLE PDU including all forms of ADV packets (so why would you include it in payload data?) you can indeed put whatever you want into certain AD objects like Manufacturer Specific data. If you are using Nordic Soft Device then function sd_ble_gap_address_get is the right one to get actual 6-byte value. If you have any problem while calling it please be very specific about how you define/init parameters of the function, what error/status code is returned by the function, what is in returned structure/pointer vs. what you see as current MAC address on the air (e.g. through any observer/scanner app like Nordic nRF Connect on the phone).

Children
No Data
Related