boardidprogram reads serial numbers off of boards. It has options to support many different kinds of hardware. To have it read the serial number off the NervesKey, add a
rootfs_overlay/etc/boardid.conffile to your Nerves project. This will override the
boardid.confdistributed with your Nerves system (assuming that you're using an official Nerves system). The contents should be:
boardidat the IEx prompt using the Toolshed
System.cmd/3if not using Toolshed) by running:
-b force -f failedpart ensures that
boardiddoesn't fall back to try to find a serial number based on options in a
boardid --helpfor more information.