Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to open ftdi device: -6 (ftdi_usb_reset failed) tang nano 20k #454

Open
H4-b opened this issue Apr 27, 2024 · 11 comments
Open

unable to open ftdi device: -6 (ftdi_usb_reset failed) tang nano 20k #454

H4-b opened this issue Apr 27, 2024 · 11 comments

Comments

@H4-b
Copy link

H4-b commented Apr 27, 2024

Whatever i try, i still get a ftdi_usb_reset failed error when i try to load something to my tang nano 20k. (the board is brand new and working)
ftdi_error

It is detected by lsusb with the right IDs, and i have setup the udev rules as needed by copying the 99-ftdi.rules.
lsusb

when i try to overwrite the pid and vid it gives me a different error:

overwrite

I am on debian testing.

I cant find any more steps to do in the other tickets about ftdi problems.

What could i do?

@trabucayre
Copy link
Owner

HI,
just to be sure could you try using sudo (and with -b tangnano20k?
This issue seems to be at libftdi level.

@H4-b
Copy link
Author

H4-b commented Apr 27, 2024

hello! thank you for your quick response. I get the same error messages using sudo:

sudo_try
I verified on windows with the gowin ide and the board works. I reprogrammed it with a blink example, but it doesn't change any of my error messages on linux.

@H4-b
Copy link
Author

H4-b commented Apr 27, 2024

Hello again!
I just tried to use it on a live Lubuntu USB, and it works there. What packets could i have on my main install that would be broken/ missing? I have installed all the packets marked as needed to install from source:
sources
(my system is up to date, the waiting to upgrade packages are still missing some dependencies to upgrade)

@zJudGenie
Copy link

@H4-b Can you check the dmesg output when you plug the tang nano ?

@H4-b
Copy link
Author

H4-b commented Apr 27, 2024

here is the dmesg output:
dmesg

@zJudGenie
Copy link

zJudGenie commented Apr 27, 2024

Seems good, I've noticed that here you didn't use sudo as trabucayre said.

Edit. sorry, you are already root

@H4-b
Copy link
Author

H4-b commented Apr 28, 2024

I just tried to see the dmesg after trying to use openFPGALoader -b tangnano20k --detect
It says that it disconnected the device, and only on one of the two ports associated. I have no idea if that's normal or not.
dmesg-new
edit: verified it, it doesn't happen on my live usb. still no idea what is wrong though.

@trabucayre
Copy link
Owner

Using sudo is finally not required: your user seems to have correct right.
the device is disconnected because to have access to them, userspace needs to detach the driver: this is the reason of this message.
The most interesting thing is you are able to use openFPGALoader with a live OS (ie more or less native): your Linux is a WSL2? I have recently observed issues in this mode: cmsis-dap not working and debugging a CPU was impossible.

If so it's why gowin is able to work: it not in WSL2 environment. When openFPGALoader shows an error associated to libftdi/libusb it's usually a lowlevel issue (ie between userspace application and hardware.

@H4-b
Copy link
Author

H4-b commented Apr 30, 2024

No, my linux was a "standard" debian testing. I even tried reinstalling the FTDI related packages to search for corruption.
However, since the last reboot, my system choose to auto-destruct for some unknown reason (missing dependencies everywhere, gnome uninstalled itself...) so it seems like that was the problem, as it's now working on a fresh install.
However, my gowin IDE was in a VM and was working fine with port forwarding.

@H4-b H4-b closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
@H4-b
Copy link
Author

H4-b commented May 1, 2024

It seems like the bug is back. I manage to make it work sometimes, but other it just doesn't. I'm going to update this message with the dmesg and terminal output when it will want to magically work to see if there is any difference.
could it be the internal usb controllers of my computer?
I am now on a fresh install of debian testing on gnome desktop.

update: even by rolling back to my completely fresh install with timeshift, i cant make it work anymore. So i am back to square one: a fresh install, but nothing works.
I am on a framework 16 laptop, and sadly it isn't supported well enough on stable yet to just use it instead.

@H4-b H4-b reopened this May 1, 2024
@H4-b
Copy link
Author

H4-b commented May 1, 2024

I choose to upgrade to unstable to test if the issue is gone, and it is. It seems like it's one of the current testing packages that is somewhat broken.
working

Tell me if you want to close this issue or not, as it's not really resolved but more circumvented.

I still have a full backup of the non-working setup if you want me to try some things to actually resolve the issue for others, or at least know where it's from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants