iOS Question BLE clear names cache

Filippo

Expert
Licensed User
Longtime User
Hi, I'm using an ESP32 to exchange data with iPhone over BLE... I changed the name of my device but the iPhone still uses the old name....
I read this thread https://www.b4x.com/android/forum/threads/change-ble-name.69932/#post-444139, I tried restarting the iPhone but it still prints out the old name...

but using Nordic nRF Connect I see the correct name... how it's possible?

thanks in advance
Try to find the name with this code:
B4X:
Private Sub btManager_DeviceFound (Name As String, Id As String, AdvertisingData As Map, RSSI As Double)
'    Log($"Device found: ${Name}"$)
    Dim NameAndMac1 As NameAndMac
    NameAndMac1.Initialize
    NameAndMac1.Mac = Id
    NameAndMac1.Name = AdvertisingData.Get("kCBAdvDataLocalName").As(String).Trim
    FoundDevices.Add(NameAndMac1)
End Sub
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
Try to find the name with this code:
B4X:
Private Sub btManager_DeviceFound (Name As String, Id As String, AdvertisingData As Map, RSSI As Double)
'    Log($"Device found: ${Name}"$)
    Dim NameAndMac1 As NameAndMac
    NameAndMac1.Initialize
    NameAndMac1.Mac = Id
    NameAndMac1.Name = AdvertisingData.Get("kCBAdvDataLocalName").As(String).Trim
    FoundDevices.Add(NameAndMac1)
End Sub
It seems to make sense actually ?, thank you!

I will try tomorrow ?
 
Last edited:
Upvote 0
Top