I mean, if I do aplay -D plughw:CIT200,0 somewav.wav, nothing plays ...
nor does arecord.

I sent an email to libusb as well.  It seems that there's an HID interface
on this device that I need to talk to.  Once I figure that out (I'm
reading the hid docs as we speak), I would just "claim" that interface and
send/recieve commands there.

*** fingers crossed ... that should make it work.

Because the kernel already detects the devices properly (as sound and hid
), I suppose they're already "active".  I just need to figure out how to
talk to them.



> What do you mean by "not activated", does any write or read operation
> raise an exception?
>
> Wander
>
> 2008/9/2 Christopher Moore <[EMAIL PROTECTED]>:
>> Hey everyone,
>>
>> I'm trying to write my first program with pyUSB.  I have already figured
>> out how to identify my device, open it, add it to a handle, close it and
>> claim it's interface.
>>
>> Here's my situation:
>>
>> The kernel recognizes my device ( a linksys cit200) as a device already
>> and it actually shows up as a plughw device.  The problem is the device
>> is
>> not "activated"  My question is, do I have to claimInterface this device
>> to send/receive signals to it?  For now, I just want to see if I can
>> "enable/activate" it, so the mic/speaker will work on the thing.
>>
>> Right now, in order for me to claim the interface, I have to
>> detachKernelDriver each interface (there are 4 of them, 3 alsa/sound, 1
>> hid), then setConfiguration, then claimInterface.  In doing so, I lose
>> ...
>> it showing up as those devices.
>>
>>
>> Example Code:
>> ---------------------------------------------
>> import usb
>>
>> # linksys CIT200 Device Info
>> vendor_id = 5041
>> product_id = 29
>>
>> buses = usb.busses()
>>
>> for bus in buses :
>> for device in bus.devices :
>>  if device.idVendor == vendor_id :
>>    if device.idProduct == product_id :
>>  # found the CIT200
>>  linksys = device
>>
>> # open device
>> handle = linksys.open()
>>
>>
>> # setup interface and configs ... there are 4 interfaces for this
>> device...
>> config = linksys.configurations[0]
>> interface = config.interfaces[0][0]
>>
>> # detach kernel drivers
>> handle.detachKernelDriver(0)
>> handle.detachKernelDriver(1)
>> handle.detachKernelDriver(2)
>> handle.detachKernelDriver(3)
>>
>> # set configuration and claim interface(s?)
>> handle.setConfiguration(config)
>> handle.claimInterface(interface)
>> handle.setAltInterface(interface)
>> ---------------------------------------------
>>
>>
>> Any help would be appreciated.  I will probably have a few more
>> questions
>> to follow :)
>>
>> Thanks
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Pyusb-users mailing list
>> Pyusb-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Pyusb-users mailing list
> Pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pyusb-users mailing list
Pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to