2011/3/15 Andrew Errington <a.erring...@lancaster.ac.uk>:
> On Sun, 13 Mar 2011 23:34:49 wander.lairson wrote:
>>
>> You have only one out endpoint, endpoint 1. It is probably this
>> endpoint you should write to, but before it you must select this
>> interface through a call to set_interface(1,1).
>
> I'm sorry, I don't really understand how it all works.  I still have a lot of
> reading to do.  However, I do have some success to report.
>
> I discovered this person's webpage.  He is using a CM108, but I (now) know
> that SSS1623 GPIO is compatible with CM108.
>
> http://mgrela.rootnode.net/yaesu-usb-rif/
>
> I examined the new directories created under /dev, including /dev/hidraw0.  I
> compiled his example code.  I edited the code to use GPIO0, not GPIO3.  The
> first three lines are missing and should be:
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <sys/types.h>
>
> Then, as root, I ran the code as follows:
>
> ./a.out > /dev/hidraw0
>
> This basically dumps a 5-byte packet to /dev/hidraw0
>
> This all works 'out of the box'.  I don't have to detach any interfaces, and
> the operation of the sound card is unaffected (other programs can use it
> independently of this test code).  If I give a user write permission
> to /dev/hidraw0 then I don't have to be root.
>
> So, how can I achieve the same thing with pyUSB?  What is the relationship
> between the endpoints and /dev/hidraw0?
>
> Should I use pyUSB for this application?  What are the pitfalls of simply
> writing to /dev/hidraw0?
>
If the driver provides what you need, you do better using it.

-- 
Best Regards,
Wander Lairson Costa
LCoN - Laboratório de Computação Natural - Natural Computing Laboratory
(http://www.mackenzie.com.br/lcon.html)
Programa de Pós-Graduação em Engenharia Elétrica (PPGEE)
Faculdade de Computação e Informática (FCI)
Universidade Presbiteriana Mackenzie - SP - Brazil

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to