Use the nrfutil device fw-verify command to check whether the firmware on a connected device matches the contents of a supplied HEX file.
The command reads back firmware from the device and compares it to the file specified with the --firmware option. This is useful after programming to confirm that the image was written correctly, or to check whether a device already contains the expected firmware before reprogramming.