2011/8/16 Charles Romestant <cromest...@gmail.com>: > Hello this is the last update I was talking about with XIaofan >
After reset(), you must do a set_configuration again, I guess this is what is causing the segfault... > The task: get the input from the macbook pro's IR port (6button remote >> control) >> The code I'm using: >> http://pastie.org/2378626 >> and the debug output: >> http://pastie.org/2378632 >> the descriptor says only one endpoint exists(interrupt) but using >> endpoint2 >> = dev[0][(0,0)][1] still returns an endpoint object. >> It always throws a segfault 11 when trying to read, and then the device is >> unusable until the next reboot. > still a weird error going on, but I 'll keep on looking at it in my spare > time > > On Tue, Aug 16, 2011 at 10:44 AM, Wander Lairson Costa > <wander.lair...@gmail.com> wrote: >> >> 2011/8/10 Charles Romestant <cromest...@gmail.com>: >> > Hello all, >> > I was travelling and had little time to update. >> > I opted to take the try catch approach until the device is awoken by >> > keypress. >> > This was all working properly, then I started to code so I could read >> > form >> > the device. So reading up on the docs, i was able to 1) figure out that >> > its >> > an interrupt endpoint, and 2) figure out how to read from it. >> > Now here is where the problems came back. >> > endpoint = device[0][(0,0)][0] >> > (single endpoint, first device, first alternate setting) >> > (here there is something weird, even though there is only one endpoint >> > listed, if I do >> > endpoint = device[0][(0,0)][1] it still returns an endpoint object, but >> > I am >> > unable to read from it). >> > and then a simple >> > dev.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize) >> > which ends up in a segfault exit from python, and the device >> > disappearing >> > a reboot fixes the issue (which is annoying, if anyone knows of a simple >> > way >> > to reload the driver and the device it would be nice to know). >> > I think I need to learn how to use gdb in python. >> > Thanks again for the help, >> > I'll keep posted. >> >> Could you please post your last code? >> >> Wander >> >> >> ------------------------------------------------------------------------------ >> uberSVN's rich system and user administration capabilities and model >> configuration take the hassle out of deploying and managing Subversion and >> the tools developers use with it. Learn more about uberSVN and get a free >> download at: http://p.sf.net/sfu/wandisco-dev2dev >> _______________________________________________ >> pyusb-users mailing list >> pyusb-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/pyusb-users > > > > -- > Merci de penser à l'environnement avant d'imprimer cet e-mail > Please think about the environment before you print this e-mail > Por favor piense en el medio ambiente antes de imprimir este e-mail > > > > Lic. Charles M. Romestant F. > > > > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > > _______________________________________________ > pyusb-users mailing list > pyusb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > -- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users