Remote connection to the device has been lost

For our project, While debugging code gets error case like "Remote connection to the device has been lost, verify the device connections and restart the debugging "
Trying to recover by this options :

  • Reinstalled Windows mobile device center
  • Rebooted host machine
  • Properly stopped each debug session before rebooting
  • Sufficiently closed Visual Studio and restarted again

1838-deployment-error.png

After sufficiently closed Visual Studio and restarted project debugging it gives error like RPC server is unavailable
for solving this error I refer , Suggest, how to resolve this error case?

Dear @adder

I’m afraid there’s nothing more I can add from our side. Probably this is a question Microsoft should answer.

What you can try is to use an Ethernet connection for debugging instead of USB. It is slightly more complicated to first set it up, but after this it is also very easy to use.

Regards, Andy

@andy.tx , Thank you for your response !
with Ethernet connection for debugging it gives similar error .

Dear @adder
We are not aware of any such persistent issue, especially not on both USB and Ethernet. There’s two things I can recommend to verify:

  1. Make sure USB is disconnected. If you have both a WMDC connection over USB, and an Ethernet connection, then the debug packets can be routed through any of the two interfaces, which is not properly handled by the debugger.
  2. Do you loose the debug connection also with a simple (hello-world) application? Or is it possible that your apllication crashes the system, or a part of it? The debugger reliies on a stable operation of the underlying OS, so if your application causes the system to fail, the debug connection will be interrupted as well.

Regards, Andy

Dear @andy.tx ,

In simple program like GPIO and Hello-world it works fine but in our current project,at first attempt it is satisfied but on next attempt of debugging it gives similar error case. Also we are focusing on programming part .

Dear @adder

From a debugger point of view there’s no difference between a small and a large application. But as the debugger is a piece of software using the same resources as the application itself, it can be affected by the application. To give you a simple example: If an application turns off the Ethernet controller, Ethernet debugging will of course stop working.

I therefore suggest you try to identify what is the difference between your application and a Hello-world, for example by stripping out parts of your application until the debugger works stable.

Regards, Andy

Dear @andy.tx ,

Now sometimes getting same error case in Hello-world and GPIO projects as per below

Dear @adder,

Thank you for your reply.

We have tested our Toradex CE libraries demo applications (…\libdemos) with our WEC supported SOMs, it was quite stable. Could you try the same and let us know the feedback.

If you are seeing a similar error, please let us know with complete hardware and software details, it will help us to look at the issue

System on Module:
Carrier board or Eval board:
WEC image release:
Development PC Windows version:
Visual Studio version:

Maybe could you log the debug output and share with a log with us when the issue is occuring?

Hello @raja.tx ,
Now, Hello-world and GPIO programs are debug successfully there is no RPS server error.

Dear @adder,

Thank you for your reply and glad to know you the issue is solved.

If you find the exact issue and solution for that, could you post that here? It would help other people

@raja.tx ,
Okay, In my case Just restarted system and solve this RPC server is unavailable

for demo application like GPIO and Hello-world but for our another project it shows similar .

Dear @adder,

Thank you for your reply. As @Andy suggested here, could you try to debug it, it would be one of the reason. You would use Toradex task manager or this forum link would help you.

Let us know if are you not able to find it easily.