Hi.

As you may know, i am working in a device using an TUSB3410 with my
own firmware.

Most is working.
I plug the device it logs in linux correctly and i am able to detach
the driver and make usb requests with pyusb.

The problem comes when it has deadtime between calls then i get the
next message in dmesg:

usb 3-2: usbfs: process 7564 (python) did not claim interface 0 before use

I can not find any method for claiming interface in pyusb. Is there one?

Some more details:

I made a class to handle the requests (capafisica) and a test scenario:

if __name__ == '__main__':
    fisica = capafisica()
    fisica.logging = fisica.LOGGING_DEBUG
    while raw_input("Presione una tecla")>0:
        fisica.try_start()
        fisica.test()
        fisica.set_gpio(0xFF,mask=0x0C)
        fisica.get_gpio()
        fisica.try_send("Hello World!")
        print fisica.try_recv()


When i press a key it launches the set of functions and all works
correctly. IF i press a key again, then most of them fails, i may say,
randomly. AND this error message in dmesg appears.

However if i edit the test scenario to:

if __name__ == '__main__':
    fisica = capafisica()
    fisica.logging = fisica.LOGGING_DEBUG
    while raw_input("Presione una tecla")>0:
        fisica.try_start()
        fisica.test()
        fisica.set_gpio(0xFF,mask=0x0C)
        fisica.get_gpio()
        fisica.try_send("Hello World!")
        print fisica.try_recv()
        fisica.try_start()
        fisica.test()
        fisica.set_gpio(0xFF,mask=0x0C)
        fisica.get_gpio()
        fisica.try_send("Hello World!")
        print fisica.try_recv()
        fisica.try_start()
        fisica.test()
        fisica.set_gpio(0xFF,mask=0x0C)
        fisica.get_gpio()
        fisica.try_send("Hello World!")
        print fisica.try_recv()
        fisica.try_start()
        fisica.test()
        fisica.set_gpio(0xFF,mask=0x0C)
        fisica.get_gpio()
        fisica.try_send("Hello World!")
        print fisica.try_recv()


Then all the calls works.
In that way i discard that can be a problem in my firmware. Well, i do
not discard it completely, but i need to know how to "claim the
interface"



Thanks
Diego

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to