When reading the motherboard ID, the returned value is default string

The software cannot be activated because the serial number / motherboard ID of the device is not returned correctly

微信图片_20210105172453

Hi Vampire,

I recall we spoke through other channels earlier, but I will respond here as well for public benefit.

Yes, querying the motherboard’s serial number has inconsistent results for some zspace models. We alternatively recommend querying the display’s serial number through our available APIs.

Here are a few snippets to reference depending on which of our SDK or Unity packages you are using.

If you are using our native SDK…

ZCError error;

error = zcInitialize(&zContext);
CHECK_ERROR(error);

error = zcGetDisplayByType(
    zContext, ZC_DISPLAY_TYPE_ZSPACE, 0, &displayHandle);
CHECK_ERROR(error);

char serial_number[512] = "";
error = zcGetDisplayAttributeStr(
    displayHandle, ZC_DISPLAY_ATTRIBUTE_SERIAL_NUMBER, serial_number, 512);
CHECK_ERROR(error);

std::cout << "zSpace Serial Number: ";
std::cout << serial_number;

If you are using zCore5…

ZCore core = FindObjectOfType<ZCore>();

IntPtr zSpaceDisplayHandle = IntPtr.Zero;

try
{
    zSpaceDisplayHandle = core.GetDisplay(
        zSpace.Core.ZCore.DisplayType.zSpace, 0);
}
catch (zSpace.Core.DisplayNotFoundException e)
{
    Debug.LogError(
        "Trying to get zSpace system serial number for " +
            "licensing purposes, but no zSpace display could be " +
            "found.  Error details:");
    Debug.LogException(e);

    return;
}

if (zSpaceDisplayHandle == IntPtr.Zero)
{
    Debug.LogError(
        "Trying to get zSpace system serial number for " +
            "licensing purposes, but no zSpace display could be " +
            "found.");

    return;
}

string zSpaceSystemSerialNumber = core.GetDisplayAttributeString(
    zSpaceDisplayHandle,
    ZCore.DisplayAttribute.SerialNumber);

Debug.Log("Serial Number: " + zSpaceSystemSerialNumber);

If you are using zCore6…

ZDisplay display = ZProvider.Context.DisplayManager.GetDisplay(ZDisplayType.zSpace);

if (display == null)
{
    Debug.LogError(
        "Trying to get zSpace system serial number for " +
        "licensing purposes, but no zSpace display could be " +
        "found.  Error details:");
    return;
}

string zSpaceSystemSerialNumber =
display.GetAttribute(ZDisplayAttribute.SerialNumber);

Debug.Log("Serial Number: " + zSpaceSystemSerialNumber);