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

Can't list devices on Ubuntu 20.04 #136

Closed
strawberryhacker opened this issue Jan 20, 2024 · 4 comments
Closed

Can't list devices on Ubuntu 20.04 #136

strawberryhacker opened this issue Jan 20, 2024 · 4 comments

Comments

@strawberryhacker
Copy link
Contributor

Hi,

I am using a fresh install of Ubuntu 20.04 with libudev-dev installed.

Running edbg -l does not detect any programmers.

Trying with sudo result in Error: ioctl(CONTROL): -1.

I replaced the following line with if (res < 0) return 0;:

edbg/dbg_lin.c

Line 46 in c983cef

check(res >= 0, "ioctl(CONTROL): %d", res);

Now it worked running the command as sudo.

I have no idea why it happens, or if it is a real issue.

@ataradov
Copy link
Owner

I will try to replicate this. What debugger was used?

As far as sudo part goes - did the same debugger work on the old version (before CMSIS-DAP v2 support) without sudo?

@ataradov
Copy link
Owner

ataradov commented Jan 20, 2024

Also, does it fail the same way with sudo if debugger is not plugged in?

I think this may be due to some other device failing to send the string descriptor.

@ataradov
Copy link
Owner

After looking at it for a bit, I guess there is no real reason to fail if device does not return a string descriptor. Empty string would do just fine. If it ends up being a string that matters for device identification, then it will be filtered out anyway. But bad devices will not stop the enumeration process.

I've made that change.

@strawberryhacker
Copy link
Contributor Author

strawberryhacker commented Jan 20, 2024

Sorry the late response. Nice. Now it worked using sudo. All debuggers showed up. Thank you :-)

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

2 participants