We posted an AirTag!

Andy Stanford-Clark and Alex Lennon - June 2023

Grab some popcorn, settle down in a comfy armchair and get ready for a journey that's been in progress for quite a long time.

This project was conceived in October 2022, when we had some problems sending parcels to customers in the UK. Untracked parcels were sometimes disappearing, so we had to send out a replacement. Sometimes they didn't arrive at all, or sometimes they showed up weeks later. We started using Tracked 48, which supposedly takes 48 hours, but we were finding these typically took a week to 10 days. So we mocked on twitter the ridiculous "48" title of the service. Some speculated "480" might set more realistic expectations. i.e. 20 days. Or a 48% chance of being delivered on time?

We'd heard about Apple AirTags and how people are putting them on luggage to track them when the airlines inevitably lose our cases, and wondered whether it might enable us to track a package through the postal service. We were interested to find out how good the AirTag network coverage was, and where the tags would be picked up as they travelled through the postal system. I was very kindly loaned an AirTag, which I paired with my iPhone, and did some experiments close to home. We seemed to get a reasonable amount of tracking data on the Apple "FindMy" app, so we could see where the tag was.

I wrote some code, based on the FindMyHistory project, which would constantly monitor the FindMy status reports, so we wouldn't have to watch it all day every day, and it would log the reported GPS positions of the tag, so we could draw a map of the route the parcel was taking and also how long it was being processed in sorting depots.

We tried a few experiments, sending the AirTag in a jiffy bag as a "large letter" at different classes of postage - second class, first class and Tracked 48. This was in November before the Christmas rush started and we were typically seeing 5-6 days delivery from the South of England to Liverpool.

It was interesting to see how little time the packages spent actually moving - they spend most of their time in sorting depots, presumably zipping along on conveyor belts being sorted, or maybe just sitting around in large sacks waiting for the next leg of their journey.

It was also interesting (and frustrating) to see the item arriving at the local sorting office, and then sitting there for a couple of days before it was put in a postie's van and delivered to the house.

I kept thinking I could just pop down the road and pick it up!

Then just before Christmas, we decided to throw caution to the wind and send the tag into the Christmas chaos. The tag was posted from Liverpool in a Jiffy bag at lunchtime on 20th Dec, and almost immediately it set off on its journey. Wow - we thought they were pulling all the stops out to get post delivered before Christmas! It arrived at the Royal Mail "NW Hub" near Warrington in the afternoon that day, and we assumed it would quickly be sorted and on its way - this was always a stopping off point for all the post in and out of Liverpool.

But it was not to be. It didn't move. It continued to not move.

Once we got into January, we complained on Twitter and @royalmailhelp responded and advised us that they were very busy and there were some big backlogs. Then they said we could claim compensation after it was 10 days overdue for delivery. They assured us that the letter would eventually be delivered - it wasn't really "lost" and would never be dumped or destroyed during a clear-out. So that was quite a relief! I have to say I've always assumed that sacks of mail "go missing" for various reasons, but subsequent discussions with RM representatives have reassured me that they would never "dump" undelivered mail, and in fact that would be illegal.

We passed the 480 hour point on 9th Jan. A week later it had taken 480 "working hours" (i.e. not Sundays, bank holidays or strike days). All this time I was getting lots of location data from the tag as RM employees unknowingly detected the device with their phones (iPhones and Android are part of the network). If you're curious about how AirTags and the global tracking network operates, there's a great blog post here, that explains all .

We got to a whole month in transit (20th Jan), and the tag was still sitting in exactly the same location, in the middle of NW Hub, as it was put on 20th Dec when it arrived there. All this time, the "tracked" part of the Tracked 48 service was saying "we have your item", which means it was scanned at the post office where I posted it, but had not yet been scanned on entry to NW Hub. We wondered how it was possible that the package was clearly inside the hub, but had not yet been scanned-in.

We submitted the compensation claim and were waiting for that to work its way through the (undoubtedly very busy) complaints department of Royal Mail.

Then on 23rd Jan, it all started happening! The tracking history on the RM web site was updated to say the item had been received at "North West Super Hub". In fact it said it was scanned twice - for good measure, presumably.

And then on 25-Jan we got a message to say the item had been delivered. Yay! But... the AirTag was still clearly in NW Hub still. The delivery to a friend in Edinburgh was "botched" by the local postie - they put it through the wrong door, a few doors down from the address on the parcel. It was later put through the letterbox of the correct address (presumably by the person whose house it was incorrectly delivered to). I expect the postie did it on purpose (you can't be THAT incompetent when there are numbers clearly marked on the front doors of a terraced row!), as the Jiffy bag was torn open at one end, and the contents were missing (we knew: it was still in NW Hub!). The package had taken 31 days from posting in Liverpool to delivery in Edinburgh. Sans AirTag, though.

We launched another compensation claim, as the first compensation claim for non-delivery was rejected, as the item HAD been delivered, technically.

Dealing with the RM compensation department is extremely difficult. They really don't make it easy. You submit a claim through the web site, wait for ages, get no acknowledgement that they have received the claim or are doing anything about it. Then eventually, weeks later, you get an email saying they need additional information, with a passive-aggressive time limit of 10 days, otherwise they will assume the matter has been resolved. OK, not passive-aggressive: that's just aggressive, isn't it. But after that, there's no obligation on them to reply back to you within 10 days - they can just take their own sweet time. In the end we reverse engineered the email address of the person who emailed us and sent her a pointed message to respond to our claim. That worked - we got a response the next day (11-Apr), saying our claim had been progressed and they were raising a cheque, with an additional note informing us that sending emails to employees directly would not get results. Seemingly that's not the case, as it absolutely did, Helen!

There is an escalation process for complaints to RM. It is described in a PDF document downloadable from the RM web site. However, despite saying there IS an escalation process, it gives no information about how to invoke it. Not even an address to write to, LoL! Good ol' RM, eh. Anyway, after DMing @RoyalMailHelp on Twitter, it turns out there IS a form for complaints escalation - I don't believe it's accessible from any link on the RM web site, so if you ever need it, it's here.

Meanwhile, the AirTag was still transmitting its location in NW Hub. I thought a lot about how to try to retrieve it. A friend working at RM had a friend who sometimes visited NW Hub. Maybe they could go onto the factory floor and retrieve it? I tried to contact NW Hub. Not very easy. They don't have any contact information on their web site. I suppose they want us to contact them through "official channels" - there's nobody there who can help with "normal" postal enquiries, of course. But this wasn't a normal situation!

As they're the Post Office, I decided to write to them - hoping the letter wouldn't be lost in the post, LoL. I wrote to the "Site Manager" at the address of NW Hub. No reply. I'm sure he or she was far too busy managing the site to talk to the likes of me. In desperation, and a flash of inspiration, I sent a letter marked "URGENT" to the "Head of Security" at NW Hub. That worked!

Tune in for the next thrilling episode of Andy's AIrTag saga!


Part 2

I was contacted by someone from NW Hub, who said they would try to locate my AirTag and return it to me. Excellent! With the tracking information for the parcel, they were able to ascertain the exact route it took through the labyrinthine escalator system of NW Hub. All the belts are enclosed, so it seemed likely the AirTag had come out of the Jiffy bag when it was split open, and was now underneath one of the belts resting on an inspection panel. Perhaps an engineer could take off a few panels and the AirTag would drop out?

There was also the very curious question of how the Jiffy bag came to be split open in the first place? I surmised that it had been "wooshed" through some rubber rollers at high speed, the AirTag had stuck and the envelope carried on, ripping the tag out through the end of the Jiffy bag. It turns out that's not how it works, and letters are scanned from above with cameras, in any orientation (presumably they have to be face up) as they go along the belts. It also transpired that the small, light, Jiffy bag should not have been in NW Hub at all (!). Remember back to 25th Dec when the parcel went here, before it went into NW Hub?

That is a "Mail Centre" where they pre-process the mail. Apparently the machines at NW Hub can't handle items lighter than 50g - they tend to fall off belts, don't go round bends properly, etc. So the MC should have detected that and not sent it over the road to NW Hub. Where and how did the envelope get ripped, though - still a burning question!

My contact had a CAD drawing of the machinery in the Hub. They overlaid the location data I had for the AirTag onto the drawing, and with knowledge of which belts on which floor the parcel went along (from the RM tracking data), they were able to home-in on where the tag might be.

Engineers were dispatched to remove inspection panels in the section of the line the tag was most likely to be in...

But it wasn't there.

I started doing some data analysis on the AirTag location data. There are two booleans in the location information: "isOld" and "isAccurate". I quickly sifted out the locations that were old or inaccurate and got a smaller set of candidate points. Bear in mind (if you've read the blog about how the AirTag tracking network works) that you get the location of the PHONE, not the location of the tag. Moreover, if the phone was "asleep" (slightly complicated definition of that, but either the screen is on, or has been recently), when it detected the tag, it logs the ID of the tag and the time, but does nothing else. Then later, when the phone is next looked at, it runs through the tags it's seen while it was asleep and sends out location reports for those tags - from wherever the phone is at that time. So it could be quite far away from where the tag was actually detected.

There is a "horizontal accuracy" number, but it's not at all clear what that means. I did think it might be based on the RSSI (Bluetooth signal strength) of the tag read, but it's not a percentage, and hovers around 50 for most readings, sometimes going as high as 400, so I'm really not sure how to deal with that piece of data. It might be the "HDOP" (Horizontal Dilution Of Precision), which is to do with GPS accuracy due to alignment angles with the satellite constellation. But it doesn't really help us find the tag.

I took the points that seemed most plausible (i.e. took out the outliers), and worked out the centroid of these points. That gave a new location to correlate against the CAD drawing of the site, and hoped that would give a better clue as to where the tag is. It didn't help much.

Next I decided to heat map the data points. I rounded the lat/long points at some selectable number of decimal places, using the information from this article as guidance. 5 decimal places corresponds to 1.1m on the ground. As far as I can tell, the iPhone location service is accurate to somewhere between 4 (11m) and 5 (1.1m). Don't be fooled by the apparent accuracy of seeing 13-odd digits in a lat/long value. That's down at the sub-micron level - the scale of a virus molecule! Then I created a matrix of the offsets of the points from a fixed corner point, and counted how many tag reads fell into each square. Displaying sections of this matrix allowed me to find the location most often reported.

Zooming in

10 marks the spot! Or does it? Remember these are the locations of the phones that spotted the AirTag, not the AirTag itself (which was why I tried the centroid approach first, hoping people would be passing the tag randomly from all sides). But of course that's unlikely to be the case, as there are specific areas where employees can and can't walk around the machinery, so this "10" might be an operator's station or something. Who knows - it's all very frustrating.

The result of this analysis was a point 6m "N" (along the roofline of the building) from the previous estimate, so I'm hoping a search in this area will bear fruit.

If that doesn't work, the only remaining thing (unless anyone here has any new ideas, particularly in relation to the horizontal accuracy number), is to move to what we refer to as "Plan B" - for me to visit NW Hub with a new model iPhone and make use of the UWB (Ultra Wide-Band) radio they have (which the AirTag also has) to located the tag "manually". I don't currently have an iPhone with the UWB technology on board (models from iPhone 11 onwards), so I'm on the look-out to borrow a phone for a few days, which I can sign into as "me", so it picks up the ownership of my AirTags, and would enable me to locate the device more accurately if I was there in the building.

It's worth noting that the most recent release of iOS (Oct-23) includes the ability to share an AirTag with another person - this would have been ideal: I could have shared the tag's ownership (and hence ability to pinpoint its location) with my RM contact.

Meanwhile, as of 28-Apr, the promised cheque from RM compensation department has not arrived yet. They said to give it 10 days (at least they're realistic about how long it takes to deliver things by post in this country, LoL!), but it has not yet arrived. We'll be picking that thread up next week. I think a complaint escalation might be in order.

We chased up the compensation claim, and heard (17-Apr) that "a cheque was issued to you, which hopefully you have now received. If not, please let us know and we can look into this further for you." We didn't receive the cheque (quelle surprise) so "let them know". They confirmed "the claim was processed on 11-Apr and you will receive the outcome via letter within 5-10 working days. If you are still not in receipt of the cheque by the end of the week, please come back to us so we can make some enquiries with our finance department." Honestly, it's like reading those scam emails we get every day!

The end of the week came and went. I "Came back to them". A few days later they "confirmed that a re-issued cheque has now been sent." We'll give them another 5-10 working days, then. What an utter shambles.

5-May letter and cheque from RM posted.

17-May compensation cheque arrived, was paid into the bank, and cleared successfully!

My contact at RM eventually decided enough is enough and they were not going to continue to search for the missing AirTag in their machine.
The tag continued transmitting until 23-May, when the battery finally expired. RIP little AirTag - we've been through a lot together!

As a poignant footnote to this blog, in early Nov-23 it was announced that "Royal Mail loses 360-year monopoly on delivering parcels from Post Office sites", and it was noted that "Industry sources said the decision was the result of increasing dissatisfaction at the Post Office with Royal Mail because of customers complaining about the standard of service."
I can't help thinking this is not unrelated ;)


You can contact Andy S-C on Twitter @andysc, and Alex Lennon @embedded_iot.