unique id, serial number

Is there a way to get a unique id or serial number for each device ? (one that don't change)