device serial number length check