Generate device datamatrix for project enclosure

I’d like to generate and print the datamatrix on the top of each device to affix to the outside of a project enclosure (enabling me to connect to the device without having the open the enclosure or know which device is enclosed).

Any tips or ideas? I haven’t been able to duplicate a code exactly using the data encoded yet.

What platform are you thinking of?
If you are talking about the Gen3 (aka Mesh) devices then there already is a post about that

Thinking of the latest generation (mesh).

With some trial and error, I was able to determine that the codes on the devices are C40 encoded with no error correction.