> Taking advantage of your kindness I am going to ask another question: > My device is supposed to answer only two commands. Either "O""K", which in > ASCII is "0x004F 0x004B 0x0000 0x0000 ..." or "N""O", which is "0x004E > 0x004F 0x0000 0x0000 ..."....But it doesn't matter what command I send I > always get "0x0008 0x0080 0x0000 0x0000 0x0008 0x0080 0x0000 0x0000". > From your experience....Do you think that since my device is not supposed to > send that answer it is possible that the one answering is not my device, but > rather the USB controller itself or something like that?.
I don't think so. It may be a error status, but from you device. > -- > Begoña Fuentes > > > 2010/9/21 Wander Lairson <wander.lair...@gmail.com> >> >> I guess what you mean in command is >> >> command =[0x00, 0x00, 0x00, 0x00, 0x00, 0x00] >> >> 2010/9/21 Begoña Fuentes <begofume...@gmail.com>: >> > Sorry! st=command....I made that change when I copied the code to make >> > it >> > more legible...I have changed it already. >> > -- >> > Begoña Fuentes >> > >> > >> > 2010/9/21 Wander Lairson <wander.lair...@gmail.com> >> >> >> >> What is "st" in a=ep_out.write(st) ? >> >> >> >> 2010/9/21 Begoña Fuentes <begofume...@gmail.com>: >> >> > Hi everybody, this is my first time in this list, so I apologize in >> >> > advance >> >> > if this is not the way to contact you. >> >> > I am newer with pyusb and I am having a trouble that I am not able to >> >> > solve >> >> > by myself, so I would appreciate any help you can give me. >> >> > I am trying to obtain diverse information from a USB device. I have >> >> > the >> >> > communication protocol (so I know what commands I have to write) and >> >> > I >> >> > am >> >> > working under Ubuntu 10.04 The problem is that I am always getting >> >> > "Operation Timed Out" error after reading, so I am not able to read >> >> > anything. >> >> > This is my code: (any comment would be extra-appreciated) >> >> > import usb.core >> >> > import usb.util >> >> > import usb >> >> > import sys >> >> > command ="0x0000 0x0000 0x0000 0x0000 0x0000 0x0000" >> >> > dev = usb.core.find(idVendor=0x0590, idProduct=0x0028) >> >> > if dev is None: >> >> > raise ValueError('Device not found') >> >> > dev.set_configuration() >> >> > >> >> > #Find endpoints >> >> > ep_out = usb.util.find_descriptor( >> >> > dev.get_interface_altsetting(), # first interface >> >> > # match the first OUT endpoint >> >> > custom_match = \ >> >> > lambda e: \ >> >> > usb.util.endpoint_direction(e.bEndpointAddress) == \ >> >> > usb.util.ENDPOINT_OUT >> >> > ) >> >> > >> >> > ep_in = usb.util.find_descriptor( >> >> > dev.get_interface_altsetting(), # first interface >> >> > # match the first OUT endpoint >> >> > custom_match = \ >> >> > lambda e: \ >> >> > usb.util.endpoint_direction(e.bEndpointAddress) == \ >> >> > usb.util.ENDPOINT_IN >> >> > ) >> >> > >> >> > a=ep_out.write(command) >> >> > ret=ep_in.read(64, timeout=12000) >> >> > print ret >> >> > >> >> > Thank you in advance!! >> >> > -- >> >> > Begoña Fuentes >> >> > >> >> > >> >> > >> >> > ------------------------------------------------------------------------------ >> >> > Start uncovering the many advantages of virtual appliances >> >> > and start using them to simplify application deployment and >> >> > accelerate your shift to cloud computing. >> >> > http://p.sf.net/sfu/novell-sfdev2dev >> >> > _______________________________________________ >> >> > pyusb-users mailing list >> >> > pyusb-users@lists.sourceforge.net >> >> > https://lists.sourceforge.net/lists/listinfo/pyusb-users >> >> > >> >> > >> >> >> >> >> >> >> >> -- >> >> Best Regards, >> >> Wander Lairson Costa >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Start uncovering the many advantages of virtual appliances >> >> and start using them to simplify application deployment and >> >> accelerate your shift to cloud computing. >> >> http://p.sf.net/sfu/novell-sfdev2dev >> >> _______________________________________________ >> >> pyusb-users mailing list >> >> pyusb-users@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/pyusb-users >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Start uncovering the many advantages of virtual appliances >> > and start using them to simplify application deployment and >> > accelerate your shift to cloud computing. >> > http://p.sf.net/sfu/novell-sfdev2dev >> > _______________________________________________ >> > pyusb-users mailing list >> > pyusb-users@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/pyusb-users >> > >> > >> >> >> >> -- >> Best Regards, >> Wander Lairson Costa >> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> pyusb-users mailing list >> pyusb-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/pyusb-users > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > pyusb-users mailing list > pyusb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > -- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users