IRK and Identity MAC for iPhone without MacOS

What do you mean by additional presence detection?

Where is your main Theengs Gateway running, on which machine and which installation kind off Theengs Gateway?

If you want too extend just the receiving range in addition to your main Theengs Gateway installation for basic Home/Away detection, the easiest and cheapest way would be to deploy some additional ESP32s with the esp32dev-ble-mqtt-undecoded binary of OpenMQTTGateweay. It is a lighter, cheaper and more energy efficient way to extend the Apple device detection compared to an extra RPi.

Then it really seems that a work profile might possibly restrict some of the Bluetooth functionality, as otherwise all Apple devices with correctly entered Identity MAC addresses and their correct IRKs will be recognise, if the Bluetooth braodcast its not being restricted in some way.

Do you see Bluetooth active in the Control Centre/Settings on the iPhone SE?

I wanna know, in which area the iPhone is.

It is running on RPi4B. Its installed with pip. The second one RPi3B is always there, so i don´t see any reason to change it with OMG. I do have other OMGs running… Thx

Yes, it is on, because i do need my headset in home office :slight_smile:

Ok, then this will only work with an additional RPI, and using the presence topic :slight_smile:

Then I really don’t know why it is not being correctly recognised, unless there is a typo in the Identity MAC or the IRK though the ESPresense hex reversal conversion, or the initial ESPresense IRK retrieval.

In your initial posts you stated that you can see you original iPhone with its random MAC addresses. How did you monitor that, and can you monitor your iPhone SE with its random MAC addresses at all? You might want to switch off all other iPhones and iPads in the house for that to be sure they are coming from the iPhone SE :wink:

It´s running and recognized many other tiles and switchbot thermostats…

So your original iPhone is working fine with the SNAP version, just not the iPhone SE?

Or best to leave the SNAP version on the side for now, as it likely is just finding the correct format for the SNAP Identities definitions.

How did you add the iPhone SE credentials in addition to your original iPhone (which model is that?) in your pip installation of Theengs Gateway?

And you previously said for your original iPhone

I don‘t get the correct MAC to run it constantly. It changes randomly.

I tried the MAC Source it Shows me under Attributes without success:

Can you see all this information with the random MACs for the iPhone SE as well, if its Bluetooth is turned on?

Correct

What credentials do you mean?

For your understanding.

  1. I tried to track my work phone iPhoneSE 2020.
    1. IRK enrollment with ESPresense → OK - i have the IRK
    1. Reversed it with your mentioned tool
    1. Put it in Theengs config and restart

Before and after this procedure i can´t see the random beacon from IPHON_SE in MQTT Explorer!

Yes, i think too, it is restricted in some functions…

  1. I need the correct syntax for snap to track my iPhone15.

Sorry, if it was not clear enough :slight_smile:

If you see these random MAC beacons in MQTT Explorer it does mean that your iPhone SE is likely also sending out the required BLE broadcasts.

How did you add the Identity MAC and IRK to the already existing other iPhone Identity MAC and IRK. Can you paste how you entered it for these two devices on your pip installation, i. e. did you add a comma in between the two credential definitions?

I edited the theengsgw.conf and added a new line under identities with comma between them.

I will paste it soon. I think the JSON will be ok, because it is recognizing the iphone15 well.

"identities": {
        "0C:DB:EA:76:B7:2F": "447468fa814e508axxxxxxxxxxxxxxx",
        "44:35:83:5B:F1:3C": "d870c43d079f0a7xxxxxxxxxxxxxxx"
    },

Yes, this looks fine like that, and if the second Identity MAC and IRKL are also correct the second iPhone should also be recognised - unless a work profile is restricting some of the Bluetooth braodcasts.

1 Like

Is it possible to use identities for OMG presence detection too?

Currently OMG does not support random MAC identity resolving, and presences detection can only be used with static MAC address ion OMG.

I don´t ask :slight_smile:

It would be pretty cool, if all the ESP32 projects could work together.

Is it possible to use another project to “extend” TheengsGateways with presence detection? :woozy_face:

Hey again,

my iPhone 8 is recognized as AppleWatch:

{
  "id": "B8:90:47:XX:XX:XX",
  "rssi": -75,
  "brand": "Apple",
  "model": "Apple Watch",
  "model_id": "APPLEWATCH",
  "type": "BODY",
  "unlocked": false,
  "distance": 5.832737223199803
}

EDIT: The same procedure as mentioned before.

That’s a new one :wink:

Is it still reported as an Apple Watch, or have the broadcasts normalised to iPhone/iPad now?

Did you try and restart the iPhone 8?Which iOs version is it running?

:slight_smile:

Yes, it is a Watch

I will try to restart…

Which iOs version is it running?

Will look after restart…

iOS Version: 17.3.1

After restart it´s still a watch.

Update 18.x is running…

After Update it´s still a watch…

Could you set Advertisement and advanced data to true, and post another MQTT message like above, not just of the presence topic, but also of its BTtoMQTT messages? And possibly also post a message for the original iPhone. I’m wondering why this particular iPhone 8 might have shorter manufacturer data. Are they both linked to the same Apple Account/ID?

Sorry - it is definetly an iPhone 11 - not 8!

I set the advanced data to true and here is what i got:

iPhone15:

{
  "manufacturerdata": "4c0010063f1e89581c3b",
  "id": "0C:DB:EA:XX:XX:XX",
  "rssi": -70,
  "brand": "Apple",
  "model": "Apple iPhone/iPad",
  "model_id": "APPLEDEVICE",
  "type": "TRACK",
  "track": true,
  "unlocked": false,
  "distance": 3.472448313889541
}

iPhone11:

{
  "manufacturerdata": "4c001005311860d2f2",
  "id": "B8:90:47:XX:XX:XX",
  "rssi": -76,
  "brand": "Apple",
  "model": "Apple Watch",
  "model_id": "APPLEWATCH",
  "type": "BODY",
  "track": true,
  "unlocked": false,
  "distance": 6.447880072893823
}

iPhone11 is a child phone - family sharing…!?
We can control the phone so i think it is part of us.