MRZ scanner offline, and what works without a signal
· 3 min read
An offline MRZ scanner reads the machine readable zone of a passport on the phone, without sending the photo to a server, so it keeps working where there is no mobile data and no Wi-Fi. That matters at docks and anchorages, where signal is often weak or missing. Before you rely on any such app, test it in airplane mode, and expect the printed fields to need more checking than the MRZ.
Why signal is poor at docks and anchorages
A berth can sit behind buildings or inside a steel marina structure, and a boat at anchor can be out of range of the nearest mobile tower. Coverage varies by location and carrier, so check your own, but plan as if the connection can drop at any moment. A check-in desk that relies on a shore Wi-Fi network has the same problem when that network is down or slow.
The on-device passport scanning article explains how the reading itself works. This article focuses on what the phone needs to do without a connection, how to test it, and where it falls short.
What an on-device reader needs
An on-device reader does the recognition on the phone, with no upload step in the middle. It checks the MRZ check digits locally, using the rule in ICAO Doc 9303 Part 3, so the check needs no server. Saving, editing and the history of past lists should all work with no connection. Export to a file on the phone works offline too. Sharing is the exception: mail and messaging apps need a network, and AirPrint needs the phone to reach the printer.
The app should also keep its scanned data on the phone. That makes the retention settings more important, because a photo that stays on the device stays there until the app or you delete it.
How to test any app in airplane mode
Run this test before you depend on an app at a dock. Use your own passport or a specimen page, never someone else's document.
- Install the app and set it up while you still have a connection.
- Turn on airplane mode, then check that Wi-Fi and Bluetooth are off as well.
- Close the app completely and open it again, so you are not testing a session that is still running.
- Scan a passport page with the camera, then check each field against the page, including the dates.
- Scan a second page from a photo in your library, since some apps handle saved photos differently.
- Save the list, export it to Files, and open the exported file.
If any step needs a connection, the app is not offline. Repeat the test with the phone in a weak signal area, if you can, because some apps time out rather than fail cleanly.
The honest limits of on-device reading
The MRZ is built for machines. ICAO Doc 9303 Part 3 describes the MRZ as readable by optical character recognition, with fixed positions, a limited character set and check digits. The printed fields are different. Place of birth and issue date appear in layouts that vary by country, sometimes in more than one language, and they sit on a page with a photo, a security pattern and glare from the laminate. Expect to correct more of these fields by hand than you do with the MRZ.
Check digits show that the MRZ is internally consistent. They do not show that the passport is genuine, and they do not tell you whether it is valid for your trip. Poor light, a moving boat and a blurred scan lower the quality of a reading whichever app you use, so retake a page when a field looks wrong rather than accepting it.
Where ScanPass fits
ScanPass is an iPhone app that we built after running charters in Sint Maarten. It runs recognition on the phone using Apple's on-device text recognition, and it works offline. It is still in development and coming soon to the App Store, so it is not downloadable yet. Run the airplane mode test above on ScanPass, and on any other app, before you depend on it at a dock.