Different scanner got different MAC address for same peripheral , why?

Dear Support

I am developing a peripheral and try to scan it with my phone using nrf Connect app for Mobile and a DK52 using nrf connect for desktop, one thing I notice is that they scanned same peripheral , but shows different MAC address. The one on desktop app seems to be the right one as I try to read it in code using bt_read_static_addr(), but app can connect to it and exchange data. I wonder how my mobile app get a different MAC address? The desk top says it is a random static MAC address, doe sit mean it is fixed always?

Thanks

Ping

  • Hi Ping, 

    Could you let us know which firmware you are using on the peripheral ? 
    In theory when advertise with BLE , there should be only one advertising packet be used, unless the application has 2 sets of advertising. 

    It's the best if you can capture a sniffer trace. Then we would know what exactly advertised over the air. 

    Which phone did you use to test, was it a iPhone or Android ? 

  • Hi, Hung

    Thanks for reply!

    Just tested with remote controller firmware - the demo project from this video, I use Android phone and it shows 7D:4A:37:78:C1:39 as MAC address, while using desk App with dk52, scanned C1:72:91:7C:9A:34 as MAC address.

    The application has a advertise data and a scan response data, does this count as two set?

    Regards!

    Ping

  • Hi Ping, 
    I am testing the sample and don't see that issue. You can see the screenshot here: 

    PC: 

    Android: 

    I suspect that the phone may cache the address or have a issue or something. I would suggest to try with another phone and/or try capture a sniffer trace. 

  • Hello, Hung

    Thanks for testing for me, iPhone app doesn't show the MAC address at all, tried another Android phone and it does see same result as yours. But for other devices, My phone seems to see same result as well, only for this particular peripheral, which is a DK833, no matter what it is programmed into, always shows same MAC address, which is different from other scanners. Anyway, it is my phone only probably.

    By the way - another question , the remote controller is bonded, what does it mean? how it was configured as bonded please? May I configure to a non bonded one?

    Regards!

    Ping

  • Hi Ping, 

    PingISTL said:
    By the way - another question , the remote controller is bonded, what does it mean?

    This may explain why it's different on your phone. Bonded means the 2 devices (your phone and the remote) have paired before. They have exchanged identities and encryption key. So the connection is encrypted every time they connect. You can remove that by go to Bluetooth Setting and choose "Forget this device" to remove bond information. Note that you may need to erase the chip and flash the application again to wipe out the bond information on the chip. 

    Most likely because it's bonded with your phone , the phone display the static address of it instead of the random address. Or it's the cache address from the last time it connected and bonded. Removing the bond information should be able to fix this. 

Related