TransWikia.com

Unable to manually bind driver in Linux

Unix & Linux Asked by nZaegik on November 9, 2021

Basically I’m trying to bind a test USB driver that is on github. It is basically just a very simple USB driver if you want to test it for yourself.

Here are the steps I did:

  • Use lsusb -t to find what bus and port my usb was connected on. I found out that it was 1-3.
  • Went to /sys/bus/usb/devices and found 1-3 there, and found that it was bound to drivers/usb.
  • Used echo 1-3 > unbind to unbind it. I was able to successfully unbind it.
  • Went to the devices folder and checked if 1-3 was still bound to anything. It was not.
  • Went to the directory of my own driver, named hello_driver
  • Tried to do echo 1-3 > bind but I get the error message echo: write error: No such device

Here is the output of lsusb -t if it is helpful.

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 4: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
    |__ Port 3: Dev 15, If 0, Class=Mass Storage, Driver=, 480M
    |__ Port 4: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 3: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 10: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 10: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M

I’m not sure what the problem is. I know other people have asked this but their solutions didn’t help in my case. It seems as if this error only appears in my own driver, but not others. Thanks.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP