• 0
mmmtgo

unable to connect to hw_server

Question

this is my first attempt to program an FPGA (I use Basys 3), and when I tried to connect to the hw_server after generating the bitstream , I got this error: 

Quote

ERROR: [Labtools 27-2223] Unable to connect to hw_server with URL "TCP:localhost:3121".
Resolution: 1. Check the host name, port number and network connectivity.
2. Check to ensure the hw_server is running on the target.

 

Share this post


Link to post
Share on other sites

23 answers to this question

Recommended Posts

  • 0

hello, i have the same problem... my laptop can't see the board even it doesn't appear in the ports com section when I connect it... I try to reinstall the drivers but I can't do it because windows tells that i am not an admin... someone have any idea to fix it? I try with different USB cables but I think that I need the drivers or my Arty A7 doesn't work fine...

Share this post


Link to post
Share on other sites
  • 0

Hi Enrique,

If you don't have the correct drivers, different USB cables won't help.

When you open Vivado do a right click on the icon and select Run As Administrator and then try again to call the path.

image.png

 

If it doesn't work, contact the person who administrates your computer to install the drivers. If it's your personal computer, try to enable the administrator account from Computer Management.  

Regards,

Bianca

Share this post


Link to post
Share on other sites
  • 0

I too am having issues. I just acquired a Basys3 and installed Vivado. The HW manager is unable to find the board.

Here is the error:

connect_hw_server -allow_non_jtag
INFO: [Labtools 27-2285] Connecting to hw_server url TCP:localhost:3121
INFO: [Labtools 27-2222] Launching hw_server...
INFO: [Labtools 27-2221] Launch Output:

****** Xilinx hw_server v2020.1
  **** Build date : May 27 2020 at 20:24:38
    ** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
ERROR: [Labtools 27-2220] Launch Error:
Unable to launch local hw_server executable.

ERROR: [Common 17-39] 'connect_hw_server' failed due to earlier errors.

Share this post


Link to post
Share on other sites
  • 0

Hi @MarkSe,

I presume the Basys 3 turns on when you connect it to power and flip the power switch? Have you installed the cable drivers as mentioned here?

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

Hi J,

Thank you for your reply! I am hoping to get this up and running so I can port my Spartan-3E projects over.

Yes, when I plug it into the USB and turn it on it powers up. The jumper is set to JTAG mode. And I just reinstalled the cable drivers per the link that you provided. It still says the same think when I click on "Open Target" from the HW manager and choose Autoconnect. The instructions in that link for the install_drivers_wrapper.bat appear to be wrong as it complained about the extra parameters. I ran the command prompt and Vivado both with Admin rights.

Here is the log file from the cable driver install:

INFO: InstallPath="D:\Xilinx\Vivado\2020.1\data\xicom\cable_drivers\nt64\"
windrvr6 is not installed (this is expected for Windows 10 and later)
INFO: Installing Windows 10 pcusb driver...
Microsoft PnP Utility

Processing inf :            xpcwinusb.inf
Driver package added successfully.
Published name :            oem2.inf


Total attempted:              1
Number successfully imported: 1

INFO: INF file D:\Xilinx\Vivado\2020.1\data\xicom\cable_drivers\nt64\dlc10_win10\xpcwinusb.inf was successfully installed for driver.
INFO: Running digilent installer...

<<<<< Digilent Adept Runtime Setup >>>>>
Installer version: 1.5.8 release: 2018/06/22
Digilent Software Path: C:\Program Files (x86)\Digilent

Your system is up-to-date with the components of this installer.
INFO: Running SmartLynq installer...
INFO: SmartLynq installed successfully

Share this post


Link to post
Share on other sites
  • 0

Hi @MarkSe,

Yes; presuming you are on Windows 10, you would be able to see the Basys 3 under Universal Serial Bus controllers as "USB Serial Converter A" and "USB Serial Converter B" both with a Bus reported device description (in the details tab in their Properties) as a "Digilent USB Device".

I also took a further look and learned from this Xilinx thread, https://forums.xilinx.com/t5/FPGA-Configuration/Trouble-with-Cable-Drivers-Vivado-2020-1/m-p/1133226/highlight/true, that Xilinx now has a separate Digilent driver installation executable that you can just double-click and run. In your case, it should be located in the D:\Xilinx\Vivado\2020.1\data\xicom\cable_drivers\nt64\digilent folder.

Let me know how this goes.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

@JColvin thank you for that. I tried to install the drivers using the executable you mentioned from an Administrator Prompt. I appeared to succeed. When I look in the Device Manager under the Universal Serial Bus Controllers node I see both "USB Serial Converter A" and "USB Serial Converter B". However the device description on the Details tab for both says "USB Serial Converter A (or B)"

Looking at the Events tab shows the following error during driver install. I have one of these events from the install using the .bat file and one from the executable you recommended. Here are the respective event log entries:

(from install_drivers_wrapper.bat run)

Device USB\VID_0403&PID_6010&MI_01\6&186d11bf&0&0001 was not migrated due to partial or ambiguous match.

Last Device Instance Id: USB\VID_0C76&PID_161E\5&13d43362&0&1
Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
Location Path: 
Migration Rank: 0xF000FFFFFFFFF122
Present: false
Status: 0xC0000719

(from install_digilent.exe run)

Device USB\VID_0403&PID_6010&MI_01\6&186d11bf&0&0001 was not migrated due to partial or ambiguous match.

Last Device Instance Id: USB\VID_0C76&PID_161E\5&13d43362&0&1
Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
Location Path: 
Migration Rank: 0xF000FFFFFFFFF122
Present: false
Status: 0xC0000719

Could you possibly show me what the Driver File Details should look like? I've attached images of the USB Serial Converter A driver details.

Please let me know if I can provide any further information to help troubleshoot. 

Thanks!

Mark

FTDI Driver Details.PNG

FTDI Driver Properties.PNG

Share this post


Link to post
Share on other sites
  • 0

@JColvin I tried uninstalling the drivers for "USB Serial Converter A", reboot and then reinstall the cable drivers. This installed an earlier version of the FTDI drivers than what had been on my machine. Same result 'connect_dw_server' failed. I then updated the drivers in Device Manager, which pulled down the latest Microsoft Hardware Compatibility FTDI drivers. Same result.

The fact that the device enumerates suggests this is not a board/cable problem. But somehow there is an issue with getting the right cable drivers or with Vivado launching the hw server.

I would really appreciate any additional help/ideas. I feel like this should be a solvable issue. There is no unstated requirement for USB 3.0 support is there? My development PC is a few years old and does not have USB 3.0 on the motherboard.

Thanks!

Mark

Share this post


Link to post
Share on other sites
  • 0

@JColvin I am not sure if this is a valid check but if I try to run the hw_server.exe manually from Vivado\2020.1\bin\unwrapped\win64.o I get the following output:

 

D:\Xilinx\Vivado\2020.1\bin\unwrapped\win64.o>hw_server.exe

****** Xilinx hw_server v2020.1
  **** Build date : May 27 2020 at 20:24:38
    ** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.

INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application

Cannot create listening port: Socket bind error. An attempt was made to access a socket in a way forbidden by its access permissions

This really now sounds like a Windows permissions issue of some sort. Perhaps with using a well known IANA port like the default of 3121.

So I tried to manually re-run the hw_server using: hw_server.exe -s tcp::50000 I get the following.

D:\Xilinx\Vivado\2020.1\bin\unwrapped\win64.o>hw_server.exe -s tcp::50000

****** Xilinx hw_server v2020.1
  **** Build date : May 27 2020 at 20:24:38
    ** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.

INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application

INFO: To connect to this hw_server instance use url: TCP:markse-PC:50000

Warning: Cannot create '3000:arm' GDB server: An attempt was made to access a socket in a way forbidden by its access permissions
Warning: Cannot create '3001:arm64' GDB server: An attempt was made to access a socket in a way forbidden by its access permissions
Warning: Cannot create '3002:microblaze' GDB server: An attempt was made to access a socket in a way forbidden by its access permissions
Warning: Cannot create '3003:microblaze64' GDB server: An attempt was made to access a socket in a way forbidden by its access permissions

But the server ran. The warnings strongly seem to hint that Windows is blocking attempts to open listen sockets on the port 3xxx range.

With the hw server running I attempted to manually connect to it from Vivado using the following TCL command line: connect_hw_server -allow_non_jtag -url TCP:markse-PC:50000

Which produces the following output in Vivado.


INFO: [Labtools 27-2285] Connecting to hw_server url TCP:markse-PC:50000
INFO: [Labtools 27-3415] Connecting to cs_server url TCP:localhost:3042
INFO: [Labtools 27-3417] Launching cs_server...
INFO: [Labtools 27-2221] Launch Output:
Traceback (most recent call last):
  File "git_cs_server\chipscope\server\main.py", line 401, in <module>
  File "git_cs_server\chipscope\server\main.py", line 397, in main
  File "site-packages\click-7.0-py3.7.egg\click\core.py", line 764, in __call__
  File "site-packages\click-7.0-py3.7.egg\click\core.py", line 717, in main
  File "site-packages\click-7.0-py3.7.egg\click\core.py", line 956, in invoke
  File "site-packages\click-7.0-py3.7.egg\click\core.py", line 555, in invoke
  File "git_cs_server\chipscope\server\main.py", line 279, in start_server
  File "git_cs_server\chipscope\server\main.py", line 259, in start_server
  File "git_cs_server\chipscope\server\main.py", line 293, in __init__
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
[22024] Failed to execute script main

ERROR: [Labtools 27-3733] Error during cs_server initialization: Unable to connect to cs_server at URL: TCP:localhost:3042.
connect_hw_server: Time (s): cpu = 00:00:00 ; elapsed = 00:00:14 . Memory (MB): peak = 1042.156 ; gain = 0.000
ERROR: [Common 17-39] 'connect_hw_server' failed due to earlier errors.

 

I tried all of this again disabling my firewall. All of this seems to point towards Windows blocking access to sockets with low port numbers. If I run the hw server manually with the following (rebasing all the default ports to the 50000 range) I get no warnings on the server side: hw_server.exe -s tcp::50121 -g50042 -p50000

Which gets us much further from Vivado, but it still fails with the following:


ERROR: [Labtools 27-3733] Error during cs_server initialization: Unable to connect to cs_server at URL: TCP:localhost:3042.
connect_hw_server: Time (s): cpu = 00:00:00 ; elapsed = 00:00:09 . Memory (MB): peak = 1042.156 ; gain = 0.000
ERROR: [Common 17-39] 'connect_hw_server' failed due to earlier errors.

Which I assume is the ChipScope server failing to start using port 3042? I can't figure out where/if I can change the default ports.

Anyway I hope this helps you troubleshoot my issue a little further.

Mark

Share this post


Link to post
Share on other sites
  • 0

Hi @MarkSe,

The images you posted for the driver details and the driver tab USB Serial Converter A Properties are exactly the same as what I have. The device description I was referring to was actually the bus reported device description. As far as I know there isn't any dependency on using USB 3.0.

I'll have to ask some others with what you are experiencing. The only other thing I can think of to try differently, would be to install the latest version of the Adept software, https://reference.digilentinc.com/reference/software/adept/start, (that's what the executable in the digilent folder was for, albeit an older version). If Vivado isn't recognizing the device, I usually then shut down my computer and restart it. What version  Beyond that though, I'm not certain of how much help we can be; I'm at least unfamiliar with how the hardware server actually connects to an external device.

Thanks,
JColvin

Bus reported device description.png

Share this post


Link to post
Share on other sites
  • 0

@JColvin I also show Digilent USB Device in Device Manager under Bus reported device description. So it appears the board/cable connection is healthy and the drivers are there.

I am at a loss for how to fix this, is there a way to change the ports used by Vivado?

 

Mark

Share this post


Link to post
Share on other sites
  • 0

Hi @MarkSe,

When choosing to connect to a remote target within the Hardware Manager (manually as opposed to via Auto Connect), it looks like you specify a port that way. I also found this Xilinx thread, which doesn't have the exact same error that you are getting, but might be something to try.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

Oh, are you able to detect the Basys 3 through the Digilent Adept software? That might help give us another clue as to the root of the problem.

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, JColvin said:

Oh, are you able to detect the Basys 3 through the Digilent Adept software? That might help give us another clue as to the root of the problem.

@JColvin Yes, I just installed the newer version of Digilent Adept and when I run it I am able to find the device. I never tried to run an earlier version of Adept. Please let me know if there is some information from the Digilent app that I can provide to help. I am reviewing the Xilinx thread that you shared.

Edited by MarkSe

Share this post


Link to post
Share on other sites
  • 0

@JColvin Following the Xilinx thread you linked I typed the following in the TCL command prompt: hw_server -s TCP::3121 -d

This produced the following error message:

INFO: hw_server application started

INFO: Use Ctrl-C to exit hw_server application

Cannot create listening port: Socket bind error. An attempt was made to access a socket in a way forbidden by its access permissions

 

So something is definitely preventing the Vivado hw_server from running.

 

Edited by MarkSe

Share this post


Link to post
Share on other sites
  • 0

Hi @MarkSe

Check the firewall settings. You may have earlier presses deny on Windows popup and now it is blocking.
The easiest is to delete the rules for "hw_server", then the next time it will ask again. 

image.thumb.png.5d09a9a477a075d185dc83e58e6e86d5.png

Share this post


Link to post
Share on other sites
  • 0

@attila Thank you for that suggestion. There are no rules set in my Firewall and I was never prompted by the Windows Firewall. I believe that is because I use Norton Security. I've disabled Norton to eliminate that as a possibility.

I am wondering now if the virtual networks associated with Hyper-V could be interfering. I have Hyper-V enabled for mobile app development.

Share this post


Link to post
Share on other sites
  • 0

@JColvin @attila Thank you everyone for your help! It turned out that Windows Hyper-V was excluded the port ranges needed for Vivado. I disabled Hyper-V and now I am able to connect to the device. I don't know if there is a way to tune Hyper-V to relax the port restrictions. Either way you may want to post some sort of notice for others who may encounter this issue in the future.

Now I can get back to Verilog coding with my Basys3. Yay!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now