From: Roger B. <ro...@ro...> - 2004-02-23 20:59:59
|
> I'll do something. If I can keep the hack limited to com_sanyo5500, I > may check it in. Ideally I would like a generic solution that can work for all phones. So far I don't have a solution that works for ANY phone! > How do I get the bulk limit? When I was trying the Sanyo 4900 using > libusb, things would seem to happen in 64 byte chunks. It also always > eventually timed out on me. It is wMaxPacketSize in an endpoint descriptor. This is from an AudioVox 8900. Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 2 Transfer Type Bulk Synch Type none wMaxPacketSize 64 bInterval 0 > File "./commport.py", line 267, in readuntil > self.ser.flushInput() > AttributeError: _usbdevicewrapper instance has no attribute 'flushInput' Mmmm, that code is somewhat dodgy anyway since it flushes the input buffer, which would throw away any data in it. However we just timed out on the read meaning there is no data to flush. The win32 pySerial code does a fair job of resetting/kicking the input. I added a flushInput method to the usbdevicewrapper. It has a call to native.usb.USBFile.resetep. You can see commented out code in that that actually clears halts and does and endpoint reset at the USB level. That had no effect on the VX4400 USB issues as there wasn't actually a halt, nor did resetep actually have any effect. You can try uncommenting all that to see if it makes a difference. Roger |