Holographic Remoting (Hololens 2) connection problem in both Unity and Unreal : TransportConnectionFailed - unity3d

I'm new in hololens 2 developing and trying to use Holographic Remoting.
Unity 2019 LTS
MRTK 2.5.3
Unreal 4.26
Hololens 2
Win 10
VS 2019
In Unity : I follow a popular tutorial,
On HoloLens, go to the Microsoft Store and install the Holographic Remoting Player application.
On HoloLens, start the Holographic Remoting Player application.
In Unity, click the "Windows" menu and select "XR->Holographic Emulation".
Set the simulation mode to the remote device.
For remote computers, please enter the IP address of HOLOLENS.
Click "Connect". You should see the connection status change to "Connected", and you should see the screen appear blank in HoloLens.
Click the "Play" button to start the play mode and experience the application on HoloLens.
What I met:
Setting in Unity
Setting in Unity
When I start to "Connect", Error there:
Disconnected with error TransportConnectionFailed
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
In Unreal I follow: https://docs.unrealengine.com/zh-CN/SharingAndReleasing/XRDevelopment/AR/HoloLens/QuickStartStreaming/index.html
https://learn.microsoft.com/zh-cn/windows/mixed-reality/develop/unreal/tutorials/unreal-uxt-ch6
Setting in Unreal
Setting in Unreal
Similiar error:
LogTemp: Editor connecting to remote HoloLens2: 192.168.19.57
LogWmrHmd: WMRInterop: ConnectToRemoteHoloLens trying to connect to HoloLens2 192.168.19.57
LogWmrHmd: WMRInterop: RemotingDisconnectedEvent: Reason: 12 TransportConnectionFailed
LogHoloLensAR: Warning: HoloLens AR session disconnected from peer
I can connect the device in device portal, and in the Unreal device manager I can also connect my hololens.
device portal
Unreal device manager
Anyone meet this problem?

Could you check that is there any network management software (such as anti-virus software, Firewall, VPN, etc.) is running on your PC? Because we have solved same problems of another customer, and the reason is that he installed VPN software on the PC, which caused UDP port to be blocked. If you still see the same behavior after shutting down the network management software, please open a support ticket through this link: http://aka.ms/hololenssupport

I still didn't find a solution with this configuration (thank you Hernando, but it's not a VPN problem).
However, after I used :
unity2019LTS-XRSDK-MRTK2.4.0-DefaultXRSDKConfigurationProfile
All the things work well (whether VPN is on or not).

Related

HoloLens 2 cannot find any sessions on LAN

Project
I am currently working on a project which should allow users on the LAN to host sessions from an Android device and join them from the HoloLens 2. I have tried creating the same project in Unreal Engine 4.2.7 and 5.0.3.
Issues
I can create sessions from the Android device and they can be found from the PC and other Android devices on the same network, however the HoloLens 2 does not seem to find any sessions on the LAN. I am attaching the blueprint screenshot where I create the session.
Create session
I have a content browser which would then display all the different sessions hosted on the LAN.
Find and show sessions
In the image below you can see that I am able to find sessions from the PC but when I run the application on the HoloLens 2, it does not find any sessions on the LAN.
Find sessions menu

Remote Machine IP disappears when entering Play Mode (Unity/Hololens)

I'm working with an XR Unity project (2019.4.26f1) and I'm trying to deploy it on the HoloLens 2. I've managed to build the project and to run it in the HL from Visual Studio by cable but I need to be able to see the app in the HL when I enter on the Play Mode in Unity.
I've followed some tutorials like this one and I can do every step but when I get to the step of writing the IP in the Windows Mixed Reality window, a problem appears. When I hit play to go on Play mode, the IP disappears, and I receive an error because the Remote Machine Address is not set. Why is this happening?
I have something like this, with the IP of the HoloLens in the field, the HL are ON and with the HoloRemoting app running. I can access this IP by browser and see that the status is "Connected" and see Live footage of the Lens camera.
However, when I hit "Play", the IP disappears and I get this error.
Atempting to initiate remoting connection with no valid machine name
set. UnityEditor.EditorApplication:Internal_PlayModeStateChanged
(UnityEditor.PlayModeStateChange)
Due to potential compatibility issues, it is highly recommended to upgrade your Unity version to 2020.3.31f1 with the latest Mixed Reality OpenXR plugin. You may refer to the document on Choosing a Unity version and XR plugin - Mixed Reality | Microsoft Docs.

Cannot deploy to HoloLens (error 80004005)

I have freshly installed Unity 2018.3.10 with Visual Studio 2017 (15.9.10). I cannot deploy a bare-bones 3D unity application to HoloLens due to an error in Visual Studio ("DEP0100: Please ensure that target device has developer mode enabled. Could not obtain a developer license on 127.0.0.1 due to error 80004005"). Here are the steps to reproduce:
Create new 3D scene in Unity. Set camera position to 0,0,0 and camera clear color to solid black. Create a red cube in front of the camera with dimensions 0.1x0.1x0.1
Window / Package Manager : remove Ads, Analytics Library, In App Purchasing, TextMesh Pro, Unity Collaborate, because I don't need these
Build settings and Project Settings (Quality and Player Settings) shown in screenshots. Scripting backend = IL2CPP
Unity successfully generates a .sln file
The HoloLens has OS build 10.0.17763.316 . Under Settings/Update & Security / For developers , I set 'Use developer features'=on, 'Enable Device Portal'=on
I don't know if it's necessary, but on my PC, I also do Settings/Update & Security/For developers, select 'Developer mode', 'Enable Device Portal'=on, 'Device discovery'=on
Connect HoloLens to PC via USB cable
Open the .sln file in Visual Studio. Set to Release, x86, Device. Build / Deploy Solution
Compilation is successful, and Visual Studio asks for a PIN, which I get from the HoloLens by opening Settings / Update & Security / For developers / Device Discover / Pair
Visual Studio shows error message: DEP0100: Please ensure that target device has developer mode enabled. Could not obtain a developer license on 127.0.0.1 due to error 80004005
Make sure Developer mode is enabled on the Hololens. You can find this in settings.
If that doesn't work then...
Try reseting the device.
Reseting is annoying but that is the solution found for 'Could not obtain a developer license on 127.0.0.1 due to error 80004005'on the forums:
https://forums.hololens.com/discussion/8964/could-not-obtain-developer-license-for-hololens
Pasting the comment here as those forums will be removed:
"shyykoserhiy ✭ November 2017 I've had the same issue. Tried to run
from two different setups: MacBook Pro 2016 with touch bar (windows 10
Pro in Bootcamp) and Surface Pro 4. Same error on two different
machines. So I've though that it might be a problem with the HoloLens
itself. After Resetting the HoloLens from Settings> Update and
Security> Reset everything started to work just fine. This is the only
solution that've worked for me."
It is also mentioned in the unity forums:
https://forum.unity.com/threads/could-not-obtain-developer-license-for-hololens.500808/
"billyjacobs So I did some searching and found that one way to solve
the problem is to reset your hololens device. It will have the latest
version of the device software after you reset it. I was hesitant
against doing this at first but it worked like a charm."

"Error DEP6957 Failed to connect to device using Universal Authentication" when deploying Unity app to Hololens emulator

I've been working in a Unity app with Hololens emulator in Visual Studio 2017 in Windows Pro, and it was working great until last night where I started to get the following issue every time that I try to deploy my application into the Hololens emulator:
Error DEP6957 : Failed to connect to device '[device_ip]' using Universal Authentication. Please verify the correct remote authentication mode is specified in the project debug settings.
I've tried to do the following things without success:
Clean/rebuild solution
Checked 'uninstall/install' checkbox in the UWP project settings
Deleted Hololens virtual machine
Uncheck/check Hyper-v feature (and restart PC after each try)
Restarted computer
No luck. Sometimes, I am able to make it work, but after 30 seconds to 1 minute, the hololens emulator gets frozen and then it closes itself; again, this was working fine until last night, and I have not installed anything different, unless an automatic windows update did something. This happens with all the applications, and they run just fine in the Unity player.
I would appreciate your help on this, I just don't think the only solution is to uninstall/install Visual studio and all its components, it makes no sense, since everything was ok.
Thank you.
UPDATE
I've just noticed that if I connect the laptop to the internet by using an ethernet cable, it works, it only fails in WIFI, have you seen that before? I also have another UWP that I deploy remotely to a raspberry and it also works only with ethernet, but both of them were used to work in wifi? any idea?

Error DEP6200: Bootstrapping failed. Device cannot be found. SmartDeviceException - Deployment failed because no device was detected

I have seen few posts here about same error but none worked for me.
I am trying to deploy UWP from VS2017 from one machine to a Surface machine that is USB connected to the machine running VS2017.
Both machines are running Windows 10 Pro, 17134 (1803) April Update.
Surface machine has enabled Developer Mode in "For Developers" settings and Developer Mode package is installed on it and Remote tooling for desktop is enabled. It is also USB connected to the machine running VS2017 Enterprise 15.7.5
According to MS documentation, that is all what is needed to deploy to device. However, deploy fails with error
Severity Code Description Project File Line Suppression State
Error DEP6200: Bootstrapping failed. Device cannot be found. SmartDeviceException - Deployment failed because no device was detected. Make sure a device is connected and powered on. [0x80131500] MyApp.App.UWP
I was unable to deploy either to device or to use remote debugging.
Deploying to device was failing with the same error message as above. Interestingly, even if device (Surface in this case) is not USB connected to my dev machine at all, I get same error which basically makes sense. But I dont know why I get that same error when I connect Surface tablet to my dev machine.
Deploying for remote debugging did not work since my Surface tablet is not connected to same LAN as my dev machine.
So, for my testing purposes, I deployed by using USB stick
Right click on UWP project, choose Store, then choose Create App
Packages ....
In Create App Packages window, select "I want to create packages for
sideloading"
Click Create
Leave Local Machine as target device for validation
click on Launch Windows App Certification Kit button to launch it
and go through steps until complete
Once package is completed, I copied entire folder onto a flash drive
and moved the content of the folder to my Surface tablet
Then on Surface tablet, right click on the Add-AppDevPackage.ps1
file and choose Run This PowerShell
this will start deployment and deploy the app