Open TomBoehm opened 3 years ago
You get some information already.
Is it possible to have an indicator "Mail.app plugin connection OK" ?
You will receive a pop-up if OpenHaystack is unable to connect to the mail plugin.
Is it possible to verify if a device is already known at Apple's Servers?
If you don't get any other error and, in fact, no report for your device has been submitted to Apple, the accessory is tagged with "no location found".
What would be nice though:
OpenHaystack could scan for advertisements and mark those accessories as "nearby" so you know that the device is correctly sending out the BLE advertisements
That's definitely possible, but OpenHaystack will not be able to confirm if the device advertisement is 100% correct, because the MAC address is omitted in Apple's Bluetooth API.
Display an error if the Mail plugin fails to connect to Apple's server @Sn0wfreezeDev: I'm not sure what info we already give back to the user.
I think this error currently would also be that no reports have been found. Being more explicit here makes sense. I wanted to submit a PR later and I will include this.
@TomBoehm To ensure that your ESP32 is working correctly you can connect via a serial console and reset the esp. It will only log string during setup and not when it is already running. You can use the reset button for this.
python -m serial.tools.miniterm --raw /dev/somePort 115200
Also on some ESP32 modules they need to be restarted after flashing. For mine this was the case.
not working at all. I flashed the ESP32 new - verified the ESP via serial connection:
..... (no error) .....
I (1013) open_haystack: application initialized
I (1033) open_haystack: advertising has started.
restarted the ESP's, the Mac (does not complain about missing plugin), and all iOS devices - waited a day ... still nothing
=> might there be a regional restriction? (like we do not have HomePod's in Austria)
@TomBoehm can you ensure that your accessory is correctly emitting the beacons using our latest version?
We are not aware of any regional restrictions of the Find My network.
There is no regional restriction. • I have set up a clean macOS on a different hardware => working
on my Mac: • removed Mail plugin • upgraded to latest version • installed new Mail plugin (green indicator in the top right) • flashed new ESP32, restarted (green indicator at accessory) .... but still "no reports found"
I exported the accessory to a plist & imported it on the other device => working
although Mail plugin is installed the same way, there seem to be problems retrieving the published infos using my default Mac.
Great that you got it working on your new machine.
On your old machine: can you verify that your iCloud keychain contains an item named com.apple.account.DeviceLocator.search-party-token
(via the system's Keychain Access app)? Your error message indicates that there was an authentication issue.
I also have some issues with esp32, since deployment by the app fails I copied the source code and entered the key myself. It is in fact broadcasting the public key and is recognized by BTLEMap as "Offline Finding" and as an (unknown) Apple Device. The Mail Plugin is also working, since I can get location reports from a RPi Setup, minutes after launching the HCI script. Still no reports for the esp32 tag. I suspect the iOS devices are not sending reports about the esp32 tags, for some reason. Maybe wrong advertising format? I did not find a way yet to capture the whole advertising package and analyse it and compare it with the expected format from your paper/Apples official docs. Location is also Vienna so no regional limits.
@schoeberlt You can capture full BLE advertisements (including sender's MAC address) via Apple's PacketLogger (part of Additional Tools for Xcode package).
@schmittner Thank you. Using the flash_esp32 script I managed to get it working properly. I had to change the baud rate to 115200 though, it might be specific to my use case, I am using a lolin32 lite clone with ESP32-D0WDQ6 (revision 1). Now I have to debug my own firmware, I copied the decoded key into a byte array, and used the same logic you have, but the final package could be different. PacketLogger is perfect for this case, thank you for the suggestion.
The iCloud keychain contains com.apple.account.DeviceLocator.search-party-token and com.apple.account.DeviceLocator.token, but they look different from the entries at the "working" environment. They are 205 characters long ( working = 51 characters). Can I reset / delete them to start again? => maybe a "reset button" somewhere in the App might make sense, if others face such problems too.
A possible reason: I tried different methods to run OpenHaystack compiled myself to get it signed & downloaded the official release. Could that confuse keychain?
The search-party-token
is part of Apple's Find My implementation. We only read that token and never overwrite it, so it should not matter, which way you installed OpenHaystack. You can delete the tokens. New ones will be created when you open the Find My application. But I don't why this could help.
Due to the fact that the process consists of several steps, it is hard to find out what is broken: broadcast - upload - download.
Example: Status "no reports found" ...flashed 2x ESP32 - They can be found as bluetooth device(BT scanner), but do not provide any log info on the serial connection. ...installed the Mail.app plugin, but since I have no working device it is hard to verify if the plugin is retrieving correct.
Is it possible to have an indicator "Mail.app plugin connection OK" ? Is it possible to verify if a device is already known at Apple's Servers?
By now it is only possible to verify the console: (filtered by Process== OpenHaystack) Where that NSURLErrorDomain error can be found, but how to find out if that "Berlin" is OK - or should be "Vienna" in my case?