Visual Studio failed deploy to HoloLens: Error DEP6957 : Failed to connect to device
Asked Answered
P

12

9

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

Pincers answered 25/7, 2016 at 22:38 Comment(0)
P
5

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.

Pincers answered 27/7, 2016 at 15:42 Comment(0)
M
7

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.

Morose answered 5/6, 2020 at 8:34 Comment(2)
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.Lakesha
Thank you! Yeah... I missed this in the docs, learn.microsoft.com/en-us/windows/mixed-reality/develop/… - it's their, but it's fine-print, and they tutorial they offer should make it a "note" or "warning".Academy
P
5

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.

Pincers answered 27/7, 2016 at 15:42 Comment(0)
F
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.

Flieger answered 26/7, 2016 at 1:27 Comment(2)
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.Pistoia
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.Flieger
A
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.

Appropriate answered 20/5, 2017 at 9:42 Comment(0)
D
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.

Dewberry answered 21/2, 2018 at 4:45 Comment(0)
C
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

Copier answered 11/3, 2018 at 22:28 Comment(0)
L
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.

Largely answered 7/9, 2016 at 14:39 Comment(0)
E
0

Unpairing the device and then pairing it again worked for me

Elf answered 11/12, 2018 at 17:41 Comment(0)
D
0

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

Duax answered 28/7, 2020 at 9:33 Comment(0)
B
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.

Baton answered 2/3, 2022 at 5:55 Comment(1)
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.Merit
S
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.).

Saturnalia answered 18/9, 2022 at 16:13 Comment(0)
C
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.

Christiansen answered 10/11, 2022 at 10:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.