8

I am having trouble deploying the Hololens Academy module: Holograms (210) to the Hololens device. It will ask for the pin, I enter it and it fails.

I can deploy and run in the emulator just fine.

I can assure that the computers are on the same network and I leave the Hololens on the pairing screen.

Error DEP6957 : Failed to connect to device '172.16.25.29' using Universal Authentication. Please verify the correct remote authentication mode is specified in the project debug settings. 0x8007274C: The network event being waited on triggered an error. ModelExplorer

Rob Allen
  • 2,871
  • 2
  • 30
  • 48

12 Answers12

6

I had this issue and solved it by installing USB Device Connectivity through the individual components section of the visual studio installer. You may also ensure that the associated service is running by using the windows Services tool.

jbat100
  • 16,757
  • 4
  • 45
  • 70
  • Spent an hour figuring it out but it turned out that Visual Studio didn't installed the USB Device Connectivity. Thank you. Microsoft docs should drop a hint when trying to upload to Hololens for the first time. – Ryan Jul 24 '21 at 22:55
4

I restarted the headset, I restarted Visual Studio and even the computer and was still facing the issues.

Eventually I determined that I needed to leave the headset pin window open while pairing and if you enter a bad pin into VS, it is hard to get/find the dialogue to change it.

As a result, I created a new build configuration which triggered the pin window immediately upon build, at which point I opened the pin/pairing dialogue in the headset and entered the pin while leaving the pin dialogue in the headset open until it showed the device as paired.

Rob Allen
  • 2,871
  • 2
  • 30
  • 48
2

I ran into a similar issue. I believe this is a bug within the Hololens O/S. I had to completely reboot the Hololens itself and then I was able to deploy again.

I also find that if the Hololens goes to sleep while Visual Studio is open, any future deployments will fail. The only solution for that is to restart Visual Studio.

Cameron Vetter
  • 782
  • 4
  • 17
  • This isn't true, simply pressing the power button (not holding down the power button) - will cause the device to wake up then you can deploy again. – x0xRumbleLorex0x Apr 21 '22 at 14:23
  • 1
    Please note: My reply is from over 5 years ago, talking about a different generation of hardware and many O/S versions ago. It behaving differently today should not come as a surprise. – Cameron Vetter Apr 22 '22 at 15:08
1

YMMV, but I've found that there's an easier fix that doesn't involve restarting VS or the HoloLens - open up the project properties, go to the "Debug" tab and edit the "remote machine" IP address. That seems to clear out any cached connection information and gets me past this problem, every time. It's still a pain, but not as much as having to restart stuff.

JAWZ apps
  • 11
  • 2
1

Make sure:

  1. TO have 'Developer mode' turned on BOTH - Hololens and the Windows 10 PC you are working upon. - This might resolve the Universal Authentication issue

  2. Both are on same network. Organizational networks which require sign-in to access wifi does not help. In that case, prefer USB OR connect to Hotpot created by your PC.

  3. Make sure they are connected by accessing the Hololens portal on web OR by using the app - 'Microsoft Hololens'

  4. Select Remote Machine on VS while running and it should automatically detect it. If not try entering the ip you used to connect to device portal. This may ask for pin which will be shown on Hololens without requiring you to do anything.

1

I did some trial and error and it worked for me! Please try the combination of the steps below (in no particular order).

Visual Studio Community Version: 2017 15.6.1

HoloLens OS Version: 10.0.14393.20168

  • Turn on Developer mode on HoloLens and make sure both devices are on same network.

  • Clean your solution in Visual Studio. Redeploy the project and debug again.

  • Uncheck any proxy settings for wifi in your HoloLens. In the Hololens-->Settings-->Network & Internet-->Proxy-->Automatically Detect Settings.

  • Restart VS
  • Restart Hololens
  • In the project settings for Debug operation, the dialog box should automatically detect your Hololens device. If not try entering the IP manually. The manual says "Ask Cortana for your IP address". Dont do that, Cortana gives the Outbound IP and not the local IP. Go to Network & Connections on Hololens and check advanced settings in Wifi and get your IP.

  • Save, Clean and Rebuild solution.

  • Manual reference: - https://developer.microsoft.com/en-us/windows/mixed-reality/holograms_101

Deepak Agrawal
  • 121
  • 1
  • 4
0

Once you have paired the device you should not have to re pair the device unless you shutdown visual studio, most of the time, this will happen when the device is sleeping, has not loaded windows or you are not wearing the device, (it knows when you are!) if you have windows loaded it should resolve this issue so long as you have properly paired the device.

Kelso Sharp
  • 972
  • 8
  • 12
0

Unpairing the device and then pairing it again worked for me

Krishna
  • 415
  • 1
  • 4
  • 11
0

In my case restarting the HoloLens device and uninstalling the application I wanted to deploy resolved the issue.

LWU
  • 1
0

In my case, I was trying on the Hololens emulator and I was connected to my company VPN. It was not able to connect to the IP address. I disconnected my machine from VPN and it started working.

bonnie m
  • 11
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 02 '22 at 12:47
0

This is what worked for me - on laptop running visual studio:

  1. click: settings: bluetooth & devices > devices > HOLOLENS-XXXXXX: remove device
  2. physically remove then reconnect usb from hololens to laptop

Then, when trying to deploy from Visual Studio, it asked me for pin again. I could NOT find how to manually edit the pin (in Visual Studio, registry, etc.).

siddarfer
  • 162
  • 1
  • 13
0

This message might appear when Visual Studio is not paired with HoloLens 2. Usually, there is a dialog that asks for providing Pin Code from the device but sometimes it doesn't appear. I didn't find settings where it can be changed or overwritten but there is a simple workaround. Change the solution configuration for example from Release to Debug or from Debug to Release, and then try a deployment. In my case VS finally asked me for the Pin Code and then I was able to switch back to Release and deploy without problems. It looks like the Pin Code is shared between all solution configurations.

Lukasz D.
  • 1
  • 4