-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IRK for Android Device #247
Comments
Take a spare ESP chip and install ESPresense on it. Connect it to your network. While still connected to your PC, either view the logs on ESPHome (you can use any random existing device to view the logs, just select "Plug into this computer"), using the ESPresense web terminal, or any other way you'd like. Go to Or, alternatively, you can enable the BLE Transmitter in the HA companion app. |
And your device needs to be visible to one of your BLE proxies, of course. |
Additionally, I wrote a guide for Windows: |
Can I check whether my device is visible? |
I guess Bermuda would show your device with its random MAC address.
I actually never checked if it's visible, I was close to one of the scanners, unlocked my phone, opened the bluetooth settings and scanned for other devices to make sure it is visible.
|
I tried to do it that way but unfortunately this message always comes when I insert the IRK. |
Having an IRK does not guarantee that your device supports BLE. I guess your device is quite up-to-date? |
Yes, I have a Google Pixel 6. |
If you have connected your smartphone to the scanner, make sure not to delete the connection on your smartphone. This is because the IRK is associated with this connection and is crucial for maintaining the pairing. The IRK is used in Bluetooth connections to generate and resolve random private addresses, ensuring that the devices recognize each other in future connections. Deleting the connection would require re-pairing and exchanging new IRKs. |
I tried it but unfortunately it doesn't work and home assistant doesn't know the IRK. |
Did the IRK look like the example provided when you entered it? In my case, it did. An Identity Resolving Key (IRK) in Bluetooth Low Energy (BLE) has a specific format that consists of 128 bits (16 bytes). It is a binary string that exclusively contains hexadecimal values. The exact structure is as follows:
In practice, the IRK is exchanged during the pairing and bonding process between two BLE devices and is stored in a secure database. It is used to verify the identity of devices and to generate and check Random Resolvable Private Addresses to protect user privacy. For more technical details and precise specifications, you can refer to the Bluetooth Core Specification and documentation from sources like Texas Instruments.
|
Thanks, I'll do it with the Home Assistant Companion App. |
I don't think this is correct. The IRK is used purely for identifying if a a given mac address belongs to the same device that gave the IRK. For This means once you have the IRK for a device, you can delete that connection and if you used say an espresence device to get it, you can then re-flash the device with something else, all that matters is having the IRK. |
Using the companion app (and asking Bermuda to track the iBeacon id) certainly works, so you should hopefully have no trouble setting that up. The latest version of Bermuda will show you some info in the config dialog so you can tell if HA is receiving bluetooth data OK - it's possible that your original problem might have been that the IRK was OK but HA wasn't seeing any data. If you have any trouble feel free to reopen this issue or create a new one. |
Hi @agittins I am running into the same issue, Can you please confirm for Android:
Also, if its ok, once I have everything up and running, I would like to contribute to better documentation for this plugin. |
Hi @Raul-7-7, you don't need the iBeacon integration at all. If you don't want to use irk, all you need to do is:
You'll now have Bermuda sensors for that iBeacon. The benefit of irk is that then you don't actually need the app to be broadcasting at all, (so no iBeacon uuid) as Bermuda will recognise any broadcast from the device. For iphones this is a bigger benefit because they will often stop an app from advertising for power saving, which is less a problem for Android. |
How can I read the IRK from an Android device and add it as a private BLE device in Home Assistant? The Home Assistant page only says how to add macOS devices. Here in the wiki it is also possible with Android. Can someone help me there?
I use Android 14.
Many thanks
The text was updated successfully, but these errors were encountered: