SN of HMD

Netvr
Explorer

SN of HMD

Is it possible to get a kind of Serial Number or any ID of HMD using c# script in Unity?

Vive Staff

Re: SN of HMD

Could you share what kind of application you need such kind of information?

I don't think there is any existed api to query.

Thanks.

AlexNZ
Explorer

Re: SN of HMD

For instance, if i need to collect app usage statisics (i.e. how many DIFFERENT users use my app) i need to anonimously identify different users and their sessions for statistics to be accurate

 

Such ststisitics is vial in promo projects when you need to show your client how many unique users used particular scenario

Vive Staff

Re: SN of HMD

Would you like to consider using user profile API from Viveport to collect similar information?

You can check this if it's helpful.

https://developer.viveport.com/documents/sdk/en/api_userprofile.html

 

AlexNZ
Explorer

Re: SN of HMD

Sweet! for my purposes that will be enough! Thank you
Netvr
Explorer

Re: SN of HMD

I need such information for networking properties. I want to have several HMD with different roles, the role depends on real accesories. It shoud be always one concrete role for concrete HMD.

Vive Staff

Re: SN of HMD

Can't user profile fulfill your application?

https://developer.viveport.com/documents/sdk/en/api_userprofile.html

I think most time one user log on one device.

Or you need dedicated device for dedicated role?

Thanks.

Netvr
Explorer

Re: SN of HMD

It will be LAN application and I' m not going to use Viveport.

You are right, i want dedicated device for dedicated role.

Vive Staff

Re: SN of HMD

Device S/N belongs to PII level info. Therefore we cannot have the SDK API to get it for developers without user’s grant.

This is Android system. I think the developers can find a lot of data for their requirement from internet.

Moderator

Re: SN of HMD

Just curious but were you not able to use Unity's XRNodeState.uniqueID ? Also if using the VIU (Vive Input Utility) plugin you can use IVRModuleDeviceState.serialNumber.

razoredge
Pioneer

Re: SN of HMD

@Dario @JustinVive  Is there a way to get the serial number for Vive Focus devices not yet running VIU? Possibly from WVR_GetParameters?

 

Something like this? 

char pchString[256] = "SerialNumber";
char retString[256] = { 0 };
uint32_t size;

//Get the result from device service
size = WVR_GetParameters(WVR_DeviceType_HMD, pchString, retString, 256);

 

 https://hub.vive.com/storage/app/doc/en-us/WVR_GetParameters.html

Vive Staff

Re: SN of HMD

Hi @razoredge ,

 

No, Wave doesn’t provide the API getting S/N to developers since PII security concern. Developers may follow Android policy to get it.

https://stackoverflow.com/questions/11029294/android-how-to-programmatically-access-the-device-seria...

Thanks.

razoredge
Pioneer

Re: SN of HMD

@Tony PH Lin  but assuming we do migrate our client apps to use Vive Input Utility, what about IVRModuleDeviceState.serialNumber as @Dario mentioned in the reply above this?

Vive Staff

Re: SN of HMD

@Dario I just checked IVRModuleDeviceState.serialNumber does not actually print out Focus HMD's serialNumber. I printed out as WVR_DeviceType_HMD.

Vive Staff

Re: SN of HMD

Hi @razoredge ,

 

Just clarified that the method of VIU suggested by Dario is working on PC, but not supported on Focus/Focus Plus since PII (Personal Identitfying Information) concern.

The alternative way for you is from Android API we provide previously.

Thanks.