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

nRf8001 sending MAC address while advertising

Hi,

I just loaded the nRF8001 Arduino code on my board and used an iPhone 5 to read the data that was being advertised. I get the following response:

<CBCentralManager: 0x17eaac00> is not powered on 2014-02-14 19:20:47.417 Hedron[389:60b] Did discover peripheral. peripheral: <CBPeripheral: 0x17e9bb60 identifier = 5107EC4F-244E-6475-5BDA-C603E0D5D24A, Name = "ciright HEDRON 21", state = disconnected> rssi: -61, advertisementData: { kCBAdvDataChannel = 38; kCBAdvDataIsConnectable = 1; kCBAdvDataLocalName = "ciright HEDRON 21"; kCBAdvDataServiceUUIDs = ( "Unknown (<180d>)" ); }

However, what I am looking for is the MAC address of the chip. Is there a way that I can edit the xml file to advertise the MAC address? I don't want to connect to the device but just find out the MAC address.

Let me know.

Parents
  • Hi,

    The advertisers Bluetooth device address (which will be the "mac" address) is part of the advertisement package already. Unfortunately iOS doesn't return the Bluetooth device address for peripherals. Instead it generates a UUID that is unique for a peripheral on the given iOS device only, shown as the identifier in did Discover Peripheral, as you have pasted in your question.

    If you need the device address in your iOS application you can use one of the device information service characteristics (e.g. the system id) to add the device address as part of the advertisement package or scan response package. You can get the device address from the nRF8001 by issuing the GetDeviceAddress command. Remember to set the broadcast property for the characteristic in the GATT services tab in nRFgo studio and add service data to your advertisement package on the GAP settings tab.

Reply
  • Hi,

    The advertisers Bluetooth device address (which will be the "mac" address) is part of the advertisement package already. Unfortunately iOS doesn't return the Bluetooth device address for peripherals. Instead it generates a UUID that is unique for a peripheral on the given iOS device only, shown as the identifier in did Discover Peripheral, as you have pasted in your question.

    If you need the device address in your iOS application you can use one of the device information service characteristics (e.g. the system id) to add the device address as part of the advertisement package or scan response package. You can get the device address from the nRF8001 by issuing the GetDeviceAddress command. Remember to set the broadcast property for the characteristic in the GATT services tab in nRFgo studio and add service data to your advertisement package on the GAP settings tab.

Children
No Data
Related