SteamVR Tracked Device Property Not Returning Correctly

From 4.12 on, I’ve been polling the vr::Prop_DeviceIsWireless_Bool value to understand whether the SteamVR Controller is turned on or off. Previous to 4.15, it would return true when connected and false when disconnected. Now, in 4.15, it only returns true.

Not sure if it’s a SteamVR software issue that happened to coincide with the upgrade to 4.15, but I’m not sure where exactly to look to figure this out further.

Here’s the code I’ve been using to debug, inside \Engine\Plugins\Runtime\Steam\SteamVR\Source\SteamVR\Private\SteamVRHMD.cpp, inside my own debug function:

void FSteamVRHMD::DEBUGTEST()
{    	
	for (int32 i = 0; i < 5; i++)
	{
		FString output;
		char string[vr::k_unMaxPropertyStringSize] = "";
		vr::ETrackedPropertyError propError;
		int32 numchars;
		
		UE_LOG(LogHMD, Log, TEXT("THIS IS DEBUGTEXT"));//TEXT("Warning:  SteamVR Compositor had an error on present (%d)"), (int32)Error);
		output = UKismetStringLibrary::Conv_BoolToString(VRSystem->GetBoolTrackedDeviceProperty(i, vr::Prop_DeviceIsWireless_Bool, &propError));
		UE_LOG(LogHMD, Log, TEXT("Device (%d) connected wireless=%s, error=%d"), i, *output, (int32)propError);
		output = UKismetStringLibrary::Conv_BoolToString(VRSystem->GetBoolTrackedDeviceProperty(i, vr::Prop_DeviceProvidesBatteryStatus_Bool, &propError));
		UE_LOG(LogHMD, Log, TEXT("Device (%d) on desktopbattery=%s, error=%d"), i, *output, (int32)propError);
		numchars = VRSystem->GetStringTrackedDeviceProperty(i, vr::Prop_AllWirelessDongleDescriptions_String, &string[0], vr::k_unMaxPropertyStringSize, &propError);
		output = FString(ANSI_TO_TCHAR(string));
		UE_LOG(LogHMD, Log, TEXT("Device (%d) dongle descrip=%s with %d chars, error=%d"), i, *output, numchars, (int32)propError);
		numchars = VRSystem->GetStringTrackedDeviceProperty(i, vr::Prop_ConnectedWirelessDongle_String, &string[0], vr::k_unMaxPropertyStringSize, &propError);
		output = FString(ANSI_TO_TCHAR(string));
		UE_LOG(LogHMD, Log, TEXT("Device (%d) connected dongle=%s with %d chars, error=%d"), i, *output, numchars, (int32)propError);
		numchars = VRSystem->GetStringTrackedDeviceProperty(i, vr::Prop_RenderModelName_String, &string[0], vr::k_unMaxPropertyStringSize, &propError);
		output = FString(ANSI_TO_TCHAR(string));
		UE_LOG(LogHMD, Log, TEXT("Device (%d) render model=%s with %d chars, error=%d"), i, *output, numchars, (int32)propError);
		
		numchars = VRSystem->GetTrackedDeviceActivityLevel(i);
		output = FString(ANSI_TO_TCHAR(string));
		UE_LOG(LogHMD, Log, TEXT("Device (%d) activity level=%d"), i, numchars);

	}

}

My actual code pulls this functionality to the SteamVRFunctionLibrary which exposes it to my game.

Any help would be appreciated.

Thanks,
Cameron

Hello Cameron Abt,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any blueprints/settings that may be involved with this issue?

Hello Cameron Abt,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Thanks,