On Tue, Nov 23, 2010 at 12:33 PM, Andrew Errington
<a.erring...@lancaster.ac.uk> wrote:
> Hello everyone,
>
> I have had some success with PyUSB, but it's all new to me and I am struggling
> with something which should be simple.  I am using PyUSB v1.0.
>
> I am trying to write to the GPIO pins on a USB sound interface.  I have one of
> the extremely common USB sound dongles which contains a 3S SSS1623 chip.
> This chip has two GPIO pins, and inputs for buttons (volume up/down, mic.
> mute and speaker mute).  I have the datasheet for the 3S chip which shows me
> the pins for GPIO, but it doesn't tell me the HID commands.
>
> Another common device is the C-Media CM108 chip, which has four GPIO pins.
> The C-Media chip is compatible (but not identical) and I have the datasheet
> for this too, with pinouts *and* HID commands.
>
> So far I have written a simple PyUSB script which identifies the 3S chip,
> detaches the HID interface, and loops around continuously reporting the
> button states and GPIO states.  I used the C-Media HID 'read' documentation
> to decode what the 3S chip reports, and it matches.  Next I want to write
> four bytes to set GPIO0 to ouput, and drive it high or low.  I am using the
> C-Media 'write' documentation, but it's not working.  The documentation might
> be incompatible with the 3S chip, or I may have made a stupid mistake.
>

Without looking at your codes, I think you will have to use
reverse engineering to get things work. pyusb/libusb
is just a tool and you will have to figure how the device
works. Apparently the two device are not that identical
and your tests have already show that they are different.


-- 
Xiaofan

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to