A device setup drill falls apart in a predictable way. Twenty tablets, phones or terminals need a test PIN each, someone invents codes on the spot, two devices end up sharing one, and half the room is testing against a list that exists only in the organiser's head. When a device rejects a code, nobody can tell whether the device is broken or the code was wrong.
A drill needs the opposite: one known list, written down before the first device is switched on. This guide shows how to produce that list with the free Random PIN and OTP Code Generator on Ovatly, how to handle the duplicates that random batches honestly produce, and where the limits of a generated list sit.
Contents
- Quick answer
- Why a drill needs a written list
- Fix the length before you generate
- How to generate the batch, step by step
- Worked example: a five-code batch
- The duplicate problem, and what to do about it
- What these codes are not
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
Decide the code length your drill uses (4 digits for a classic PIN, 6 for an OTP-style code), open the Random PIN and OTP Code Generator, set the digits per code and how many codes you need (up to 500), and press Generate codes. Download the list straight away, because nothing is stored and it disappears when you leave the page. Then check the list for duplicates and remove them if every device needs a unique code, and only then hand one code to each device.
Why a drill needs a written list
The point of a setup drill is to test the devices, not the codes. If a code is invented at the moment of typing, a failure has two possible causes and the drill teaches you nothing. A fixed list removes one of them: the code is known, recorded and identical for everyone running the same test, so a rejection points at the device or the setup, which is what you are there to find.
A written list also makes the drill repeatable: next month's run, or the same drill at a second site, can use a fresh batch generated the same way, and results can be compared run to run.
Fix the length before you generate
Codes in a batch share one fixed length, so choose it from the drill, not from habit. Four digits is the classic PIN length and matches most device lock screens. Six digits is the OTP style used by login flows, and suits a drill that rehearses a sign-in or enrolment step. Longer codes are an option when the drill stands in for voucher or access codes rather than PINs.
Length matters for a practical reason beyond matching the device: the shorter the code, the smaller the pool it is drawn from. Four digits give only 10,000 possible codes, which is plenty for a handful of devices and tight for a batch of hundreds. That arithmetic drives the duplicate problem covered below.
How to generate the batch, step by step
- Open the Random PIN and OTP Code Generator and set the digits per code: 4 for a classic PIN, 6 for an OTP-style code.
- Set how many codes you need, up to 500 in one batch. Generate a few more than the device count, so spares exist for restarts and replacements.
- Press Generate codes. The codes come from a cryptographic random source, and leading zeros are kept, so a code like 004730 stays six digits long.
- Copy the list or download it as a text file, one code per line. Do this before anything else: nothing is stored, and leaving the page loses the batch.
- If every device needs a unique code, scan the downloaded list for repeats and delete the duplicate lines, then count the list again so you still have one code per device.
Worked example: a five-code batch
A real run of the generator, set to six digits and five codes, produced this batch:
492715
004730
835137
959162
298439
Read it the way a drill organiser should. Every code is six digits, including 004730, whose leading zeros are preserved rather than dropped. The five codes are all different, which is the usual outcome in a small batch. Hand the first code to the first device, work down the list, and tick each line off as it is used.
The duplicate problem, and what to do about it
Random batches can repeat themselves, and the odds depend on the pool size. With four-digit codes there are only 10,000 possible values, so in a batch of 500, repeats are likely rather than unlucky. Six-digit codes draw from a pool a hundred times larger, so duplicates are rarer, but chance never promises zero.
The fix is procedural, not technical: deduplicate after generating, not before. Download the batch, sort or scan it for repeated lines, remove the extras, and generate a small top-up batch if removals leave you short. Do this before the drill starts, because discovering mid-drill that two devices share a code is exactly the confusion the list was meant to prevent.
What these codes are not
These are standalone random codes. They are not time-based one-time passwords: a real OTP is derived from a shared secret and the clock, changes every few seconds, and is checked by a system that knows the secret. A generated batch has no secret and no clock. It is a printed list, suitable for drills, test data, voucher batches and classroom codes, and it is not a substitute for a TOTP or app-based login flow.
That is a strength for a drill: you want codes that stay still while devices are set up, restarted and checked.
Limitations and honest tradeoffs
Nothing is stored. The batch exists on the page and in whatever file you download; close the tab without downloading and the codes are gone, with no way to regenerate the same list.
Uniqueness is your job, not the generator's. The tool produces random codes and is honest that duplicates can occur, so any drill that requires one unique code per device needs the deduplication pass described above.
A batch is capped at 500 codes per run. A drill bigger than that means several batches, which makes the duplicate check more important, not less, since repeats can also hide across batches.
Common mistakes
- Inventing codes during the drill. Hand-written codes get shared, mistyped and forgotten. Generate the list first and test against it.
- Skipping the download. The list is not saved anywhere. If you navigate away, the batch is lost and a regenerated batch will not match anything already handed out.
- Assuming every code is unique. In a large four-digit batch, repeats are likely. Deduplicate before the drill if uniqueness matters.
- Dropping leading zeros when copying by hand. 004730 copied as 4730 is a different, shorter code. Copy the file, not your reading of it.
- Treating test PINs as production credentials. These codes are for drills and test data. Real devices leaving the drill need real enrolment, not a line from a practice list.
FAQs
Are these codes the same as the one-time codes a login system sends? No. These are standalone random codes generated in a batch. A real one-time code is time-based, derived from a shared secret and the clock, so it expires on its own. A generated batch is a fixed list you hand out and check off yourself.
Can two codes in one batch be the same? Yes, by chance. With four-digit codes only 10,000 combinations exist, so in a batch of 500 repeats are likely. If every device in the drill needs a unique code, check the downloaded list and remove duplicates before you start.
Why do some codes start with zero? Leading zeros are kept, so 004730 stays a six-digit code instead of shrinking to 4730. That matters when a device expects a fixed length and would reject a shorter entry.
Is my list saved anywhere? No. Nothing is stored, and the list disappears when you leave the page. Download the codes as a text file, one code per line, if you need to keep or print them.
How many codes can I generate at once? Up to 500 per batch. Pick the number of digits first (4 for a classic PIN, 6 for an OTP-style code), then how many codes you need, and press Generate codes.
Conclusion
A good drill is boring in the right way: the codes are settled before the devices come out, so every failure during the run says something about the setup. The Random PIN and OTP Code Generator produces the batch in one step; your part is to download it, deduplicate it if each device needs a unique code, and work down the list. When the same care turns to the paperwork side of a new site, our guide to drafting a first privacy checklist for a new blog covers the companion task. For more guides in this series, see our Security and Privacy guides.
References
- NIST, SP 800-63B, Digital Identity Guidelines: Authentication and Lifecycle Management, on memorized secrets and one-time passwords: https://pages.nist.gov/800-63-3/sp800-63b.html
- IETF, RFC 4226, HOTP: An HMAC-Based One-Time Password Algorithm, the counter-based counterpart to time-based codes: https://www.rfc-editor.org/rfc/rfc4226