-
Notifications
You must be signed in to change notification settings - Fork 92
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
Error: unable to find parent usb device #18
Comments
What hardware/OS this is? What does lsusb say? What does dmesg say when you plug in the debugger? |
thank you for your faster reply: results : lsusbaswin@aswin-fourthfrontier:~$ lsusb results dmesg when device plugged in:[ 809.171466] usb 2-1: USB disconnect, device number 2 thank you, Aswin |
That all looks good. I've never seen this error before, so I don't really know what may be wrong. The only thing I can suggest is to run as root and see if that makes any difference. |
No, the same. I am using Debian 8 Jessie. But the same thing happened with ubuntu 14.04 as well(On the same machine). The application works fine in my other two laptops. I doubt there is some hardware related issues. Can you suggest a way to debug the code from hardware level? Is there anything to be changed on boot setup? I am using "Dell Vostro 14 3000 Series" Thank you, Aswin |
I really have no idea. I just used a standard Linux demo code as a base for the USB stuff , I have no deep knowledge of what it is doing under the hood and how it interacts with the OS. And without a way to reproduce, there is not much I can do to debug this. |
Okay, Thank you. :) |
If you want to spend some time debugging this, then we can try. For starters, I'd print out the value of 'path' in the "udev_list_entry_foreach(dev_list_entry, devices)" loop right after the line"path = udev_list_entry_get_name(dev_list_entry);". This will show if it found more than one USB HID device and some of them are not behaving properly. Alternatively, try to run the program when no debuggers are attached. If it fails the same way, then there is some weird device in the system and path printout will help to understand which one. |
And if previous test shows that this is a problem, then simply change "check(parent, "unable to find parent usb device");" to "if (NULL == parent) continue;" to skip that device. |
Yes you are right. I am getting the same error when the debugger is unplugged as well. this is the printed output /sys/devices/pci0000:00/INT33C3:00/i2c-1/i2c-DLL0662:00/0018:06CB:2985.0001/hidr |
Yes.... We did it !!! Awesome !!! It works. Thank you so much 👍 |
This is an I2C touchpad from Synaptics pretending to be a HID device. But it is not a part of the USB tree, obviously, so it has no parent. I'll change the code accordingly. |
Alex I am adding you to my linkedin network please accept my request. I need to learn lot from you. |
Code updated. |
Downloads/edbg-master$ make all
gcc -W -Wall -O2 -std=gnu99 dap.c edbg.c target.c target_atmel_cm0p.c target_atmel_cm3.c target_atmel_cm4.c target_atmel_cm7.c dbg_lin.c -ludev -o edbg
aswin@aswin-fourthfrontier:~/Downloads/edbg-master$ ./edbg -bev -t atmel_cm4
Error: unable to find parent usb device
The text was updated successfully, but these errors were encountered: