Hey, so I have been working on developing a BLE central device on a Raspberry Pi using the bluepy library. It's a pretty simple application, I just need it to scan and interface with some custom external boards I am also making that utilize the nRF52810 and NUS. For the past several days, I have been noticing what seems like a "ghost" advertisement when doing BLE scanning with my RPi central device. What I mean by this, is that when all of my nRF52 DK's are unplugged and powered off, and all my custom external boards are powered off, I kept on discovering a device with the same name as my custom boards. I thought perhaps this was some sort of device caching bug in the bluepy or RPi BLE libraries so I mainly ignored it. I was also able to see the "ghost" advertisement when using nRF Connect for desktop and scanning with an nRF Dongle.
Today, it started to drive me crazy because I wanted my RPi to only connect with devices containing a specific string in the advertising name. The central kept connecting to this "ghost" advertisement instead of the DK I was working with, and made it frustrating to work on my application. So, I went on a hectic search around my desk to see if there was a custom board or DK that may be powered on via batteries or something, but I found nothing.
I then realized that as I put my phone in my pocket, the dBm of this "ghost" advertisement would decrease so I thought maybe it was my phone the whole time. I used nRF Connect mobile application on my iPhone 7 several days ago, using the advertising feature, and I did give my nRF Connect advertiser the same name as the "ghost" advertisements I have been seeing. Although, the app was not active (not running in the background) so I did not think this could be it. However, I opened the app, made sure the advertiser with that name had been removed (it had already been removed several days ago), and then cleared the app from my list of background apps again just for a sanity check, but the "ghost" advertisement was still there. I then shut off my iPhone's Bluetooth using the Bluetooth icon on the home screen. This disconnected my Bluetooth headphones, as it should, but the "ghost" advertisement remained. I decided it could not be my phone or be related to the nRF Connect mobile application, so I just moved on.
Just a few minutes ago, I forgot to plug in my iPhone so it died and powered off. The "ghost" advertisement went away when this happened. This leads me to believe that after I created the advertiser, used it for a while, removed the advertiser, and cleared the nRF Connect mobile app from the background, my iPhone continued to advertise with the custom name I entered. Not just that, but my iPhone continued to advertise with this custom name even with the phone's Bluetooth "shut off".
I don't know if this is expected behavior for some reason, if this is a bug on the nRF Connect mobile app, or if this is some bug within the iPhone itself, but this is pretty alarming to me. I'd like to think that once I stop the advertiser in nRF Connect, and the app clearly tells me that no advertisers are running or active, that this is actually the case. Not really looking for "debugging" assistance, just wanted to share and see if anyone has thoughts on this.