On Thu, Jun 24, 2010 at 9:08 AM, Diego Jacobi <jacobidi...@gmail.com> wrote:

> There is a driver in the kernel for sure.
> Could you please expand your answer on this?
> How do i detach a driver from the kernel in user space?

For libusb-0.1
http://libusb.sourceforge.net/doc/function.usbdetachkerneldrivernp.html
For libusb-1.0
http://libusb.sourceforge.net/api-1.0/group__dev.html#ga0bc7a17090debf6d2b2711c505ad9725

To run the above as a normal user, you have to have the proper
permission to do that (no need to being root), again the proper
way is to use udev rules.

> Also the problem would be, that it is the driver the one that loads
> the firmware and initialices it.

That is not a problem. After you attach the device, a driver
loads the firmware to the device. Then maybe the same driver
or a different driver is bound to the device with the firmware.

To use libusb/pyusb, you detach the last driver bound to the
device.

> I have had experiences where an HID device can receive usb
> transactions from a normal application.

Even for HID device, you have to detach the kernel driver
if you want to use libusb/pyusb to communicate with the
device.


-- 
Xiaofan http://mcuee.blogspot.com

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to